diff -Nupr src.orig/kernel/audit.c src/kernel/audit.c --- src.orig/kernel/audit.c 2023-05-18 13:26:13.449170627 -0400 +++ src/kernel/audit.c 2023-05-18 13:27:02.109113288 -0400 @@ -327,6 +327,12 @@ void audit_panic(const char *message) } } +void kpatch_audit_foo(void) +{ + if (!jiffies) + printk("kpatch audit foo\n"); +} + static inline int audit_rate_check(void) { static unsigned long last_check = 0; @@ -337,6 +343,7 @@ static inline int audit_rate_check(void) unsigned long elapsed; int retval = 0; + kpatch_audit_foo(); if (!audit_rate_limit) return 1; spin_lock_irqsave(&lock, flags); @@ -356,6 +363,11 @@ static inline int audit_rate_check(void) return retval; } +noinline void kpatch_audit_check(void) +{ + audit_rate_check(); +} + /** * audit_log_lost - conditionally log lost audit message event * @message: the message stating reason for lost audit message @@ -402,6 +414,8 @@ static int audit_log_config_change(char struct audit_buffer *ab; int rc = 0; + kpatch_audit_check(); + ab = audit_log_start(audit_context(), GFP_KERNEL, AUDIT_CONFIG_CHANGE); if (unlikely(!ab)) return rc;