From mboxrd@z Thu Jan 1 00:00:00 1970 From: Masami Hiramatsu Date: Sun, 11 Jul 2021 01:16:33 +0000 Subject: Re: [PATCH 1/2] objtool: Add frame-pointer-specific function ignore Message-Id: <20210711101633.eaceff78742984c641993ced@kernel.org> List-Id: 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> In-Reply-To: <20210710192433.x5cgjsq2ksvaqnss@treble> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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. Looks good to me. Reviewed-by: Masami Hiramatsu Thanks! > > 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