kpatch/test/integration/rhel-9.1/syscall.patch

21 lines
627 B
Diff

diff -Nupr src.orig/kernel/sys.c src/kernel/sys.c
--- src.orig/kernel/sys.c 2022-10-24 15:23:43.028194597 -0400
+++ src/kernel/sys.c 2022-10-24 15:24:09.387783334 -0400
@@ -1277,13 +1277,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;