Skip to content

Commit 3d413f0

Browse files
committed
Merge tag 'audit-pr-20250527' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit
Pull audit updates from Paul Moore: - Always record AUDIT_ANOM events when auditing is enabled. Prior to this patch we only recorded AUDIT_ANOM events if auditing was enabled and the admin/distro had explicitly configured audit beyond the defaults. Considering that AUDIT_ANOM events are anomolous events considered to be "security relevant", it seems wise to record these events as long as auditing is enabled, even if the system is running with a default audit configuration. - Mark the audit_log_vformat() function with the __printf() attribute to quiet GCC. * tag 'audit-pr-20250527' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: record AUDIT_ANOM_* events regardless of presence of rules audit: mark audit_log_vformat() with __printf() attribute
2 parents b5628b8 + 654d61b commit 3d413f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/audit.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1956,8 +1956,8 @@ static inline int audit_expand(struct audit_buffer *ab, int extra)
19561956
* will be called a second time. Currently, we assume that a printk
19571957
* can't format message larger than 1024 bytes, so we don't either.
19581958
*/
1959-
static void audit_log_vformat(struct audit_buffer *ab, const char *fmt,
1960-
va_list args)
1959+
static __printf(2, 0)
1960+
void audit_log_vformat(struct audit_buffer *ab, const char *fmt, va_list args)
19611961
{
19621962
int len, avail;
19631963
struct sk_buff *skb;
@@ -2285,7 +2285,7 @@ void audit_log_path_denied(int type, const char *operation)
22852285
{
22862286
struct audit_buffer *ab;
22872287

2288-
if (!audit_enabled || audit_dummy_context())
2288+
if (!audit_enabled)
22892289
return;
22902290

22912291
/* Generate log with subject, operation, outcome. */

0 commit comments

Comments
 (0)