Skip to content

Commit

Permalink
test/integration/rhel-9.4: add kernel-5.14.0-427.13.1.el9_4 tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Sullivan <rysulliv@redhat.com>
  • Loading branch information
ryanbsull committed Apr 18, 2024
1 parent 96d9641 commit 56ac92e
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 47 deletions.
4 changes: 2 additions & 2 deletions test/integration/rhel-9.4/data-new.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.c
--- src.orig/fs/proc/meminfo.c 2024-01-22 16:21:01.996968965 -0500
+++ src/fs/proc/meminfo.c 2024-01-22 16:21:03.207970817 -0500
--- src.orig/fs/proc/meminfo.c 2024-04-18 11:19:38.154638374 -0400
+++ src/fs/proc/meminfo.c 2024-04-18 11:19:39.092636204 -0400
@@ -29,6 +29,8 @@ static void show_val_kb(struct seq_file
seq_write(m, " kB\n", 4);
}
Expand Down
4 changes: 2 additions & 2 deletions test/integration/rhel-9.4/gcc-static-local-var-6.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -Nupr src.orig/net/ipv6/netfilter.c src/net/ipv6/netfilter.c
--- src.orig/net/ipv6/netfilter.c 2024-01-22 16:21:02.415969606 -0500
+++ src/net/ipv6/netfilter.c 2024-01-22 16:21:17.357992453 -0500
--- src.orig/net/ipv6/netfilter.c 2024-04-18 11:19:38.428637740 -0400
+++ src/net/ipv6/netfilter.c 2024-04-18 11:19:46.066620071 -0400
@@ -96,6 +96,8 @@ static int nf_ip6_reroute(struct sk_buff
return 0;
}
Expand Down
12 changes: 6 additions & 6 deletions test/integration/rhel-9.4/macro-callbacks.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -Nupr src.orig/drivers/input/joydev.c src/drivers/input/joydev.c
--- src.orig/drivers/input/joydev.c 2024-01-22 16:21:01.218967776 -0500
+++ src/drivers/input/joydev.c 2024-01-22 16:21:20.858997806 -0500
--- src.orig/drivers/input/joydev.c 2024-04-18 11:19:37.635639575 -0400
+++ src/drivers/input/joydev.c 2024-04-18 11:19:48.560614301 -0400
@@ -1096,3 +1096,47 @@ static void __exit joydev_exit(void)

module_init(joydev_init);
Expand Down Expand Up @@ -50,8 +50,8 @@ diff -Nupr src.orig/drivers/input/joydev.c src/drivers/input/joydev.c
+}
+KPATCH_POST_UNPATCH_CALLBACK(post_unpatch_callback);
diff -Nupr src.orig/drivers/input/misc/pcspkr.c src/drivers/input/misc/pcspkr.c
--- src.orig/drivers/input/misc/pcspkr.c 2024-01-22 16:21:01.224967785 -0500
+++ src/drivers/input/misc/pcspkr.c 2024-01-22 16:21:20.859997807 -0500
--- src.orig/drivers/input/misc/pcspkr.c 2024-04-18 11:19:37.639639566 -0400
+++ src/drivers/input/misc/pcspkr.c 2024-04-18 11:19:48.561614299 -0400
@@ -134,3 +134,46 @@ static struct platform_driver pcspkr_pla
};
module_platform_driver(pcspkr_platform_driver);
Expand Down Expand Up @@ -100,8 +100,8 @@ diff -Nupr src.orig/drivers/input/misc/pcspkr.c src/drivers/input/misc/pcspkr.c
+}
+KPATCH_POST_UNPATCH_CALLBACK(post_unpatch_callback);
diff -Nupr src.orig/fs/aio.c src/fs/aio.c
--- src.orig/fs/aio.c 2024-01-22 16:21:01.949968893 -0500
+++ src/fs/aio.c 2024-01-22 16:21:20.859997807 -0500
--- src.orig/fs/aio.c 2024-04-18 11:19:38.122638448 -0400
+++ src/fs/aio.c 2024-04-18 11:19:48.561614299 -0400
@@ -50,6 +50,50 @@

