linux/include/asm-generic
Shida Zhang 1fa568e26f bug: Have __warn() prototype defined unconditionally
The __warn() prototype is declared in CONFIG_BUG scope but the function
definition in panic.c is unconditional. The IBT enablement started using
it unconditionally but a CONFIG_X86_KERNEL_IBT=y, CONFIG_BUG=n .config
will trigger a

  arch/x86/kernel/traps.c: In function ‘__exc_control_protection’:
  arch/x86/kernel/traps.c:249:17: error: implicit declaration of function \
  	  ‘__warn’; did you mean ‘pr_warn’? [-Werror=implicit-function-declaration]

Pull up the declarations so that they're unconditionally visible too.

  [ bp: Rewrite commit message. ]

Fixes: 991625f3dd2c ("x86/ibt: Add IBT feature, MSR and #CP handling")
Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Shida Zhang <zhangshida@kylinos.cn>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220426032007.510245-1-starzhangzsd@gmail.com
2022-04-26 10:59:57 +02:00
..
2022-02-25 09:36:06 +01:00
2017-11-15 13:28:48 -08:00
2022-01-22 09:22:10 +02:00
2021-11-17 10:36:15 -05:00
2021-12-11 23:31:51 +01:00
2021-10-08 11:57:54 -07:00
2021-02-24 16:32:23 -08:00
2021-06-29 10:53:55 -07:00
2020-01-23 10:41:16 -08:00
2021-01-20 09:30:45 +01:00
2018-05-07 07:15:41 +02:00
2022-02-25 09:36:06 +01:00