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 X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2BAFC4320A for ; Thu, 29 Jul 2021 02:31:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C29BE6103A for ; Thu, 29 Jul 2021 02:31:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233484AbhG2Cbv (ORCPT ); Wed, 28 Jul 2021 22:31:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:36834 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233256AbhG2Cbt (ORCPT ); Wed, 28 Jul 2021 22:31:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0049F60EE6; Thu, 29 Jul 2021 02:31:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627525906; bh=5/HPsHebrbOaMgQbW5JROk/C+DP2BAD0a73b/obXv4E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LhrofssXNc8Asa7WCNotX/fpvkxjERXBZds7ZUxQkbKAbYauuuF4PSE8TbH44qL7p UCOD1bewpwnhFALcDbG7PRV7F1RPI2ASbxFrQmi40oBTtRz7qlThZOQWREU0jl40un FCubINpWAI6di76VWiysZ6FRiHWB4x8lL9v9D+TxvYPgsOnO/Ts/v5lai6lL3I0olW BJczbN72y3HNFGiEmlrFyRc5pBjrRMzXcfDpplE71IQucpUO2NVVz3lILgKFgnBotr vgT3Bas/bHRgV2tZkkdjvefeyWF59jq5s8rOhQhZpc+lrvYiWjC8BiHF4jqoUlLjax AVnklcWhu3+rA== Date: Thu, 29 Jul 2021 11:31:42 +0900 From: Masami Hiramatsu To: Josh Poimboeuf Cc: Ingo Molnar , Steven Rostedt , X86 ML , Daniel Xu , linux-kernel@vger.kernel.org, bpf@vger.kernel.org, kuba@kernel.org, mingo@redhat.com, ast@kernel.org, Thomas Gleixner , Borislav Petkov , Peter Zijlstra , kernel-team@fb.com, yhs@fb.com, linux-ia64@vger.kernel.org, Abhishek Sagar , Andrii Nakryiko Subject: Re: [PATCH 1/2] objtool: Add frame-pointer-specific function ignore Message-Id: <20210729113142.b0b26ad823e2350680347473@kernel.org> In-Reply-To: <20210710192433.x5cgjsq2ksvaqnss@treble> References: <162399992186.506599.8457763707951687195.stgit@devnote2> <162399996966.506599.810050095040575221.stgit@devnote2> <20210710003140.8e561ad33d42f9ac78de6a15@kernel.org> <20210710104104.3a270168811ac38420093276@kernel.org> <20210710190143.lrcsyal2ggubv43v@treble> <20210710192433.x5cgjsq2ksvaqnss@treble> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Josh, I found one mistake on this patch. You have to add STACK_FRAME_NON_STANDARD_FP() in case of !CONFIG_STACK_VALIDATION. diff --git a/include/linux/objtool.h b/include/linux/objtool.h index c9575ed91052..aca52db2f3f3 100644 --- a/include/linux/objtool.h +++ b/include/linux/objtool.h @@ -138,6 +138,7 @@ struct unwind_hint { #define UNWIND_HINT(sp_reg, sp_offset, type, end) \ "\n\t" #define STACK_FRAME_NON_STANDARD(func) +#define STACK_FRAME_NON_STANDARD_FP(func) #else #define ANNOTATE_INTRA_FUNCTION_CALL .macro UNWIND_HINT sp_reg:req sp_offset=0 type:req end=0 Anyway, I will send my series including these patches and this fix as v10. Thank you, On Sat, 10 Jul 2021 12:24:33 -0700 Josh Poimboeuf wrote: > Add a CONFIG_FRAME_POINTER-specific version of > STACK_FRAME_NON_STANDARD() for the case where a function is > intentionally missing frame pointer setup, but otherwise needs > objtool/ORC coverage when frame pointers are disabled. > > Signed-off-by: Josh Poimboeuf > --- > include/linux/objtool.h | 11 +++++++++++ > tools/include/linux/objtool.h | 11 +++++++++++ > 2 files changed, 22 insertions(+) > > diff --git a/include/linux/objtool.h b/include/linux/objtool.h > index 7e72d975cb76..c9575ed91052 100644 > --- a/include/linux/objtool.h > +++ b/include/linux/objtool.h > @@ -66,6 +66,17 @@ struct unwind_hint { > static void __used __section(".discard.func_stack_frame_non_standard") \ > *__func_stack_frame_non_standard_##func = func > > +/* > + * STACK_FRAME_NON_STANDARD_FP() is a frame-pointer-specific function ignore > + * for the case where a function is intentionally missing frame pointer setup, > + * but otherwise needs objtool/ORC coverage when frame pointers are disabled. > + */ > +#ifdef CONFIG_FRAME_POINTER > +#define STACK_FRAME_NON_STANDARD_FP(func) STACK_FRAME_NON_STANDARD(func) > +#else > +#define STACK_FRAME_NON_STANDARD_FP(func) > +#endif > + > #else /* __ASSEMBLY__ */ > > /* > diff --git a/tools/include/linux/objtool.h b/tools/include/linux/objtool.h > index 7e72d975cb76..c9575ed91052 100644 > --- a/tools/include/linux/objtool.h > +++ b/tools/include/linux/objtool.h > @@ -66,6 +66,17 @@ struct unwind_hint { > static void __used __section(".discard.func_stack_frame_non_standard") \ > *__func_stack_frame_non_standard_##func = func > > +/* > + * STACK_FRAME_NON_STANDARD_FP() is a frame-pointer-specific function ignore > + * for the case where a function is intentionally missing frame pointer setup, > + * but otherwise needs objtool/ORC coverage when frame pointers are disabled. > + */ > +#ifdef CONFIG_FRAME_POINTER > +#define STACK_FRAME_NON_STANDARD_FP(func) STACK_FRAME_NON_STANDARD(func) > +#else > +#define STACK_FRAME_NON_STANDARD_FP(func) > +#endif > + > #else /* __ASSEMBLY__ */ > > /* > -- > 2.31.1 > -- Masami Hiramatsu