-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1389 from ryanbsull/integration-tests-rhel-8.10-f…
…inal test/integration/rhel-8.10: add kernel-4.18.0-552.el8_10 tests
- Loading branch information
Showing
37 changed files
with
924 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff -Nupr src.orig/fs/proc/proc_sysctl.c src/fs/proc/proc_sysctl.c | ||
--- src.orig/fs/proc/proc_sysctl.c 2024-04-18 14:12:03.460375133 -0400 | ||
+++ src/fs/proc/proc_sysctl.c 2024-04-18 14:12:03.887374205 -0400 | ||
@@ -338,6 +338,8 @@ static void start_unregistering(struct c | ||
|
||
static struct ctl_table_header *sysctl_head_grab(struct ctl_table_header *head) | ||
{ | ||
+ if (jiffies == 0) | ||
+ printk("kpatch-test: testing __bug_table section changes\n"); | ||
BUG_ON(!head); | ||
spin_lock(&sysctl_lock); | ||
if (!use_table(head)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
grep kpatch=1 /proc/cmdline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff -Nupr src.orig/fs/proc/cmdline.c src/fs/proc/cmdline.c | ||
--- src.orig/fs/proc/cmdline.c 2024-04-18 14:12:03.460375133 -0400 | ||
+++ src/fs/proc/cmdline.c 2024-04-18 14:12:10.803359173 -0400 | ||
@@ -6,8 +6,7 @@ | ||
|
||
static int cmdline_proc_show(struct seq_file *m, void *v) | ||
{ | ||
- seq_puts(m, saved_command_line); | ||
- seq_putc(m, '\n'); | ||
+ seq_printf(m, "%s kpatch=1\n", saved_command_line); | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
grep "kpatch: 5" /proc/meminfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.c | ||
--- src.orig/fs/proc/meminfo.c 2024-04-18 14:12:03.460375133 -0400 | ||
+++ src/fs/proc/meminfo.c 2024-04-18 14:12:13.626353038 -0400 | ||
@@ -31,6 +31,8 @@ static void show_val_kb(struct seq_file | ||
seq_write(m, " kB\n", 4); | ||
} | ||
|
||
+static int foo = 5; | ||
+ | ||
static int meminfo_proc_show(struct seq_file *m, void *v) | ||
{ | ||
struct sysinfo i; | ||
@@ -150,6 +152,7 @@ static int meminfo_proc_show(struct seq_ | ||
show_val_kb(m, "CmaFree: ", | ||
global_zone_page_state(NR_FREE_CMA_PAGES)); | ||
#endif | ||
+ seq_printf(m, "kpatch: %d\n", foo); | ||
|
||
hugetlb_report_meminfo(m); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
diff -Nupr src.orig/net/core/dev.c src/net/core/dev.c | ||
--- src.orig/net/core/dev.c 2024-04-18 14:12:03.639374744 -0400 | ||
+++ src/net/core/dev.c 2024-04-18 14:12:15.656348626 -0400 | ||
@@ -5469,6 +5469,7 @@ skip_classify: | ||
case RX_HANDLER_PASS: | ||
break; | ||
default: | ||
+ printk("BUG!\n"); | ||
BUG(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
diff -Nupr src.orig/fs/readdir.c src/fs/readdir.c | ||
--- src.orig/fs/readdir.c 2024-04-18 14:12:03.462375128 -0400 | ||
+++ src/fs/readdir.c 2024-04-18 14:12:17.665344260 -0400 | ||
@@ -189,6 +189,7 @@ static int filldir(struct dir_context *c | ||
goto efault; | ||
} | ||
dirent = buf->current_dir; | ||
+ asm("nop"); | ||
if (__put_user(d_ino, &dirent->d_ino)) | ||
goto efault; | ||
if (__put_user(reclen, &dirent->d_reclen)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff -Nupr src.orig/kernel/time/timekeeping.c src/kernel/time/timekeeping.c | ||
--- src.orig/kernel/time/timekeeping.c 2024-04-18 14:12:03.614374798 -0400 | ||
+++ src/kernel/time/timekeeping.c 2024-04-18 14:12:19.675339891 -0400 | ||
@@ -1231,6 +1231,9 @@ void do_gettimeofday(struct timeval *tv) | ||
{ | ||
struct timespec64 now; | ||
|
||
+ if (!tv) | ||
+ return; | ||
+ | ||
getnstimeofday64(&now); | ||
tv->tv_sec = now.tv_sec; | ||
tv->tv_usec = now.tv_nsec/1000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
diff -Nupr src.orig/fs/proc/proc_sysctl.c src/fs/proc/proc_sysctl.c | ||
--- src.orig/fs/proc/proc_sysctl.c 2024-04-18 14:12:03.460375133 -0400 | ||
+++ src/fs/proc/proc_sysctl.c 2024-04-18 14:12:21.710335469 -0400 | ||
@@ -53,6 +53,7 @@ void proc_sys_poll_notify(struct ctl_tab | ||
if (!poll) | ||
return; | ||
|
||
+ printk("kpatch-test: testing gcc .isra function name mangling\n"); | ||
atomic_inc(&poll->event); | ||
wake_up_interruptible(&poll->wait); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff -Nupr src.orig/mm/slub.c src/mm/slub.c | ||
--- src.orig/mm/slub.c 2024-04-18 14:12:03.629374765 -0400 | ||
+++ src/mm/slub.c 2024-04-18 14:12:23.903330702 -0400 | ||
@@ -6192,6 +6192,9 @@ void get_slabinfo(struct kmem_cache *s, | ||
int node; | ||
struct kmem_cache_node *n; | ||
|
||
+ if (!jiffies) | ||
+ printk("slabinfo\n"); | ||
+ | ||
for_each_kmem_cache_node(s, node, n) { | ||
nr_slabs += node_nr_slabs(n); | ||
nr_objs += node_nr_objs(n); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff -Nupr src.orig/mm/mmap.c src/mm/mmap.c | ||
--- src.orig/mm/mmap.c 2024-04-18 14:12:03.628374767 -0400 | ||
+++ src/mm/mmap.c 2024-04-18 14:12:25.958326236 -0400 | ||
@@ -1691,6 +1691,9 @@ unsigned long mmap_region(struct file *f | ||
struct rb_node **rb_link, *rb_parent; | ||
unsigned long charged = 0; | ||
|
||
+ if (!jiffies) | ||
+ printk("kpatch mmap foo\n"); | ||
+ | ||
/* Check against address space limit. */ | ||
if (!may_expand_vm(mm, vm_flags, len >> PAGE_SHIFT)) { | ||
unsigned long nr_pages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff -Nupr src.orig/kernel/reboot.c src/kernel/reboot.c | ||
--- src.orig/kernel/reboot.c 2024-04-18 14:12:03.612374802 -0400 | ||
+++ src/kernel/reboot.c 2024-04-18 14:12:27.985321831 -0400 | ||
@@ -393,8 +393,15 @@ SYSCALL_DEFINE4(reboot, int, magic1, int | ||
return ret; | ||
} | ||
|
||
+void kpatch_bar(void) | ||
+{ | ||
+ if (!jiffies) | ||
+ printk("kpatch_foo\n"); | ||
+} | ||
+ | ||
static void deferred_cad(struct work_struct *dummy) | ||
{ | ||
+ kpatch_bar(); | ||
kernel_restart(NULL); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
diff -Nupr src.orig/fs/aio.c src/fs/aio.c | ||
--- src.orig/fs/aio.c 2024-04-18 14:12:03.428375202 -0400 | ||
+++ src/fs/aio.c 2024-04-18 14:12:30.010317430 -0400 | ||
@@ -247,11 +247,18 @@ static int __init aio_setup(void) | ||
} | ||
__initcall(aio_setup); | ||
|
||
-static void put_aio_ring_file(struct kioctx *ctx) | ||
+void kpatch_aio_foo(void) | ||
+{ | ||
+ if (!jiffies) | ||
+ printk("kpatch aio foo\n"); | ||
+} | ||
+ | ||
+__always_inline static void put_aio_ring_file(struct kioctx *ctx) | ||
{ | ||
struct file *aio_ring_file = ctx->aio_ring_file; | ||
struct address_space *i_mapping; | ||
|
||
+ kpatch_aio_foo(); | ||
if (aio_ring_file) { | ||
truncate_setsize(file_inode(aio_ring_file), 0); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -o pipefail | ||
if ! $(eu-readelf --wide --symbols test-gcc-static-local-var-4.ko | awk '$NF == "free_ioctx" { exit 1 }'); then | ||
exit 1 | ||
else | ||
exit 0 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
diff -Nupr src.orig/kernel/audit.c src/kernel/audit.c | ||
--- src.orig/kernel/audit.c 2024-04-18 14:12:03.604374820 -0400 | ||
+++ src/kernel/audit.c 2024-04-18 14:12:32.055312985 -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff -Nupr src.orig/net/ipv6/netfilter.c src/net/ipv6/netfilter.c | ||
--- src.orig/net/ipv6/netfilter.c 2024-04-18 14:12:03.648374724 -0400 | ||
+++ src/net/ipv6/netfilter.c 2024-04-18 14:12:34.140308454 -0400 | ||
@@ -93,6 +93,8 @@ static int nf_ip6_reroute(struct sk_buff | ||
return 0; | ||
} | ||
|
||
+#include "kpatch-macros.h" | ||
+ | ||
int __nf_ip6_route(struct net *net, struct dst_entry **dst, | ||
struct flowi *fl, bool strict) | ||
{ | ||
@@ -106,6 +108,9 @@ int __nf_ip6_route(struct net *net, stru | ||
struct dst_entry *result; | ||
int err; | ||
|
||
+ if (!jiffies) | ||
+ printk("kpatch nf_ip6_route foo\n"); | ||
+ | ||
result = ip6_route_output(net, sk, &fl->u.ip6); | ||
err = result->error; | ||
if (err) |
Oops, something went wrong.