Skip to content

Commit 24fe172

Browse files
jpoimboeingomolnar
authored andcommitted
objtool: Fix up some outdated references to ENTRY/ENDPROC
ENTRY and ENDPROC were deprecated years ago and replaced with SYM_FUNC_{START,END}. Fix up a few outdated references in the objtool documentation and comments. Also fix a few typos. Suggested-by: Brendan Jackman <jackmanb@google.com> Suggested-by: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/5eb7e06e1a0e87aaeda8d583ab060e7638a6ea8e.1742852846.git.jpoimboe@kernel.org
1 parent d39f82a commit 24fe172

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

include/linux/linkage.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,6 @@
134134
.size name, .-name
135135
#endif
136136

137-
/* If symbol 'name' is treated as a subroutine (gets called, and returns)
138-
* then please use ENDPROC to mark 'name' as STT_FUNC for the benefit of
139-
* static analysis tools such as stack depth analyzer.
140-
*/
141137
#ifndef ENDPROC
142138
/* deprecated, use SYM_FUNC_END */
143139
#define ENDPROC(name) \

include/linux/objtool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
* In asm, there are two kinds of code: normal C-type callable functions and
7070
* the rest. The normal callable functions can be called by other code, and
7171
* don't do anything unusual with the stack. Such normal callable functions
72-
* are annotated with the ENTRY/ENDPROC macros. Most asm code falls in this
72+
* are annotated with SYM_FUNC_{START,END}. Most asm code falls in this
7373
* category. In this case, no special debugging annotations are needed because
7474
* objtool can automatically generate the ORC data for the ORC unwinder to read
7575
* at runtime.

tools/objtool/Documentation/objtool.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Objtool has the following features:
3434
- Return thunk annotation -- annotates all return thunk sites so kernel
3535
can patch them inline, depending on enabled mitigations
3636

37-
- Return thunk training valiation -- validate that all entry paths
37+
- Return thunk untraining validation -- validate that all entry paths
3838
untrain a "safe return" before the first return (or call)
3939

4040
- Non-instrumentation validation -- validates non-instrumentable
@@ -281,8 +281,8 @@ the objtool maintainers.
281281
If the error is for an asm file, and func() is indeed a callable
282282
function, add proper frame pointer logic using the FRAME_BEGIN and
283283
FRAME_END macros. Otherwise, if it's not a callable function, remove
284-
its ELF function annotation by changing ENDPROC to END, and instead
285-
use the manual unwind hint macros in asm/unwind_hints.h.
284+
its ELF function annotation by using SYM_CODE_{START,END} and use the
285+
manual unwind hint macros in asm/unwind_hints.h.
286286

287287
If it's a GCC-compiled .c file, the error may be because the function
288288
uses an inline asm() statement which has a "call" instruction. An
@@ -352,7 +352,7 @@ the objtool maintainers.
352352
This is a kernel entry/exit instruction like sysenter or iret. Such
353353
instructions aren't allowed in a callable function, and are most
354354
likely part of the kernel entry code. Such code should probably be
355-
placed in a SYM_FUNC_CODE block with unwind hints.
355+
placed in a SYM_CODE_{START,END} block with unwind hints.
356356

357357

358358
6. file.o: warning: objtool: func()+0x26: sibling call from callable instruction with modified stack frame
@@ -381,7 +381,7 @@ the objtool maintainers.
381381

382382
Another possibility is that the code has some asm or inline asm which
383383
does some unusual things to the stack or the frame pointer. In such
384-
cases it's probably appropriate to use SYM_FUNC_CODE with unwind
384+
cases it's probably appropriate to use SYM_CODE_{START,END} with unwind
385385
hints.
386386

387387

0 commit comments

Comments
 (0)