Re: [PATCH] compiler.h: Fix undefined BUILD_BUG_ON_ZERO()
From: Kees Cook
Date: Sun Nov 17 2024 - 00:26:51 EST
On Fri, 15 Nov 2024 21:46:02 +0100, Philipp Reisner wrote:
> <linux/compiler.h> defines __must_be_array() and __must_be_cstr() and
> both expand to BUILD_BUG_ON_ZERO(), but <linux/build_bug.h> defines
> BUILD_BUG_ON_ZERO(). Including <linux/build_bug.h> in
> <linux/compiler.h> would create a cyclic dependency as
> <linux/build_bug.h> already includes <linux/compiler.h>.
>
> Fix that by defining __BUILD_BUG_ON_ZERO_MSG() in <linux/compiler.h>
> and using that for __must_be_array() and __must_be_cstr().
>
> [...]
Applied to for-next/hardening, thanks!
[1/1] compiler.h: Fix undefined BUILD_BUG_ON_ZERO()
https://git.kernel.org/kees/c/d7a516c6eeae
Take care,
--
Kees Cook