Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4858429imm; Fri, 18 May 2018 11:54:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpPmx4DvHb6yOZPByf8I57WgRIeadrOiFd1uh6VH7apewmtPgJDb0e/bTZO+9zCLrvt3Adr X-Received: by 2002:a62:2218:: with SMTP id i24-v6mr10490786pfi.53.1526669659373; Fri, 18 May 2018 11:54:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526669659; cv=none; d=google.com; s=arc-20160816; b=mu5hzm5KqXBRydWZngGHoGTsSJw4PwUY/AWQVzDklB/IprP1GRu7UmZwrY7AQK8W71 ob42wAfS3Q8R6WLO7ZPNDl6gYJzU6HScCVgA59HdJwQ3w8nDbPZMCXZMkNeG8CqNDbay 25mZSJEFQzwCBSxhwBN4BhCawtn6UAFVh4WTuFLfT2wJt37QW0oCABYWwDGcJwgllJcd tc4zK2wCLg/1QD0Hyv0jAMB19ybeRKgwJyTPFBRM6vB9DektT6JLcnnZMbw4ejRI3+EP hF7JOILQ0Pl6cbhLv+/OGHTatsxLpXCWV2EbDt8V5sL3OOBcISZryGY+s8zCivEzxyyL 8EBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:arc-authentication-results; bh=YtfwblD/P8iNKDtxi/vPelU3g5E4TzFa11WhuL3li6M=; b=DY8mODHBSaA2z0DdPFkNn0aaAoui+zS2ConJvJ5F7rEsDZ+69xo3p/dVL0h2rYvv6z byClsCJWayTfsX3lguN8tR3F1l8tTLAFuJIO+Q9T4aXaQ4fdoxCIBFoPiA0mU9Ep/ssn 5CzEX1zk7BVonqKo3Z9z2jOOErZjE8l1RRRHxTSFj/NnYhBaQTDOOx5Fal6QXz8sDDtR +i9+d7HqtN68c7Nd8wR8rXq7PodFn3CHAXQYU394DWPm3TJPEROtm3no7eX560L5I9yc U0ciefphFmYhlb2XNKUN/hb7r6iR2lYIXFAJ022/d6ebYGSR70yetdi0P7hdv0jYAWRz 5Yug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5-v6si7689429plp.108.2018.05.18.11.54.04; Fri, 18 May 2018 11:54:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752008AbeERSxr convert rfc822-to-8bit (ORCPT + 99 others); Fri, 18 May 2018 14:53:47 -0400 Received: from terminus.zytor.com ([198.137.202.136]:34203 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751577AbeERSxp (ORCPT ); Fri, 18 May 2018 14:53:45 -0400 Received: from [10.170.141.84] ([192.55.54.58]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id w4IIrRhx2539064 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Fri, 18 May 2018 11:53:27 -0700 Date: Fri, 18 May 2018 11:53:25 -0700 User-Agent: K-9 Mail for Android In-Reply-To: References: <20180517161402.78089-1-namit@vmware.com> <20180517161402.78089-3-namit@vmware.com> <20180518075853.GD12217@hirez.programming.kicks-ass.net> <6DB0E0C2-CCD2-4FCE-BD8B-5E340E308FF7@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH 2/6] x86: bug: prevent gcc distortions To: Linus Torvalds CC: namit@vmware.com, Peter Zijlstra , Linux Kernel Mailing List , the arch/x86 maintainers , Thomas Gleixner , Ingo Molnar , Josh Poimboeuf From: hpa@zytor.com Message-ID: <2F760FAE-C19C-4BC3-A8CC-7D17CEF3B116@zytor.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On May 18, 2018 11:50:12 AM PDT, Linus Torvalds wrote: >On Fri, May 18, 2018 at 11:34 AM wrote: > >> On May 18, 2018 11:25:32 AM PDT, Linus Torvalds < >torvalds@linux-foundation.org> wrote: > >> Unfortunately gcc doesn't guarantee that global assembly inlines will >appear at the top of the file. > >Yeah. It really would be better to do the "asm version of -inline". > >We already do something like that for real *.S files on some >architectures >(because their assembly really wants it, eg > > arch/arm/Makefile: >KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) >-include >asm/unified.h -msoft-float > >but I do want to point out that KBUILD_AFLAGS is *not* used for >compiler-generated assembly, only for actual *.S files. > >Sadly, I don't actually know any way to make gcc call the 'as' phase >with >particular options. We can use "-Wa,xyzzy" to pass in xyzzy to the >assembler, but there is no "-include" option for GNU as afaik. > >Can you perhaps define a macro symbol for "--defsym"? Probably not. > > Linus I looked at this thing a long time ago; it's not there, and the best would probably be to get global asm() working properly in gcc. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.