Skip to content

Commit

Permalink
bpf: add bpf_cmd type
Browse files Browse the repository at this point in the history
Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
  • Loading branch information
tixxdz committed Sep 22, 2024
1 parent eeee5db commit 8d0d049
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bpf/process/types/basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 8d0d049

Please sign in to comment.