Ingo Molnar 535d0ae391 x86/cfi: Only define poison_cfi() if CONFIG_X86_KERNEL_IBT=y
poison_cfi() was introduced in:

  9831c6253ace ("x86/cfi: Extend ENDBR sealing to kCFI")

... but it's only ever used under CONFIG_X86_KERNEL_IBT=y,
and if that option is disabled, we get:

  arch/x86/kernel/alternative.c:1243:13: error: ‘poison_cfi’ defined but not used [-Werror=unused-function]

Guard the definition with CONFIG_X86_KERNEL_IBT.

Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Sami Tolvanen <samitolvanen@google.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2023-07-11 10:17:55 +02:00
..
2023-07-10 09:52:25 +02:00
2023-06-27 14:43:02 -07:00
2023-07-10 09:52:25 +02:00
2023-07-03 15:32:22 -07:00
2023-06-27 14:14:30 -07:00
2023-06-28 20:35:21 -07:00
2023-07-01 11:40:01 -07:00
2023-06-27 21:24:18 -07:00
2023-04-08 13:45:37 -07:00
2023-06-29 11:00:17 -07:00
2022-07-25 10:32:32 +02:00
2023-06-30 10:33:17 -07:00
2023-05-15 20:03:08 +02:00