* [PATCH bpf-next] bpf: Comment on check_mem_size_reg
@ 2023-12-10 22:51 Andrei Matei
2023-12-12 23:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Andrei Matei @ 2023-12-10 22:51 UTC (permalink / raw)
To: bpf; +Cc: andrii.nakryiko, Andrei Matei
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 <andreimatei1@gmail.com>
---
kernel/bpf/verifier.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index fb690539d5f6..8b2f29d8e0b1 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -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,
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next] bpf: Comment on check_mem_size_reg
2023-12-10 22:51 [PATCH bpf-next] bpf: Comment on check_mem_size_reg Andrei Matei
@ 2023-12-12 23:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-12-12 23:40 UTC (permalink / raw)
To: Andrei Matei; +Cc: bpf, andrii.nakryiko
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
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 <andreimatei1@gmail.com>
> ---
> 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-12 23:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-10 22:51 [PATCH bpf-next] bpf: Comment on check_mem_size_reg Andrei Matei
2023-12-12 23:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox