From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1105EC46467 for ; Wed, 4 Jan 2023 10:35:13 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Nn5b36FVwz3c8f for ; Wed, 4 Jan 2023 21:35:11 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=ZgQc1aUh; dkim-atps=neutral Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Nn5Z16Jk0z2xkG for ; Wed, 4 Jan 2023 21:34:17 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=ZgQc1aUh; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Nn5Yr2J42z4xwl; Wed, 4 Jan 2023 21:34:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1672828450; bh=5gtoEfhVejTP2PSgVm0jnlqHjpeRUn34WQgEHxOBFKo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ZgQc1aUhkiFUlsN1j3jU9HhNE9Mc/f5fex+rJfbq/ViJ/I45I7m1Nawieeq0kUPuy OjSsaoBVGoAxMd+6G6OvQiTizzajnZ77O8cWzKrOkwI3VOy10QtrnSWF9UwqNutxnB mFY+2SYBZVMLvDSw9cUnEP1yVBVEVxpZP0/A2VR5knYFZde6FYruZHJb4N7UqYhGM1 vioLbAL/Zxo8qgC0GL0iQUcy0rPPul6NBBtUQoIPDohhIRMzAquHn/9TOvQ9bRmWaC eAEbZL+nB/MY9veAzSVOI+uppvtT1pJsa2jp3V2S1Q2iBMiTMj4Z6om5vLO9SxRhdg ZI6UueG8lj68w== From: Michael Ellerman To: Ard Biesheuvel , Linus Torvalds Subject: Re: Linux 6.2-rc2 In-Reply-To: References: <20230102225656.GA3532398@roeck-us.net> <20230103014535.GA313835@roeck-us.net> Date: Wed, 04 Jan 2023 21:34:07 +1100 Message-ID: <874jt64mhs.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Jason A. Donenfeld" , Rich Felker , Yoshinori Sato , Arnd Bergmann , Masahiro Yamada , Linux Kernel Mailing List , Palmer Dabbelt , linuxppc-dev , Guenter Roeck Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Ard Biesheuvel writes: > On Tue, 3 Jan 2023 at 03:13, Linus Torvalds > wrote: >> >> On Mon, Jan 2, 2023 at 5:45 PM Guenter Roeck wrote: >> > >> > ... and reverting commit 99cb0d917ff indeed fixes the problem. >> >> Hmm. My gut feel is that this just exposes some bug in binutils. ... >> It really shouldn't matter, but here we are, with a build problem with >> some random old binutils on an odd platform.. >> > > AIUI, the way ld.bfd used to combine output sections may also affect > the /DISCARD/ pseudo-section, and so introducing it much earlier > results in these discards to be interpreted in a different order. > > The purpose of this change is to prevent .note.GNU-stack from deciding > the section type of the .notes output section, and so keeping it in > its own section should be sufficient. E.g., > > --- a/include/asm-generic/vmlinux.lds.h > +++ b/include/asm-generic/vmlinux.lds.h > @@ -896,7 +896,7 @@ > * Otherwise, the type of .notes section would become PROGBITS > instead of NOTES. > */ > #define NOTES \ > - /DISCARD/ : { *(.note.GNU-stack) } \ > + .note.GNU-stack : { *(.note.GNU-stack) } \ > .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \ > BOUNDED_SECTION_BY(.note.*, _notes) \ > } NOTES_HEADERS \ This also fixes errors seen in the powerpc build with binutils <= 2.35. Tested-by: Michael Ellerman (powerpc) cheers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C067C46467 for ; Wed, 4 Jan 2023 10:34:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234764AbjADKeV (ORCPT ); Wed, 4 Jan 2023 05:34:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233932AbjADKeS (ORCPT ); Wed, 4 Jan 2023 05:34:18 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D572295BE for ; Wed, 4 Jan 2023 02:34:15 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Nn5Yr2J42z4xwl; Wed, 4 Jan 2023 21:34:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1672828450; bh=5gtoEfhVejTP2PSgVm0jnlqHjpeRUn34WQgEHxOBFKo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ZgQc1aUhkiFUlsN1j3jU9HhNE9Mc/f5fex+rJfbq/ViJ/I45I7m1Nawieeq0kUPuy OjSsaoBVGoAxMd+6G6OvQiTizzajnZ77O8cWzKrOkwI3VOy10QtrnSWF9UwqNutxnB mFY+2SYBZVMLvDSw9cUnEP1yVBVEVxpZP0/A2VR5knYFZde6FYruZHJb4N7UqYhGM1 vioLbAL/Zxo8qgC0GL0iQUcy0rPPul6NBBtUQoIPDohhIRMzAquHn/9TOvQ9bRmWaC eAEbZL+nB/MY9veAzSVOI+uppvtT1pJsa2jp3V2S1Q2iBMiTMj4Z6om5vLO9SxRhdg ZI6UueG8lj68w== From: Michael Ellerman To: Ard Biesheuvel , Linus Torvalds Cc: Guenter Roeck , "Jason A. Donenfeld" , Yoshinori Sato , Rich Felker , Arnd Bergmann , Linux Kernel Mailing List , Masahiro Yamada , Palmer Dabbelt , linuxppc-dev Subject: Re: Linux 6.2-rc2 In-Reply-To: References: <20230102225656.GA3532398@roeck-us.net> <20230103014535.GA313835@roeck-us.net> Date: Wed, 04 Jan 2023 21:34:07 +1100 Message-ID: <874jt64mhs.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ard Biesheuvel writes: > On Tue, 3 Jan 2023 at 03:13, Linus Torvalds > wrote: >> >> On Mon, Jan 2, 2023 at 5:45 PM Guenter Roeck wrote: >> > >> > ... and reverting commit 99cb0d917ff indeed fixes the problem. >> >> Hmm. My gut feel is that this just exposes some bug in binutils. ... >> It really shouldn't matter, but here we are, with a build problem with >> some random old binutils on an odd platform.. >> > > AIUI, the way ld.bfd used to combine output sections may also affect > the /DISCARD/ pseudo-section, and so introducing it much earlier > results in these discards to be interpreted in a different order. > > The purpose of this change is to prevent .note.GNU-stack from deciding > the section type of the .notes output section, and so keeping it in > its own section should be sufficient. E.g., > > --- a/include/asm-generic/vmlinux.lds.h > +++ b/include/asm-generic/vmlinux.lds.h > @@ -896,7 +896,7 @@ > * Otherwise, the type of .notes section would become PROGBITS > instead of NOTES. > */ > #define NOTES \ > - /DISCARD/ : { *(.note.GNU-stack) } \ > + .note.GNU-stack : { *(.note.GNU-stack) } \ > .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \ > BOUNDED_SECTION_BY(.note.*, _notes) \ > } NOTES_HEADERS \ This also fixes errors seen in the powerpc build with binutils <= 2.35. Tested-by: Michael Ellerman (powerpc) cheers