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 54A78C61DA4 for ; Thu, 23 Feb 2023 09:51:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233580AbjBWJvx (ORCPT ); Thu, 23 Feb 2023 04:51:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233354AbjBWJvu (ORCPT ); Thu, 23 Feb 2023 04:51:50 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33C964E5F5; Thu, 23 Feb 2023 01:51:49 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A7CD461629; Thu, 23 Feb 2023 09:51:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE07EC433EF; Thu, 23 Feb 2023 09:51:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1677145908; bh=00vV012v5IGFYupEfY8cRFX6H7hj6D67NRk/FGmf4tA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YKN0HiTB8aCX3lOBp4YzZBOc2xpCFZlbfBq3sS4elxzCo2DgNpiZvRfAWw0EEZPsY 1Of0ObePM7oOGZSXHavj/fw/9VtCuHNTRtjKVOIOkZsnPDjlBnZOMH/qYnzeemOMYn QCvYeMdiLvlizuKv6Sq3UBy1YChubHjmOCkJD0iI= Date: Thu, 23 Feb 2023 10:51:45 +0100 From: Greg Kroah-Hartman To: Tom Saeger Cc: Sasha Levin , Naresh Kamboju , John Paul Adrian Glaubitz , Rich Felker , Masahiro Yamada , Ard Biesheuvel , Nathan Chancellor , Dennis Gilmore , Palmer Dabbelt , Arnd Bergmann , Andrew Morton , stable@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org Subject: Re: [PATCH 5.15 v2 1/5] arch: fix broken BuildID for arm64 and riscv Message-ID: References: <20230210-tsaeger-upstream-linux-stable-5-15-v2-0-6c68622745e9@oracle.com> <20230210-tsaeger-upstream-linux-stable-5-15-v2-1-6c68622745e9@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230210-tsaeger-upstream-linux-stable-5-15-v2-1-6c68622745e9@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 10, 2023 at 01:18:40PM -0700, Tom Saeger wrote: > From: Masahiro Yamada > > commit 99cb0d917ffa1ab628bb67364ca9b162c07699b1 upstream. > > Dennis Gilmore reports that the BuildID is missing in the arm64 vmlinux > since commit 994b7ac1697b ("arm64: remove special treatment for the > link order of head.o"). > > The issue is that the type of .notes section, which contains the BuildID, > changed from NOTES to PROGBITS. > > Ard Biesheuvel figured out that whichever object gets linked first gets > to decide the type of a section. The PROGBITS type is the result of the > compiler emitting .note.GNU-stack as PROGBITS rather than NOTE. > > While Ard provided a fix for arm64, I want to fix this globally because > the same issue is happening on riscv since commit 2348e6bf4421 ("riscv: > remove special treatment for the link order of head.o"). This problem > will happen in general for other architectures if they start to drop > unneeded entries from scripts/head-object-list.txt. > > Discard .note.GNU-stack in include/asm-generic/vmlinux.lds.h. > > Link: https://lore.kernel.org/lkml/CAABkxwuQoz1CTbyb57n0ZX65eSYiTonFCU8-LCQc=74D=xE=rA@mail.gmail.com/ > Fixes: 994b7ac1697b ("arm64: remove special treatment for the link order of head.o") > Fixes: 2348e6bf4421 ("riscv: remove special treatment for the link order of head.o") Why are we adding a commit to 5.15.y that fixes an issue that only showed up in 6.1.y? We need a good comment somewhere saying why this is needed... thanks, greg k-h