Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp561909rwl; Sun, 25 Dec 2022 02:48:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXt8v0l8KfaO8IoPBZucWcCPTY60vO4ARPeomRCWjPUhacFf9F05JILekAPiJJwWxAI1U7Lk X-Received: by 2002:a05:6a00:1c9f:b0:576:84ae:59a with SMTP id y31-20020a056a001c9f00b0057684ae059amr16681780pfw.3.1671965330220; Sun, 25 Dec 2022 02:48:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671965330; cv=none; d=google.com; s=arc-20160816; b=WPhhsxcx/b2YVJ1oEFvNWRua9U1zYkedaNWiLbt6jubKCj2tUae0QZyNMw01+x0dyN xfSUDMHxkRd72M/F3/IjJPlaqZMr7rH6KDzYKE0cVD9jb4e16tHLudugSMLYajcxja+E D5NIQmwfIXxXNI/PhHx66Y/dKM2w9uAbE2WrmoqfTGqC8xSl9kU+qMZPwTcSSmusrjxg HOiEyra4Q7CpI07fWJYd8x2sM8g7/4/Ax0V5s9wVuaV1JdLQvuCJ7mp3XMZFLbtcjJ/N v29fytSBKqjVvIMifAPA4TJDhkWcqlIcHxrrCHeh6zGKsDQyUZH80zmRFNUttK3+0rJ4 Rnsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Nwt0orj6W08ToriA87JVmPJCxzYvKvJITmMGKWnCeNQ=; b=cTSpUt5CJgeHJFVkw0pfUyQdtVUC38RS5cLh06zmL8PMNnC5FGEBCyWMO1oYH6V7Ec X0to5pGBAwKc/arxlN+bC8JfUalCzmDNAUTUc6+aiY690vI8lu0w/gi5K8Z0gVN/8Cd/ N8K6TceZLx1pU0FzFzWCC5pqkxjesjc1tJMz1xwCmiRGWke4ZUhM2fSS5Q5EmXbyn/yZ nqGDg9gGgZN9zFAmtslhiaVVZafAoS21TYJH1u8KRlHfljHvGDKAKgHMXA+PvNluurBj fR5ZM1+P25tSwWrZ8+tMeNGwUQ6hfgw3HwlM/K9bnu9Av9RnnDHDPrZghYAKVGsAisN8 DsKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h14ZFajS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v13-20020a63464d000000b0047895cb2289si8908238pgk.644.2022.12.25.02.48.41; Sun, 25 Dec 2022 02:48:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h14ZFajS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230484AbiLYJBh (ORCPT + 66 others); Sun, 25 Dec 2022 04:01:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230250AbiLYJBe (ORCPT ); Sun, 25 Dec 2022 04:01:34 -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 DEB39CC2; Sun, 25 Dec 2022 01:01:32 -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 7081660B5A; Sun, 25 Dec 2022 09:01:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C85D9C433F1; Sun, 25 Dec 2022 09:01:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671958891; bh=F9V6rqudNHC3w/MOuFxB946mkc6sc1VA904/FzyDybE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=h14ZFajSaOP4V6xbNpCSDe3fvbAemOQtkAIfOOcmbRJHhPj43nAKt1cIX9gRSKpzG tF4TJfykHiwVbKcj5MkkI8qgNG8URHBDTKawtqEws+Q6q5wvUvrSU5XKzw2fJSgpjc PFxl0mniU9SMGHmmpOFSrDuRNcNVhlQ8ZvP9I44MkjBwlVMA5M7qcyHeXqt2BCYRQB nkNDUIBKr2KV5SuDe5cqSwUCwZS9d8srGrSDzV+pXHQG15aadLyiQXG/+i58tHPFku xtuhyf38RijtRBsVTxweg99YuS73lg6IxLQjyjZKLilBfvKdNltt6084x1HKc3pddn CsZCNfxLyLkig== Received: by mail-lf1-f46.google.com with SMTP id f34so12563195lfv.10; Sun, 25 Dec 2022 01:01:31 -0800 (PST) X-Gm-Message-State: AFqh2kqLziac63oQm34D4BVSnxJBwNkc4jj7Ixi44c6Nfcpa34ILJW2m uTuzvrNsmqlfTDiY5ksi76f970/R3K0mE/K9YWo= X-Received: by 2002:a05:6512:15a3:b0:4bc:bdf5:f163 with SMTP id bp35-20020a05651215a300b004bcbdf5f163mr747945lfb.583.1671958889737; Sun, 25 Dec 2022 01:01:29 -0800 (PST) MIME-Version: 1.0 References: <26bd2928-9d62-32b3-4f9f-9dd9293cefeb@leemhuis.info> <0ab93345-18e1-15c9-a4a3-066ea1cd862b@leemhuis.info> In-Reply-To: From: Ard Biesheuvel Date: Sun, 25 Dec 2022 10:01:18 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: BUG: arm64: missing build-id from vmlinux To: Masahiro Yamada Cc: Thorsten Leemhuis , Will Deacon , linux-arch@vger.kernel.org, Nicolas Schier , linux-kernel@vger.kernel.org, Dennis Gilmore , "regressions@lists.linux.dev" , Catalin Marinas , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 25 Dec 2022 at 03:17, Masahiro Yamada wrote: > > On Thu, Dec 22, 2022 at 8:53 PM Ard Biesheuvel wrote: > > > > On Wed, 21 Dec 2022 at 17:29, Thorsten Leemhuis > > wrote: > > > > > > On 21.12.22 16:39, Masahiro Yamada wrote: > > > > On Wed, Dec 21, 2022 at 5:23 PM Thorsten Leemhuis > > > > wrote: > > > >> > > > >> Hi, this is your Linux kernel regression tracker. CCing the regres= sion > > > >> mailing list, as it should be in the loop for all regressions: > > > >> https://docs.kernel.org/admin-guide/reporting-regressions.html > > > >> > > > >> On 18.12.22 21:51, Dennis Gilmore wrote: > > > >>> The changes in https://lore.kernel.org/linux-arm-kernel/166783716= 442.32724.935158280857906499.b4-ty@kernel.org/T/ > > > >>> result in vmlinux no longer having a build-id. > > > >> > > > >> FWIW, that's 994b7ac1697b ("arm64: remove special treatment for th= e link > > > >> order of head.o") from Masahiro merged through Will this cycle. > > > >> > > > >>> At the least, this > > > >>> causes rpm builds to fail. Reverting the patch does bring back a > > > >>> build-id, but there may be a different way to fix the regression > > > >> > > > >> Makes me wonder if other distros or CIs relying on the build-id ar= e > > > >> broken, too. > > > >> > > > >> Anyway, the holiday season is upon us, hence I also wonder if it w= ould > > > >> be best to revert above change quickly and leave further debugging= for 2023. > > > >> > > > >> Masahiro, Will, what's your option on this? > > > > > > Masahiro, many thx for looking into this. > > > > > > > I do not understand why you rush into the revert so quickly. > > > > We are before -rc1. > > > > We have 7 weeks before the 6.2 release > > > > (assuming we will have up to -rc7). > > > > > > > > If we get -rc6 or -rc7 and we still do not > > > > solve the issue, we should consider reverting it. > > > > > > Because it looked like a regression that makes it harder for people a= nd > > > CI systems to build and test mainline. To quote > > > Documentation/process/handling-regressions.rst ( > > > https://docs.kernel.org/process/handling-regressions.html ): > > > > > > """ > > > * Fix regressions within two or three days, if they are critical for > > > some reason =E2=80=93 for example, if the issue is likely to affect m= any users > > > of the kernel series in question on all or certain architectures. Not= e, > > > this includes mainline, as issues like compile errors otherwise might > > > prevent many testers or continuous integration systems from testing t= he > > > series. > > > """ > > > > > > I suspect that other distros rely on the build-id as well. Maybe I'm > > > wrong with that, but even if only Fedora and derivatives are effected= it > > > will annoy some people. Sure, each can apply the revert, but before t= hat > > > everyone affected will spend time debugging the issue first. A quick > > > revert in mainline (with a reapply later together with a fix) thus IM= HO > > > is the most efficient approach afaics. > > > > > > > Agree with Masahiro here. > > > > The issue seems to be caused by the fact that whichever object gets > > linked first gets to decide the type of a section, and so the .notes > > section will be of type NOTE if head.o gets linked first, or PROGBITS > > otherwise. The latter PROGBITS type seems to be the result of the > > compiler emitting .note.GNU-stack as PROGBITS rather than NOTE. > > > > The hunk below fixes it for me, by avoiding notes emitted as PROGBITS. > > I'll leave it to Masahiro to decide whether this should be fixed for > > arm64 only or for all architectures, but I suspect the latter would be > > most appropriate. > > > > Note that the kernel's rpm-pkg and binrpm-pkg targets seem to be > > unaffected by this. > > > Thanks for root-causing this. > > > I like to fix this for all architectures because riscv is also broken. > > https://lore.kernel.org/lkml/20221224192751.810363-1-masahiroy@kernel.org= / > > > > > > diff --git a/arch/arm64/include/asm/assembler.h > > b/arch/arm64/include/asm/assembler.h > > index 376a980f2bad08bb..10a172601fe7f53f 100644 > > --- a/arch/arm64/include/asm/assembler.h > > +++ b/arch/arm64/include/asm/assembler.h > > @@ -818,7 +818,7 @@ alternative_endif > > > > #ifdef GNU_PROPERTY_AARCH64_FEATURE_1_DEFAULT > > .macro emit_aarch64_feature_1_and, feat=3DGNU_PROPERTY_AARCH64_FEATURE= _1_DEFAULT > > - .pushsection .note.gnu.property, "a" > > + .pushsection .note.gnu.property, "a", %note > > .align 3 > > .long 2f - 1f > > .long 6f - 3f > > > I did not fold this hunk in my patch. > > I compiled with CONFIG_ARM64_BTI_KERNEL=3Dy. > > .note.gnu.property section in VDSO was already NOTE > without this hunk. > You're right - the VDSO is completely separate anyway, so this should not be needed. It did seem to make a difference when I was playing around with this, but I probably made a mistake somewhere, as this macro is never used in .o files that are actually linked into vmlinux