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 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;
|
||
|
|