summaryrefslogtreecommitdiff
path: root/net/bpf
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2021-05-13 17:36:05 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2021-05-19 00:33:40 +0200
commitaf2ac3e13e45752af03c8a933f9b6e18841b128b (patch)
tree8eeccd76be027813eb486241d26eb084ef3fbef3 /net/bpf
parentcdf7fb0a9f3d36b279590ac41e61c6b655db0d4a (diff)
bpf: Prepare bpf syscall to be used from kernel and user space.
With the help from bpfptr_t prepare relevant bpf syscall commands to be used from kernel and user space. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210514003623.28033-4-alexei.starovoitov@gmail.com
Diffstat (limited to 'net/bpf')
-rw-r--r--net/bpf/test_run.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c
index a6972d7ddf80..aa47af349ba8 100644
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -409,7 +409,7 @@ static void *bpf_ctx_init(const union bpf_attr *kattr, u32 max_size)
return ERR_PTR(-ENOMEM);
if (data_in) {
- err = bpf_check_uarg_tail_zero(data_in, max_size, size);
+ err = bpf_check_uarg_tail_zero(USER_BPFPTR(data_in), max_size, size);
if (err) {
kfree(data);
return ERR_PTR(err);