From: Kenta Tada <Kenta.Tada@sony.com>
Date: Sat, 29 Jan 2022 02:09:06 +0900
Subject: bpf: make bpf_copy_from_user_task() gpl only
Patch-mainline: v5.18-rc1
Git-commit: 0407a65f356e6d9340ad673907c17e52fade43e3
References: jsc#PED-1377
access_process_vm() is exported by EXPORT_SYMBOL_GPL().
Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
Link: https://lore.kernel.org/r/20220128170906.21154-1-Kenta.Tada@sony.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
---
kernel/bpf/helpers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/bpf/helpers.c
+++ b/kernel/bpf/helpers.c
@@ -696,7 +696,7 @@ BPF_CALL_5(bpf_copy_from_user_task, void
const struct bpf_func_proto bpf_copy_from_user_task_proto = {
.func = bpf_copy_from_user_task,
- .gpl_only = false,
+ .gpl_only = true,
.ret_type = RET_INTEGER,
.arg1_type = ARG_PTR_TO_UNINIT_MEM,
.arg2_type = ARG_CONST_SIZE_OR_ZERO,