]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/ibt: Clean up poison_endbr()
authorPeter Zijlstra <peterz@infradead.org>
Fri, 7 Feb 2025 12:15:37 +0000 (13:15 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 14 Feb 2025 09:32:06 +0000 (10:32 +0100)
commitc4239a72a29d58a4377c2db8583c24f9e2b79d01
tree652aa71c184ff159abc65eae5f3ac3524529d5cc
parentc20ad96c9a8f0aeaf4e4057730a22de2657ad0c2
x86/ibt: Clean up poison_endbr()

Basically, get rid of the .warn argument and explicitly don't call the
function when we know there isn't an endbr. This makes the calling
code clearer.

Note: perhaps don't add functions to .cfi_sites when the function
doesn't have endbr -- OTOH why would the compiler emit the prefix if
it has already determined there are no indirect callers and has
omitted the ENDBR instruction.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Link: https://lore.kernel.org/r/20250207122546.815505775@infradead.org
arch/x86/kernel/alternative.c