From 96331e0dc4c694f98a04401b12c1021f459e16e9 Mon Sep 17 00:00:00 2001 From: John Stultz Date: Thu, 18 Jun 2020 19:03:44 +0000 Subject: [PATCH] ANDROID: bpf: Workaround for bpf permissions check regression From an email thread on how to try to fix up the current Android boot issues... Change-Id: If4a4ef96acc09708727451fb79233b3cc1f18482 Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman --- kernel/bpf/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 4d530b1d5683..dd72c4ba72fe 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -2134,7 +2134,7 @@ static int bpf_prog_load(union bpf_attr *attr, union bpf_attr __user *uattr) !bpf_capable()) return -EPERM; - if (is_net_admin_prog_type(type) && !capable(CAP_NET_ADMIN)) + if (is_net_admin_prog_type(type) && !capable(CAP_SYS_ADMIN)) return -EPERM; if (is_perfmon_prog_type(type) && !perfmon_capable()) return -EPERM;