#define KIOCB_KEY 0
Expand Down
23 changes: 4 additions & 19 deletions test/integration/rhel-9.4/module.patch
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
kpatch module integration test

This tests several things related to the patching of modules:

- 'kpatch_string' tests the referencing of a symbol which is outside the
.o, but inside the patch module.

- alternatives patching (.altinstructions)

- paravirt patching (.parainstructions)

- jump labels (5.8+ kernels only) -- including dynamic printk

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>

diff -Nupr src.orig/fs/nfsd/export.c src/fs/nfsd/export.c
--- src.orig/fs/nfsd/export.c 2024-01-22 16:21:01.982968944 -0500
+++ src/fs/nfsd/export.c 2024-01-22 16:21:24.320003098 -0500
--- src.orig/fs/nfsd/export.c 2024-04-18 11:19:38.144638397 -0400
+++ src/fs/nfsd/export.c 2024-04-18 11:19:51.106608412 -0400
@@ -1342,6 +1342,10 @@ static void exp_flags(struct seq_file *m
}
}
Expand Down Expand Up @@ -65,8 +50,8 @@ diff -Nupr src.orig/fs/nfsd/export.c src/fs/nfsd/export.c
}

diff -Nupr src.orig/net/netlink/af_netlink.c src/net/netlink/af_netlink.c
--- src.orig/net/netlink/af_netlink.c 2024-01-22 16:21:02.434969635 -0500
+++ src/net/netlink/af_netlink.c 2024-01-22 16:21:24.320003098 -0500
--- src.orig/net/netlink/af_netlink.c 2024-04-18 11:19:38.442637708 -0400
+++ src/net/netlink/af_netlink.c 2024-04-18 11:19:51.107608409 -0400
@@ -2944,4 +2944,9 @@ panic:
panic("netlink_init: Cannot allocate nl_table\n");
}
Expand Down
4 changes: 2 additions & 2 deletions test/integration/rhel-9.4/new-function.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -Nupr src.orig/drivers/tty/n_tty.c src/drivers/tty/n_tty.c
--- src.orig/drivers/tty/n_tty.c 2024-01-22 16:21:01.870968772 -0500
+++ src/drivers/tty/n_tty.c 2024-01-22 16:21:27.782008392 -0500
--- src.orig/drivers/tty/n_tty.c 2024-04-18 11:19:38.071638566 -0400
+++ src/drivers/tty/n_tty.c 2024-04-18 11:19:53.617602603 -0400
@@ -2253,7 +2253,7 @@ more_to_be_read:
* lock themselves)
*/
Expand Down
8 changes: 4 additions & 4 deletions test/integration/rhel-9.4/new-globals.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -Nupr src.orig/fs/proc/cmdline.c src/fs/proc/cmdline.c
--- src.orig/fs/proc/cmdline.c 2024-01-22 16:21:01.996968965 -0500
+++ src/fs/proc/cmdline.c 2024-01-22 16:21:31.244013685 -0500
--- src.orig/fs/proc/cmdline.c 2024-04-18 11:19:38.153638377 -0400
+++ src/fs/proc/cmdline.c 2024-04-18 11:19:56.139596769 -0400
@@ -17,3 +17,10 @@ static int __init proc_cmdline_init(void
return 0;
}
Expand All @@ -13,8 +13,8 @@ diff -Nupr src.orig/fs/proc/cmdline.c src/fs/proc/cmdline.c
+ printk("hello there!\n");
+}
diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.c
--- src.orig/fs/proc/meminfo.c 2024-01-22 16:21:01.996968965 -0500
+++ src/fs/proc/meminfo.c 2024-01-22 16:21:31.244013685 -0500
--- src.orig/fs/proc/meminfo.c 2024-04-18 11:19:38.154638374 -0400
+++ src/fs/proc/meminfo.c 2024-04-18 11:19:56.140596766 -0400
@@ -19,6 +19,8 @@
#include <asm/page.h>
#include "internal.h"
Expand Down
12 changes: 6 additions & 6 deletions test/integration/rhel-9.4/shadow-newpid.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -Nupr src.orig/fs/proc/array.c src/fs/proc/array.c
--- src.orig/fs/proc/array.c 2024-01-22 16:21:01.995968964 -0500
+++ src/fs/proc/array.c 2024-01-22 16:21:34.725019008 -0500
--- src.orig/fs/proc/array.c 2024-04-18 11:19:38.153638377 -0400
+++ src/fs/proc/array.c 2024-04-18 11:19:58.692590862 -0400
@@ -403,12 +403,19 @@ static inline void task_seccomp(struct s
seq_putc(m, '\n');
}
Expand All @@ -22,8 +22,8 @@ diff -Nupr src.orig/fs/proc/array.c src/fs/proc/array.c

