[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.21.2503171143290.4236@pobox.suse.cz>
Date: Mon, 17 Mar 2025 11:46:53 +0100 (CET)
From: Miroslav Benes <mbenes@...e.cz>
To: Josh Poimboeuf <jpoimboe@...nel.org>
cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Brendan Jackman <jackmanb@...gle.com>,
Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH 04/13] objtool: Update documentation
Hi,
> 1. Each callable function must be annotated as such with the ELF
> function type. In asm code, this is typically done using the
> - ENTRY/ENDPROC macros. If objtool finds a return instruction
> + SYM_FUNC_{START,END} macros. If objtool finds a return instruction
> outside of a function, it flags an error since that usually indicates
> callable code which should be annotated accordingly.
there is one more occurrence of ENDPROC/END under "1. file.o: warning:
objtool: func()+0x128: call without frame pointer save/setup" section
which might be nice to update as well.
> @@ -339,23 +351,21 @@ the objtool maintainers.
>
> This is a kernel entry/exit instruction like sysenter or iret. Such
> instructions aren't allowed in a callable function, and are most
> - likely part of the kernel entry code. They should usually not have
> - the callable function annotation (ENDPROC) and should always be
> - annotated with the unwind hint macros in asm/unwind_hints.h.
> + likely part of the kernel entry code. Such code should probably be
> + placed in a SYM_FUNC_CODE block with unwind hints.
SYM_CODE_{START,END} block?
> 7. file: warning: objtool: func()+0x5c: stack state mismatch
> @@ -371,8 +381,8 @@ the objtool maintainers.
>
> Another possibility is that the code has some asm or inline asm which
> does some unusual things to the stack or the frame pointer. In such
> - cases it's probably appropriate to use the unwind hint macros in
> - asm/unwind_hints.h.
> + cases it's probably appropriate to use SYM_FUNC_CODE with unwind
> + hints.
dtto
Miroslav
Powered by blists - more mailing lists