kpatch/test/integration/linux-6.2.0/syscall.patch
Joe Lawrence 0d48a4357e test/integration: add upstream 6.2.0 patches
Add patches rebased on top of upstream 6.2.0.

Integration tests for these can be ran as this:

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

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
2023-03-15 15:26:37 -07:00

21 lines
627 B
Diff

diff -Nupr src.orig/kernel/sys.c src/kernel/sys.c
--- src.orig/kernel/sys.c 2023-01-12 11:20:05.406700021 -0500
+++ src/kernel/sys.c 2023-01-12 11:21:35.782235867 -0500
@@ -1285,13 +1285,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;