Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4855266imm; Fri, 18 May 2018 11:50:51 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrhqbhIhqAuu+YtVSApppcmmt5viueEuSPh+nQggtOALdPIZfMxREncO5NIEXXsQ7wvsfNc X-Received: by 2002:a65:51cd:: with SMTP id i13-v6mr7293802pgq.359.1526669451613; Fri, 18 May 2018 11:50:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526669451; cv=none; d=google.com; s=arc-20160816; b=JnpfSNabceuppMYPL69axzpKZOv0dDSYE/PZvo6FMRrWwBGP48Zh1gYB6IHKnUkjDh c6jYaSJhH8IaCl6l9URBQA/DxDJ/6oaVFd5/b92YInrg5IYD7RxdQwap4zvQZJxcW+no oyzJewhUGOO9reiZk/U/ZMTi+VJYDebLCEr+VpUZXn9rAAewywXMVpHPRNFRh+WHeL/D +DginbgTfbW+FDuHFshyOrU3S0mR/IDWsig77CWgnD7U/07P622obxh4I+RLnGgMJbO5 +L87+87KPmSJqFQdfISuZwwpAg90YZdn5rpE8No6zLGfI2jOOKtl1ZE032TfGnsKedQj sudw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=KvGktDRIGWBHcn6VviIZpNoB9xuSAmdmYnRaSg6MpPo=; b=YQNj7EhQkI4Mg8U1cxYFj8CaNTrkwOncLYbNPX74fjDX5qB4cNTcmDmGjbEyrDVwcQ +ii3uzxcpbSFy8TyQUl2qh6HuYJ8RsOcdveIww7b/Ozd/B4cLaZFwBZ8t6NKWPZeezRw 54YJcdCkQdMsRafYN1XyzUQckivkeqYq+NkmPBV3aSkJFs/nVx7+UkdFtMIP4QUf4Ium 7BG8aPuYatB87eeZXgQmUB7Oak6KKiEmQsYuJqEblCP6MHUcfkxaKgw2KaKKhi51AjlE uLlrMzX/aguSmz/IyS7DuHlKi4UbW9bhaZP6lsn5S8xO/rRPILAS2DcWPbKCZMUVdKKv JRFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=GQrNTqDY; 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 a12-v6si6341226pgw.578.2018.05.18.11.50.37; Fri, 18 May 2018 11:50:51 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=GQrNTqDY; 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 S1751940AbeERSuZ (ORCPT + 99 others); Fri, 18 May 2018 14:50:25 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:40330 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751197AbeERSuY (ORCPT ); Fri, 18 May 2018 14:50:24 -0400 Received: by mail-it0-f68.google.com with SMTP id j186-v6so14334423ita.5 for ; Fri, 18 May 2018 11:50:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KvGktDRIGWBHcn6VviIZpNoB9xuSAmdmYnRaSg6MpPo=; b=GQrNTqDYPiUAaktPHwVc2nxU2/qWiczXKOqeQUxPvNGnwXN1JHfxSnOsL2oY0OJ+tt ZdjSiIBPsQE7/Sc9UWu9QWxg4wvZ4sCzcytpKcykMgihvH82FyddiSYReHs45kDLXTCu 3T/BmwCzgg9HSWffA0tLJ5Y5U8nwi3qtuXeAE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KvGktDRIGWBHcn6VviIZpNoB9xuSAmdmYnRaSg6MpPo=; b=q+oIyzVvLwOKIjuKkGfLwkT987UufadmhCfupzsNTUR17LYf85U8GdLw65cxALeHbO k2RhsHPHVZJQPnJgsPTczY/he6t0wCHHPG9QvXKIEanRqUyauf2AJvHM3Z44Y2CycL66 gThDXTqq6RDB4d7TJf5x+i5d1wWbG2pQstKLLMdNnZJAFVf9TFTZIfWCGn8voMgCBms/ LkIZVGamGZ5h0jFYn1mlOINqxBkb8gT+8pPB/XY+D1e5vVNS7suIFGHmxVDd1njExl0X QJOm/QwrqoYHNkiLA3ixNTfD+PXGL5IKPkTB2WHpZPinN8JvVbYRcpGhNlwxbQ2kTzpN A3pg== X-Gm-Message-State: ALKqPwcQm4q1ajJypwHfwivQGcF9F9hV9Ybw4Puu8TKQkQKwr7LBM2Mt Fxne4ODUr+RGwC6dani3vdFAeA4tH3VwcMvYXMI= X-Received: by 2002:a24:21ca:: with SMTP id e193-v6mr8231623ita.108.1526669423412; Fri, 18 May 2018 11:50:23 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Linus Torvalds Date: Fri, 18 May 2018 11:50:12 -0700 Message-ID: Subject: Re: [PATCH 2/6] x86: bug: prevent gcc distortions To: Peter Anvin Cc: namit@vmware.com, Peter Zijlstra , Linux Kernel Mailing List , "the arch/x86 maintainers" , Thomas Gleixner , Ingo Molnar , Josh Poimboeuf Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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