On 17.08.2021 12:56, Andrew Cooper wrote:
> Some versions of GCC complain with:
>
> traps.c:405:22: error: 'get_shstk_bottom' defined but not used
> [-Werror=unused-function]
> static unsigned long get_shstk_bottom(unsigned long sp)
> ^~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
>
> Change #ifdef to if ( IS_ENABLED(...) ) to make the sole user of
> get_shstk_bottom() visible to the compiler.
>
> Fixes: 35727551c070 ("x86/cet: Fix shskt manipulation error with
> BUGFRAME_{warn,run_fn}")
> Signed-off-by: Andrew Cooper <[email protected]>
Reviewed-by: Jan Beulich <[email protected]>
> Not actually tested. I don't seem to have a new enough GCC to hand.
Compile-tested-by: Jan Beulich <[email protected]>
Jan