mirror of https://github.com/dynup/kpatch
21 lines
627 B
Diff
21 lines
627 B
Diff
diff -Nupr src.orig/kernel/sys.c src/kernel/sys.c
|
|
--- src.orig/kernel/sys.c 2022-04-29 15:56:57.808347857 -0400
|
|
+++ src/kernel/sys.c 2022-04-29 15:56:58.373349868 -0400
|
|
@@ -1268,13 +1268,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;
|
|
|