syscall: Fake uname to 4.19 for bpfloader/netd
* Google is attempting to kill 4.14 in 0156d6e2ba
Change-Id: Ic87a66753a7acc89b0fe5b19158eea4c58ba980f
This commit is contained in:
parent
bb6f1de187
commit
c0a56b4bc0
1 changed files with 6 additions and 0 deletions
|
@ -1346,6 +1346,12 @@ SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name)
|
||||||
|
|
||||||
down_read(&uts_sem);
|
down_read(&uts_sem);
|
||||||
memcpy(&tmp, utsname(), sizeof(tmp));
|
memcpy(&tmp, utsname(), sizeof(tmp));
|
||||||
|
if (!strncmp(current->comm, "bpfloader", 9) ||
|
||||||
|
!strncmp(current->comm, "netd", 4)) {
|
||||||
|
strcpy(tmp.release, "4.19.0");
|
||||||
|
pr_debug("fake uname: %s/%d release=%s\n",
|
||||||
|
current->comm, current->pid, tmp.release);
|
||||||
|
}
|
||||||
up_read(&uts_sem);
|
up_read(&uts_sem);
|
||||||
if (copy_to_user(name, &tmp, sizeof(tmp)))
|
if (copy_to_user(name, &tmp, sizeof(tmp)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue