Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp588384iog; Thu, 30 Jun 2022 06:36:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sBiUYXJPxbb/noOc0bLfDuTgIRb86SqD3vUu+Y4bC23scfChyChPvABpG/mmiqdV2SHVGs X-Received: by 2002:a17:906:49d4:b0:6d6:e5ec:9a23 with SMTP id w20-20020a17090649d400b006d6e5ec9a23mr9465349ejv.79.1656596177499; Thu, 30 Jun 2022 06:36:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656596177; cv=none; d=google.com; s=arc-20160816; b=w/ZGWlj36rZMnAQFPX1POzJkDCgLW4QQxqYJC0texVcYnRmv8tKxZ2l2E25B3d0Qvq 83Hs7xkkqeW08hxzoDZ3JPtrIlwW/8GuXs7bw2rh2XYcHXXQHQrEw76Nyvxzo9sV4L8/ VGDmplMzPbkLk3gp3jDVSnODjj63c3kV1EwS21HmO2uE3gxI5pDtY/9r4cWdMMsXsQTb CXhCPGwO+sLn1Sy5wYvl4k6Txyl7C7692KmCK+CFfbJiAgml0nNPqdua3aw+aoEu5994 OM/+ia7IGu3ZRLg3kaCNqsQAl92a6bdZkJgG5RvuX/r0hJCThjB9DaJAqFVhxIvB5GhP 4oFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Pq/3fDlwEcfxt+rC0tpI38KpR8GeH6nM/Z8ZzuXC7uI=; b=X4iIPdGXXp12qAzwAu2qEz3Wriv/+mtPirBqSqH6/CQJHcpzUhDM0Tyolh0pkaSqRP ns0vb6GOjt/NbXHo759TyNjQl47BY65zFwmhKwOygA6vvQyromQHvOcbLkASOnSUKxvP v6/uVuF142oQ6p1LPL6lQX+RcfowoiUZNxgw86q1Kasa0VPM1ld8LpcuyptllfJTSUYT 89k6h8EUsSWTrz44Qx3hUknFQ8b0bcltdqF9KJ+b+wkILTldVjTiFMuFheiqh7PfQ82P FBaOCtTuc1+p7QvB5qXBThIvwr1Ml+rSYFJfdhvvdDep+8I9dLqKkOJP3QdbiED54KXe u1qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sPO7S7+b; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cr15-20020a170906d54f00b006f4b2a8c255si25319434ejc.113.2022.06.30.06.35.52; Thu, 30 Jun 2022 06:36:17 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=sPO7S7+b; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234255AbiF3NUk (ORCPT + 99 others); Thu, 30 Jun 2022 09:20:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230400AbiF3NUj (ORCPT ); Thu, 30 Jun 2022 09:20:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FCD92C65F; Thu, 30 Jun 2022 06:20:38 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id C6DE6B82A59; Thu, 30 Jun 2022 13:20:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04A5BC34115; Thu, 30 Jun 2022 13:20:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656595235; bh=Gjs1D9vdtTbVIpCgMrFXplqipTLraLCHH4B9AHCpl/4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sPO7S7+b+VQXn8XPN0Aw/4Cm1s3T9irr43M+Rxhf7IsLt0Z7FH7ZkueR5Fs8fNffu 5O1hEithJbc9BVXJ3XXFkLmP8iLjrMUzyFsVGbxhF+PkRy9C8fKnNqR0MAB8+fsaOH mBKZa/1WC/aN80kxm4eGk7DCzStxPLqGLvLerwlA= Date: Thu, 30 Jun 2022 15:20:32 +0200 From: Greg KH To: "Naveen N. Rao" Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kexec@lists.infradead.org, Michael Ellerman , "Eric W. Biederman" , Andrew Morton Subject: Re: [PATCH v4.9] kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add] Message-ID: References: <20220628154249.204911-3-naveen.n.rao@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220628154249.204911-3-naveen.n.rao@linux.vnet.ibm.com> X-Spam-Status: No, score=-7.5 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,T_SCC_BODY_TEXT_LINE 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 Tue, Jun 28, 2022 at 09:12:48PM +0530, Naveen N. Rao wrote: > commit 3e35142ef99fe6b4fe5d834ad43ee13cca10a2dc upstream. > > Since commit d1bcae833b32f1 ("ELF: Don't generate unused section > symbols") [1], binutils (v2.36+) started dropping section symbols that > it thought were unused. This isn't an issue in general, but with > kexec_file.c, gcc is placing kexec_arch_apply_relocations[_add] into a > separate .text.unlikely section and the section symbol ".text.unlikely" > is being dropped. Due to this, recordmcount is unable to find a non-weak > symbol in .text.unlikely to generate a relocation record against. > > Address this by dropping the weak attribute from these functions. > Instead, follow the existing pattern of having architectures #define the > name of the function they want to override in their headers. > > [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d1bcae833b32f1 > > [akpm@linux-foundation.org: arch/s390/include/asm/kexec.h needs linux/module.h] > Link: https://lkml.kernel.org/r/20220519091237.676736-1-naveen.n.rao@linux.vnet.ibm.com > Signed-off-by: Michael Ellerman > Signed-off-by: Naveen N. Rao > Cc: "Eric W. Biederman" > Cc: > Signed-off-by: Andrew Morton > --- > arch/x86/include/asm/kexec.h | 7 +++++++ > include/linux/kexec.h | 26 ++++++++++++++++++++++---- > kernel/kexec_file.c | 18 ------------------ > 3 files changed, 29 insertions(+), 22 deletions(-) > All now queued up, thanks. greg k-h