File: gcc-static-local-var-5.patch

package info (click to toggle)
kpatch 0.9.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,716 kB
  • sloc: ansic: 9,716; sh: 2,592; makefile: 260; asm: 35
file content (45 lines) | stat: -rw-r--r-- 1,146 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff -Nupr src.orig/kernel/audit.c src/kernel/audit.c
--- src.orig/kernel/audit.c	2020-05-12 11:24:26.314915742 -0400
+++ src/kernel/audit.c	2020-05-12 11:24:37.024451603 -0400
@@ -321,6 +321,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;
@@ -331,6 +337,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);
@@ -350,6 +357,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
@@ -396,6 +408,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;