Re: [PATCH v2 03/12] objtool: Convert ANNOTATE_RETPOLINE_SAFE to ANNOTATE

From: Josh Poimboeuf
Date: Fri Nov 15 2024 - 14:11:42 EST


On Mon, Nov 11, 2024 at 12:59:38PM +0100, Peter Zijlstra wrote:
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> ---
> arch/x86/include/asm/nospec-branch.h | 13 +-------
> include/linux/objtool_types.h | 1
> tools/include/linux/objtool_types.h | 1
> tools/objtool/check.c | 52 ++++++++++++-----------------------
> 4 files changed, 22 insertions(+), 45 deletions(-)
>
> --- a/arch/x86/include/asm/nospec-branch.h
> +++ b/arch/x86/include/asm/nospec-branch.h
> @@ -193,12 +193,7 @@
> * objtool the subsequent indirect jump/call is vouched safe for retpoline
> * builds.
> */
> -.macro ANNOTATE_RETPOLINE_SAFE
> -.Lhere_\@:
> - .pushsection .discard.retpoline_safe
> - .long .Lhere_\@
> - .popsection
> -.endm
> +#define ANNOTATE_RETPOLINE_SAFE ANNOTATE type=ANNOTYPE_RETPOLINE_SAFE

I'm thinking it would be nice to put all the ANNOTATE_* definitions
in objtool.h so we can have all the annotations and their descriptions
in one place.

--
Josh