mirror of
https://github.com/dynup/kpatch
synced 2024-12-21 04:39:57 +00:00
76ebcd2fa4
This commit contains centos-7 patches rebased and adjusted to work with recent rhel minors so that integration tests actually pass on those. Signed-off-by: Artem Savkov <asavkov@redhat.com>
46 lines
1.1 KiB
Diff
46 lines
1.1 KiB
Diff
diff -Nupr src.orig/kernel/audit.c src/kernel/audit.c
|
|
--- src.orig/kernel/audit.c 2017-09-22 15:27:21.602055778 -0400
|
|
+++ src/kernel/audit.c 2017-09-22 15:27:34.429108894 -0400
|
|
@@ -205,6 +205,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;
|
|
@@ -215,6 +221,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);
|
|
@@ -234,6 +241,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
|
|
@@ -282,6 +294,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;
|