Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4234129iob; Sun, 8 May 2022 07:00:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycJDPLb2TNeQj33AJJLw3rAqdV3GCNe42Sd8fM8sFKeIueDsu8MacE/5KJofn1/O5iGNla X-Received: by 2002:a17:907:6096:b0:6f7:afe7:83e1 with SMTP id ht22-20020a170907609600b006f7afe783e1mr7147587ejc.469.1652018443416; Sun, 08 May 2022 07:00:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652018443; cv=none; d=google.com; s=arc-20160816; b=xhNpf5f1NnkOuWl1PiBKiwOXQT0iEw9BMEtVKtrr520pqasVSI7BF4v3YjeXr+r10i 8ZwwtmFnJTopL4dNlok0pjf+YOOSh+d6WXjulMS5qiqIrgrAU80Ga/Ztf7f1jh8Knexp 9UM2JX8tvxI56BFMjuyke80rsAI/sk0GdxAzhvuEY8JP5u9jtisUsxtVZVZ/9d6T+k4a nL4sggwuTtBOcc8D8A5fa7XtMfBKrRtSSuGo0gZbYF5GeMW97LUogC8nTazIRC4skDsk Bq7OQXvZaHI/ZtPV1Kfi/XMII6seDWJLo+FZlIfbZNr5/xIYrntJeLIV7QZWFzFGVW8j 5MbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id:dkim-signature; bh=mFmzTI5Jo03LraXZTYkocBmZeHsWILnBwKFw/f1K7rw=; b=Hs2tww+d5Qtt6ERRIorQvxqdQIooMEp81pM/BW0xaPpLy7igiYxwKx3WxBLTv9cusI jnxmuPcAqYS3CYjE1XWlQHepL1T5OPdY73WdSQKv3oW5kQCt9mkS/cyOqlxTfyuSL7cw GfRIsZA/TLYBiO2Stpruh0w6yG9rwbJnBGPIwXszHdsg+bQtxG06SGqCgb9Qtsfa6hsK NM+bmxmzSrVjPk5IC5Vs1bd1x1zSIlWfLE4j/SbFpe4MHqMw6RlblRIJ+btIc/Bkp0da hNTcGhSPofII/V5F4ySm+wCY5sDGDaPOENUKifF848f+J9+wa/aBESG3k34plAhEItg4 lESg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=pt4LB9+M; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z8-20020a50eb48000000b00418c2b5bd7bsi9126977edp.93.2022.05.08.06.59.49; Sun, 08 May 2022 07:00:41 -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=@infradead.org header.s=desiato.20200630 header.b=pt4LB9+M; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1391738AbiEFMY2 (ORCPT + 99 others); Fri, 6 May 2022 08:24:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234150AbiEFMYS (ORCPT ); Fri, 6 May 2022 08:24:18 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0705618E3A for ; Fri, 6 May 2022 05:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=mFmzTI5Jo03LraXZTYkocBmZeHsWILnBwKFw/f1K7rw=; b=pt4LB9+M5XKlyUtn4fETy686Wd KxEK/BBAFxufij8k8IEjUUTnBXmzG1/um+FUQr5bt1u2TLgBA9oACNnTOqCYsV17t7IsL45bfolWC q4oo9iA0X34NoDaBKcBK6vnw4w/ZI1JmpxOzW01AOc2HTtCDN3IFreOvCGprRSBr10iW+/9kdXeAU UK5x2NSxhnLhh7devnMvLKD8WvGCJieU4xi6c6wiVHiNgJcQgoJ9Rfq/ZlNBLjb/PxRMuWKDIJ/hL zTlyIMwoYy9mWe1fk1j6pJ/cYLUeHwIwzm+0Z3dNvkAYIYfXyhHSQTobcZyEjd8BwqumE/9eEwYlP cQXH6oRw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmwwU-00BfTX-Ab; Fri, 06 May 2022 12:20:18 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 428BA3007E8; Fri, 6 May 2022 14:20:16 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id 03D7E2026BB48; Fri, 6 May 2022 14:20:16 +0200 (CEST) Message-ID: <20220506121631.508692613@infradead.org> User-Agent: quilt/0.66 Date: Fri, 06 May 2022 14:14:37 +0200 From: Peter Zijlstra To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, jpoimboe@redhat.com, brgerst@gmail.com, jiangshanlai@gmail.com, Andrew.Cooper3@citrix.com, mark.rutland@arm.com Subject: [PATCH 6/6] objtool: Fix STACK_FRAME_NON_STANDARD reloc type References: <20220506121431.563656641@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 STACK_FRAME_NON_STANDARD results in inconsistent relocation types depending on .c or .S usage: Relocation section '.rela.discard.func_stack_frame_non_standard' at offset 0x3c01090 contains 5 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000000000 00020c2200000002 R_X86_64_PC32 0000000000047b40 do_suspend_lowlevel + 0 0000000000000008 0002461e00000001 R_X86_64_64 00000000000480a0 machine_real_restart + 0 0000000000000010 0000001400000001 R_X86_64_64 0000000000000000 .rodata + b3d4 0000000000000018 0002444600000002 R_X86_64_PC32 00000000000678a0 __efi64_thunk + 0 0000000000000020 0002659d00000001 R_X86_64_64 0000000000113160 __crash_kexec + 0 Signed-off-by: Peter Zijlstra (Intel) --- include/linux/objtool.h | 4 +++- tools/include/linux/objtool.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) --- a/include/linux/objtool.h +++ b/include/linux/objtool.h @@ -2,6 +2,8 @@ #ifndef _LINUX_OBJTOOL_H #define _LINUX_OBJTOOL_H +#include + #ifndef __ASSEMBLY__ #include @@ -137,7 +139,7 @@ struct unwind_hint { .macro STACK_FRAME_NON_STANDARD func:req .pushsection .discard.func_stack_frame_non_standard, "aw" - .long \func - . + _ASM_PTR \func .popsection .endm --- a/tools/include/linux/objtool.h +++ b/tools/include/linux/objtool.h @@ -2,6 +2,8 @@ #ifndef _LINUX_OBJTOOL_H #define _LINUX_OBJTOOL_H +#include + #ifndef __ASSEMBLY__ #include @@ -137,7 +139,7 @@ struct unwind_hint { .macro STACK_FRAME_NON_STANDARD func:req .pushsection .discard.func_stack_frame_non_standard, "aw" - .long \func - . + _ASM_PTR \func .popsection .endm