bpf: Comment on check_mem_size_reg
PATCH 1/1 bpf: Comment on check_mem_size_reg
This patch adds a comment to check_mem_size_reg -- a function whose meaning is not very transparent. The function implicitly deals with two registers connected by convention, which is not obvious.
Signed-off-by Andrei Matei <[email protected]>
--- kernel/bpf/verifier.c | 6 ++++++ 1 file changed, 6 insertions(+)
kernel/bpf/verifier.c +6 -0
@@ -7252,6 +7252,12 @@ static int check_helper_mem_access(struct bpf_verifier_env *env, int regno, } } +/* verify arguments to helpers or kfuncs consisting of a pointer and an access +* size. +* +* @regno is the register containing the access size. regno-1 is the register +* containing the pointer. +*/ static int check_mem_size_reg(struct bpf_verifier_env *env, struct bpf_reg_state *reg, u32 regno, bool zero_size_allowed,
Signature · 1 line
2.40.1
This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:
Quoted 8 lines · On Sun, 10 Dec 2023 17:51:50 -0500 you wrote:
This patch adds a comment to
check_mem_size_reg-- a function whose meaning is not very transparent. The function implicitly deals with two registers connected by convention, which is not obvious.Signed-off-by Andrei Matei <[email protected]>--- kernel/bpf/verifier.c | 6 ++++++ 1 file changed, 6 insertions(+)
Here is the summary with links:
- [bpf-next] bpf: Comment on check_mem_size_reg
https://git.kernel.org/bpf/bpf-next/c/745e03113065
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html