From 8d0d049e3aa7f1b5dad6ddd29ad1d2017508ee8f Mon Sep 17 00:00:00 2001 From: Djalal Harouni Date: Sun, 22 Sep 2024 16:23:37 +0100 Subject: [PATCH] bpf: add bpf_cmd type Signed-off-by: Djalal Harouni --- bpf/process/types/basic.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bpf/process/types/basic.h b/bpf/process/types/basic.h index bf93e6be20d..b42b45311e9 100644 --- a/bpf/process/types/basic.h +++ b/bpf/process/types/basic.h @@ -80,6 +80,8 @@ enum { net_dev_ty = 39, + bpf_cmd_ty = 40, + nop_s64_ty = -10, nop_u64_ty = -11, nop_u32_ty = -12, @@ -1482,6 +1484,7 @@ FUNC_INLINE size_t type_to_min_size(int type, int argm) case int_type: case s32_ty: case u32_ty: + case bpf_cmd_ty: return 4; case skb_type: return sizeof(struct skb_type); @@ -1757,6 +1760,7 @@ selector_arg_offset(__u8 *f, struct msg_generic_kprobe *e, __u32 selidx, case int_type: case s32_ty: case u32_ty: + case bpf_cmd_ty: pass &= filter_32ty(filter, args); break; case skb_type: @@ -2551,6 +2555,7 @@ read_call_arg(void *ctx, struct msg_generic_kprobe *e, int index, int type, case int_type: case s32_ty: case u32_ty: + case bpf_cmd_ty: probe_read(args, sizeof(__u32), &arg); size = sizeof(__u32); break;