kpatch/test/integration/centos-7/gcc-static-local-var-5.patch
Joe Lawrence 11ce8102c2 testing: add and rebase integration tests for CentOS 7
Kernel version: 3.10.0-327.36.3.el7.x86_64
2016-12-16 16:06:28 -05:00

46 lines
1.1 KiB
Diff

diff -Nupr src.orig/kernel/audit.c src/kernel/audit.c
--- src.orig/kernel/audit.c 2016-11-30 19:51:04.288178250 +0000
+++ src/kernel/audit.c 2016-11-30 19:52:55.338178250 +0000
@@ -206,6 +206,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;
@@ -216,6 +222,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);
@@ -235,6 +242,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
@@ -283,6 +295,8 @@ static int audit_log_config_change(char
struct audit_buffer *ab;
int rc = 0;
+ kpatch_audit_check();
+
ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE);
if (unlikely(!ab))
return rc;