From patchwork Thu Mar 31 07:44:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 8707981 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A01929F30C for ; Thu, 31 Mar 2016 07:44:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C5DCE20253 for ; Thu, 31 Mar 2016 07:44:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DA94B201FA for ; Thu, 31 Mar 2016 07:44:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751582AbcCaHoS (ORCPT ); Thu, 31 Mar 2016 03:44:18 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33435 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750972AbcCaHoQ (ORCPT ); Thu, 31 Mar 2016 03:44:16 -0400 Received: by mail-wm0-f65.google.com with SMTP id i204so19447811wmd.0; Thu, 31 Mar 2016 00:44:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=hgP17o+NnFsjNUyrD2kbSdvYMVa8kaqldHBiIdn6TaI=; b=0Jt7OxzhRvj1nmC4bZGF6A9IlPAs/8mR53zUgmWeLp9iTWdCadYjqMJGIhIhTBBxHL GOHk/sGcke5BAxR8zZ+Gep2AmmumwSuQqfMmVb/fIyaD6Xux61r74NOvZOC9zR0nl8vC YQ8cJflhfCZjwjAX+3z4kWi0H8xzJq1wgjUxGMcyljXLXixAuqZzEw4DKaIOlFABSqkT 0COJd6Fi+fR9jkhE01+0kiKSmTsJMVOltcoPbvgRE3VbSSMSZou5zV12GCgXHDLFxmaQ AqVbpcdm3l27GkJoaPdgffIzr5tv3maq8tmr8d3vnEErexfMd60ML7wlh8sc3gNeOGqg 2tBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=hgP17o+NnFsjNUyrD2kbSdvYMVa8kaqldHBiIdn6TaI=; b=Vn9xB0D/QoD5LsjGvvSYBI7hU8taUBmKvAUGQzoWbUrPBIr4HxaiBJ2guHlgO00sdl jvNXv8sjVauq3fOCFzazrA+VA0nNyNbHoBFb+oUa3DHXCmJZg0BvBNx7D7dC7lAZmKZu 7XN2AdU1isvSht+JsAr1PVBKu4fOglZjj+qAXP1H7g42mXfygZi2R1rYxXEC4pofIpRS 5e5+RihXEzbvUXdCvfQkOPDWBWcMptIPKQZYHNVd4p/iCY6dm43patGID3kt3ln3cUMb zNV7lQoO39Sqk3OH4vj0lPMRrllSqkCyFBoBgsnYs8+7tfPgb46dAWPAE1BYl1GZlemT yw1g== X-Gm-Message-State: AD7BkJIptHCKdmQsjdBgBFqlF/3TlYjRmJmRWWqs4Mx2slwlLqjhN2FvzL+n/ULzPLhMCw== X-Received: by 10.28.9.71 with SMTP id 68mr14442870wmj.33.1459410255135; Thu, 31 Mar 2016 00:44:15 -0700 (PDT) Received: from donizetti.lan (94-39-141-76.adsl-ull.clienti.tiscali.it. [94.39.141.76]) by smtp.gmail.com with ESMTPSA id ys9sm7575990wjc.35.2016.03.31.00.44.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Mar 2016 00:44:13 -0700 (PDT) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: lkml@tlinx.org, Andrew Morton , Michal Marek , stable@vger.kernel.org Subject: [PATCH] compiler-gcc: disable -ftracer for __noclone functions Date: Thu, 31 Mar 2016 09:44:12 +0200 Message-Id: <1459410252-15531-1-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 2.5.5 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP -ftracer can duplicate asm blocks causing compilation to fail in noclone functions. For example, KVM declares a global variable in an asm like asm("2: ... \n .pushsection data \n .global vmx_return \n vmx_return: .long 2b"); and -ftracer causes a double declaration. Cc: Andrew Morton Cc: Michal Marek Cc: stable@vger.kernel.org Cc: kvm@vger.kernel.org Reported-by: Linda Walsh Signed-off-by: Paolo Bonzini --- include/linux/compiler-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 22ab246feed3..eeae401a2412 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -199,7 +199,7 @@ #define unreachable() __builtin_unreachable() /* Mark a function definition as prohibited from being cloned. */ -#define __noclone __attribute__((__noclone__)) +#define __noclone __attribute__((__noclone__, __optimize__("no-tracer"))) #endif /* GCC_VERSION >= 40500 */