x86/ibt: Add ANNOTATE_NOENDBR
authorPeter Zijlstra <peterz@infradead.org>
Tue, 8 Mar 2022 15:30:18 +0000 (16:30 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 15 Mar 2022 09:32:33 +0000 (10:32 +0100)
commitc8c301abeae58ec756b8fcb2178a632bd3c9e284
tree161ef8d2c0cc432927046dbe9aa867c608747a9d
parent156ff4a544ae13c5fd6759a09ecb069f7059c1a1
x86/ibt: Add ANNOTATE_NOENDBR

In order to have objtool warn about code references to !ENDBR
instruction, we need an annotation to allow this for non-control-flow
instances -- consider text range checks, text patching, or return
trampolines etc.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/20220308154317.578968224@infradead.org
include/linux/objtool.h
tools/include/linux/objtool.h