1
0
mirror of https://github.com/dynup/kpatch synced 2025-04-18 04:55:21 +00:00
kpatch/test/integration/linux-5.18.0/syscall.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

21 lines
627 B
Diff

diff -Nupr src.orig/kernel/sys.c src/kernel/sys.c
--- src.orig/kernel/sys.c 2022-06-15 10:04:10.881917389 -0400
+++ src/kernel/sys.c 2022-06-15 10:05:53.708409623 -0400
@@ -1278,13 +1278,15 @@ static int override_release(char __user
return ret;
}
-SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name)
+#include "kpatch-syscall.h"
+KPATCH_SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name)
{
struct new_utsname tmp;
down_read(&uts_sem);
memcpy(&tmp, utsname(), sizeof(tmp));
up_read(&uts_sem);
+ strcat(tmp.sysname, ".kpatch");
if (copy_to_user(name, &tmp, sizeof(tmp)))
return -EFAULT;