summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2026-08-13 13:52:13 -0400
committerPaul Moore <paul@paul-moore.com>2026-08-31 16:14:11 -0400
commit11d73af7b0830f278cca77804d2aa802525ec243 (patch)
treea0abed3502b29388d03bb04ac01286abf279dde6 /security
parente26307d83048803274837abf33f65396a88e21ac (diff)
lsm: update the BUILD_BUG_ON() in audit_log_lsm_data()
On 32-bit systems the newly added namespace fields in the common_audit_data struct exceed the BUILD_BUG_ON(sizeof(void *) * 2) size check in audit_log_lsm_data(). Convert the size check to two u64 types to both fit the new fields and move to a size that is not architecture dependent. Fixes: bb20ca26f960 ("lsm: add LSM_AUDIT_DATA_NS for namespace audit records") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202608131232.Owej9tlx-lkp@intel.com/ Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r--security/lsm_audit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/lsm_audit.c b/security/lsm_audit.c
index 404ccbbbf94c..29116ef2986b 100644
--- a/security/lsm_audit.c
+++ b/security/lsm_audit.c
@@ -182,7 +182,7 @@ void audit_log_lsm_data(struct audit_buffer *ab,
* start making this union too large! See struct lsm_network_audit
* as an example of how to deal with large data.
*/
- BUILD_BUG_ON(sizeof(a->u) > sizeof(void *)*2);
+ BUILD_BUG_ON(sizeof(a->u) > (sizeof(u64) * 2));
switch (a->type) {
case LSM_AUDIT_DATA_NONE: