projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9fe8e8
)
bpf: Fix bpf_strncmp proto.
author
Alexei Starovoitov
<ast@kernel.org>
Mon, 13 Mar 2023 23:58:43 +0000
(16:58 -0700)
committer
Martin KaFai Lau
<martin.lau@kernel.org>
Tue, 14 Mar 2023 06:08:21 +0000
(23:08 -0700)
bpf_strncmp() doesn't write into its first argument.
Make sure that the verifier knows about it.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: David Vernet <void@manifault.com>
Link:
https://lore.kernel.org/r/20230313235845.61029-2-alexei.starovoitov@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
kernel/bpf/helpers.c
patch
|
blob
|
history
diff --git
a/kernel/bpf/helpers.c
b/kernel/bpf/helpers.c
index 77d64b6951b9c9cc94ece9d249abf1d4e2457adc..f753676ef65228e577ce37ddcc168819c5cfc0c2 100644
(file)
--- a/
kernel/bpf/helpers.c
+++ b/
kernel/bpf/helpers.c
@@
-571,7
+571,7
@@
static const struct bpf_func_proto bpf_strncmp_proto = {
.func = bpf_strncmp,
.gpl_only = false,
.ret_type = RET_INTEGER,
- .arg1_type = ARG_PTR_TO_MEM,
+ .arg1_type = ARG_PTR_TO_MEM
| MEM_RDONLY
,
.arg2_type = ARG_CONST_SIZE,
.arg3_type = ARG_PTR_TO_CONST_STR,
};