kpatch/test/integration/linux-5.18.0/special-static.patch
Joe Lawrence 30f09bfaa2 test/integration: add upstream 5.18.0 patches
Add patches rebased on top of upstream 5.18.0.

Integration tests for these can be ran as this:

  $ make PATCH_DIR="linux-5.18.0" KPATCH_BUILD_OPTS="--non-replace --sourcedir /path/to/src/linux-5.18.0" integration-slow

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
2022-06-16 11:06:07 -04:00

23 lines
548 B
Diff

diff -Nupr src.orig/kernel/fork.c src/kernel/fork.c
--- src.orig/kernel/fork.c 2022-06-15 10:04:10.879917380 -0400
+++ src/kernel/fork.c 2022-06-15 10:05:31.745304485 -0400
@@ -1676,10 +1676,18 @@ static void posix_cpu_timers_init_group(
posix_cputimers_group_init(pct, cpu_limit);
}
+void kpatch_foo(void)
+{
+ if (!jiffies)
+ printk("kpatch copy signal\n");
+}
+
static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
{
struct signal_struct *sig;
+ kpatch_foo();
+
if (clone_flags & CLONE_THREAD)
return 0;