Re: [PATCH] lkdtm/bugs: In lkdtm_HUNG_TASK() use BUG(), not BUG_ON(1)

From: Kees Cook
Date: Fri Jan 26 2024 - 13:30:35 EST


On Fri, 26 Jan 2024 07:28:53 -0800, Douglas Anderson wrote:
> In commit edb6538da3df ("lkdtm/bugs: Adjust lkdtm_HUNG_TASK() to avoid
> tail call optimization") we marked lkdtm_HUNG_TASK() as
> __noreturn. The compiler gets unhappy if it thinks a __noreturn
> function might return, so there's a BUG_ON(1) at the end. Any human
> can see that the function won't return and the compiler can figure
> that out too. Except when it can't.
>
> [...]

Applied to for-next/hardening, thanks!

[1/1] lkdtm/bugs: In lkdtm_HUNG_TASK() use BUG(), not BUG_ON(1)
https://git.kernel.org/kees/c/34b82a2fb747

Take care,

--
Kees Cook