bpf: Warn on non-preallocated case for BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE
Subsystems (4)
PATCH v4 1/1 bpf: Warn on non-preallocated case for BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE
BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE is also tracing type, which may cause unexpected memory allocation if we set BPF_F_NO_PREALLOC. Let's also warn on it.
---
v4: warn on BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE only (Yonghong)
--- kernel/bpf/verifier.c | 1 + 1 file changed, 1 insertion(+)
kernel/bpf/verifier.c +1 -0
@@ -12562,6 +12562,7 @@ static bool is_tracing_prog_type(enum bpf_prog_type type)case BPF_PROG_TYPE_TRACEPOINT :case BPF_PROG_TYPE_PERF_EVENT :case BPF_PROG_TYPE_RAW_TRACEPOINT : +case BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE :return true;default :return false;
Signature · 1 line
2.17.1
Quoted 5 lines · Yafang Shao
BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLEis also tracing type, which may cause unexpected memory allocation if we setBPF_F_NO_PREALLOC. Let's also warn on it.Signed-off-by Yafang Shao <[email protected]>
This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann <[email protected]>:
Quoted 8 lines · On Wed, 13 Jul 2022 16:09:36 +0000 you wrote:
BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLEis also tracing type, which may cause unexpected memory allocation if we setBPF_F_NO_PREALLOC. Let's also warn on it.Signed-off-by Yafang Shao <[email protected]>[...]
Here is the summary with links:
- [bpf-next,v4] bpf: Warn on non-preallocated case for BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE
https://git.kernel.org/bpf/bpf-next/c/5002615a37b1
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html