Re: [PATCH 04/13] objtool: Update documentation

From: Brendan Jackman
Date: Mon Mar 17 2025 - 04:47:35 EST


On Fri, Mar 14, 2025 at 12:29:02PM -0700, Josh Poimboeuf wrote:
> Fix some outdated information in the objtool doc.

Regarding the switch from ENTRY/ENDPROC to SYM_FUNC_{START,END}, would
you mind adding a bit more context to the commit message for the
benefit of ignorami like me?

BTW in tip/objtool/core include/linux/objtool.h still says:

> Such normal callable functions
> are annotated with the ENTRY/ENDPROC macros.

And o we also wanna update include/linux/linkage.h to mention that
these macros are deprecated?

> Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
> ---
> tools/objtool/Documentation/objtool.txt | 95 ++++++++++++++-----------
> 1 file changed, 53 insertions(+), 42 deletions(-)
>
> diff --git a/tools/objtool/Documentation/objtool.txt b/tools/objtool/Documentation/objtool.txt
> index 87950a7aaa17..28ac57b9e102 100644
> --- a/tools/objtool/Documentation/objtool.txt
> +++ b/tools/objtool/Documentation/objtool.txt
> @@ -28,6 +28,15 @@ Objtool has the following features:
> sites, enabling the kernel to patch them inline, to prevent "thunk
> funneling" for both security and performance reasons
>
> +- Return thunk validation -- validates return thunks are used for
> + certain CPU mitigations including Retbleed and SRSO
> +
> +- Return thunk annotation -- annotates all return thunk sites so kernel
> + can patch them inline, depending on enabled mitigations
> +
> +- Return thunk training valiation -- validate that all entry paths

s/valiation/validation

Also did you mean "untraining"?

> + untrain a "safe return" before the first return (or call)

Nit - assuming this is about the SRSO mitigation I think it's better
to just refer concretely to "Safe RET" here (with the capitalisation).