static void task_cpus_allowed(struct seq_file *m, struct task_struct *task)
diff -Nupr src.orig/kernel/exit.c src/kernel/exit.c
--- src.orig/kernel/exit.c 2024-01-22 16:21:02.346969500 -0500
+++ src/kernel/exit.c 2024-01-22 16:21:34.726019009 -0500
--- src.orig/kernel/exit.c 2024-04-18 11:19:38.381637849 -0400
+++ src/kernel/exit.c 2024-04-18 11:19:58.692590862 -0400
@@ -734,6 +734,7 @@ static void check_stack_usage(void)
static inline void check_stack_usage(void) {}
#endif
Expand All @@ -42,8 +42,8 @@ diff -Nupr src.orig/kernel/exit.c src/kernel/exit.c
* Flush inherited counters to the parent - before the parent
* gets woken up by child-exit notifications.
diff -Nupr src.orig/kernel/fork.c src/kernel/fork.c
--- src.orig/kernel/fork.c 2024-01-22 16:21:02.346969500 -0500
+++ src/kernel/fork.c 2024-01-22 16:21:34.726019009 -0500
--- src.orig/kernel/fork.c 2024-04-18 11:19:38.381637849 -0400
+++ src/kernel/fork.c 2024-04-18 11:19:58.693590860 -0400
@@ -2639,6 +2639,7 @@ struct task_struct *create_io_thread(int
*
* args->exit_signal is expected to be checked for sanity by the caller.
Expand Down
4 changes: 2 additions & 2 deletions test/integration/rhel-9.4/special-static.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -Nupr src.orig/kernel/fork.c src/kernel/fork.c
--- src.orig/kernel/fork.c 2024-01-22 16:21:02.346969500 -0500
+++ src/kernel/fork.c 2024-01-22 16:21:38.279024442 -0500
--- src.orig/kernel/fork.c 2024-04-18 11:19:38.381637849 -0400
+++ src/kernel/fork.c 2024-04-18 11:20:01.214585028 -0400
@@ -1711,10 +1711,18 @@ static void posix_cpu_timers_init_group(
posix_cputimers_group_init(pct, cpu_limit);
}
Expand Down
4 changes: 2 additions & 2 deletions test/integration/rhel-9.4/syscall.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -Nupr src.orig/kernel/sys.c src/kernel/sys.c
--- src.orig/kernel/sys.c 2024-01-22 16:21:02.355969514 -0500
+++ src/kernel/sys.c 2024-01-22 16:21:41.748029746 -0500
--- src.orig/kernel/sys.c 2024-04-18 11:19:38.387637835 -0400
+++ src/kernel/sys.c 2024-04-18 11:20:03.760579138 -0400
@@ -1284,13 +1284,15 @@ static int override_release(char __user
return ret;
}
Expand Down
4 changes: 2 additions & 2 deletions test/integration/rhel-9.4/warn-detect-FAIL.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -Nupr src.orig/arch/x86/kvm/x86.c src/arch/x86/kvm/x86.c
--- src.orig/arch/x86/kvm/x86.c 2024-01-22 16:21:00.715967007 -0500
+++ src/arch/x86/kvm/x86.c 2024-01-22 16:21:45.210035040 -0500
--- src.orig/arch/x86/kvm/x86.c 2024-04-18 11:19:37.300640350 -0400
+++ src/arch/x86/kvm/x86.c 2024-04-18 11:20:06.339573172 -0400
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
+
Expand Down

0 comments on commit 56ac92e

Please sign in to comment.