Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa929593 authored by Tim Zimmermann's avatar Tim Zimmermann Committed by Harshit Jain
Browse files

syscall: Fake uname to 4.19 for bpfloader/netd

* Google is attempting to kill 4.14 in https://android.googlesource.com/platform/system/bpf/+/0156d6e2ba1e90eecbd9ef47bcb39c41dcc78e53



Change-Id: Ic87a66753a7acc89b0fe5b19158eea4c58ba980f
Signed-off-by: default avatarCyber Knight <cyberknight755@gmail.com>
parent 089667d5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1188,6 +1188,12 @@ SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name)

	down_read(&uts_sem);
	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);
	if (copy_to_user(name, &tmp, sizeof(tmp)))
		return -EFAULT;