lsm: Add audit_log_lsm_data() helper
authorMickaël Salaün <mic@digikod.net>
Thu, 20 Mar 2025 19:06:50 +0000 (20:06 +0100)
committerMickaël Salaün <mic@digikod.net>
Wed, 26 Mar 2025 12:59:33 +0000 (13:59 +0100)
commit9b08a16637eeef4d6d3a8a3b69714e8930676248
treeed84cd4c829f4545b714a02228e91d49f435336c
parentc5efa393d82cf68812e0ae4d93e339873eabe9fe
lsm: Add audit_log_lsm_data() helper

Extract code from dump_common_audit_data() into the audit_log_lsm_data()
helper. This helps reuse common LSM audit data while not abusing
AUDIT_AVC records because of the common_lsm_audit() helper.

Depends-on: 7ccbe076d987 ("lsm: Only build lsm_audit.c if CONFIG_SECURITY and CONFIG_AUDIT are set")
Cc: Casey Schaufler <casey@schaufler-ca.com>
Cc: James Morris <jmorris@namei.org>
Cc: Serge E. Hallyn <serge@hallyn.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Link: https://lore.kernel.org/r/20250320190717.2287696-2-mic@digikod.net
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Mickaël Salaün <mic@digikod.net>
include/linux/lsm_audit.h
security/lsm_audit.c