kernel: Fake uname to 5.4.186
Needed to boot Android 16 and above on 4.19 devices.
This commit is contained in:
@@ -1246,6 +1246,13 @@ 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, "netbpfload", 10) ||
|
||||||
|
!strncmp(current->comm, "netd", 4)) {
|
||||||
|
strcpy(tmp.release, "5.4.186");
|
||||||
|
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user