Files
Ryan Lee 69e83e5527 apparmor: ensure WB_HISTORY_SIZE value is a power of 2
[ Upstream commit 6c055e6256 ]

WB_HISTORY_SIZE was defined to be a value not a power of 2, despite a
comment in the declaration of struct match_workbuf stating it is and a
modular arithmetic usage in the inc_wb_pos macro assuming that it is. Bump
WB_HISTORY_SIZE's value up to 32 and add a BUILD_BUG_ON_NOT_POWER_OF_2
line to ensure that any future changes to the value of WB_HISTORY_SIZE
respect this requirement.

Fixes: 136db99485 ("apparmor: increase left match history buffer size")

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-28 16:24:11 +02:00
..
2021-01-24 14:27:20 +01:00
2020-08-23 17:36:59 -05:00
2020-01-18 15:36:58 -08:00