Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4715494img; Tue, 26 Mar 2019 15:26:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFb4QyTv0rUBMhmbUkey1lvB1CqBIdelG6Hu77EZUgg+KfcKroJznFQGPGwuKQTV/N/5Fh X-Received: by 2002:a17:902:e5:: with SMTP id a92mr33219747pla.326.1553639219850; Tue, 26 Mar 2019 15:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553639219; cv=none; d=google.com; s=arc-20160816; b=TMk0NELBJMPfwOM2Op8WwftPlwiSrHQSbkWZMGYc/XsInbzjV1a78Vn/5JWNAhwI2b tqlrSGeit3qMW6QD8UU0ErTO2kNhwatA5ggdPFmxNq7eL2W8en90htd5wXUqfpYKF2Y0 19w8h1BSPC834wacBUBrCZxJ2p96yyReCl4xNF1jaYQCbHrCGBSnwRGwmDGRxUKki1WU HeagcTDuClimc+DkRnrpKoVsNZQcSPNuUyZXATAkRd4QMKNktw0IKqRFcsFr1IptgRtc zspGLcMAAX7Og2HE+gpu0fzcSayLnI+xMFiVGuu6/mmnaS8nagIKdQ7W3TyqAcQ1fhr1 ncDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=n9KEHl9AVEA6dvVg5BDEozIZMrLZkRonHNLOJzp+uk0=; b=K2oXdrT8/FnkDvFEXADQyNj42ZQ5n0+I4ELJrWWJyEeiP0DD5dQ8MvFjvWMylsJp+p n7QNRz/6mZfUStbBb7sPQkxtqOeAe1T+hDTtHYzPL93/7XW9qi2L18Q9oXAGQbdNKtJ/ IcO5K08SYqngkwxMmISoQhLi3nczTHi1PnzKrdBRqhUP+KaruRWovjvEFZz7apeyIoZq CfOi7LBGTT5StUvqJ2VoXLCGNRLJ5E30Qty6PcMrFUJ/P10oBzNwFSu4XaoRMiJoeYG7 uPCnqXqgiAYEXUbEjYI8O7cEdfywf9kVTr6/kvvO5bhlzEzGqvJJ2brD0WNrogj7Irn7 imuA== 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 t136si17503237pgc.589.2019.03.26.15.26.44; Tue, 26 Mar 2019 15:26:59 -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 S1732056AbfCZWZv (ORCPT + 99 others); Tue, 26 Mar 2019 18:25:51 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:49597 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727262AbfCZWZv (ORCPT ); Tue, 26 Mar 2019 18:25:51 -0400 Received: from p5492e2fc.dip0.t-ipconnect.de ([84.146.226.252] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1h8uVt-0007UD-Ki; Tue, 26 Mar 2019 23:25:45 +0100 Date: Tue, 26 Mar 2019 23:25:45 +0100 (CET) From: Thomas Gleixner To: Andi Kleen cc: Andi Kleen , x86@kernel.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/17] x86, lto: Mark all top level asm statements as .text In-Reply-To: <20190326213803.GN18020@tassilo.jf.intel.com> Message-ID: References: <20190321220009.29334-1-andi@firstfloor.org> <20190321220009.29334-3-andi@firstfloor.org> <20190326213803.GN18020@tassilo.jf.intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andi. On Tue, 26 Mar 2019, Andi Kleen wrote: > On Tue, Mar 26, 2019 at 06:03:59PM +0100, Thomas Gleixner wrote: > > On Thu, 21 Mar 2019, Andi Kleen wrote: > > > > > With gcc 8 toplevel assembler statements that do not mark themselves > > > as .text may end up in other sections. > > > > Which is clearly a change in behaviour. Is that intended or just yet > > another feature of GCC? > > I'm not sure it's a new behavior, but I've seen it first > with gcc 8. Ok. > > Your subject says: 'x86, lto:' > > > > So is this a LTO related problem or is the section randomization > > independent of LTO? > > The basic behavior is independent of LTO, but I've only seen > failures with LTO. But I believe in theory it could lead > to failures even without LTO. Well, we better should know the real reason for this wreckage. I mean, the default section for text is suprisingly .text. I don't see a reason why this would be any different for an assembly function implemented in a C file. So the question is whether GCC does something silly in general which gets 'repaired' silentely by the linker or whether it's just an LTO issue. If it's the former, then we must backport those fixes. Could you please verify with the GCC people as you seem to have a reproducer of some sort. Thanks, tglx