* Improvements
* Implemented decoding of open_tree, move_mount, fsopen, fsconfig, fsmount,
and fspick syscalls.
- * Enhanced decoding of clone syscall.
+ * Enhanced decoding of bpf and clone syscalls.
* Updated lists of AT_*, AUDIT_*, BPF_*, CLONE_*, ETH_*, KEY_*, KVM_*, TIPC_*,
and V4L2_* constants.
}
END_BPF_CMD_DECODER(RVAL_DECODED)
+BEGIN_BPF_CMD_DECODER(BPF_MAP_FREEZE)
+{
+ PRINT_FIELD_FD("{", attr, map_fd, tcp);
+}
+END_BPF_CMD_DECODER(RVAL_DECODED)
+
BEGIN_BPF_CMD_DECODER(BPF_PROG_LOAD)
{
PRINT_FIELD_XVAL_INDEX("{", attr, prog_type, bpf_prog_types,
BPF_CMD_ENTRY(BPF_BTF_GET_FD_BY_ID),
BPF_CMD_ENTRY(BPF_TASK_FD_QUERY),
BPF_CMD_ENTRY(BPF_MAP_LOOKUP_AND_DELETE_ELEM),
+ BPF_CMD_ENTRY(BPF_MAP_FREEZE),
};
const unsigned int cmd = tcp->u_arg[0];
sizeof(struct BPF_MAP_GET_NEXT_KEY_struct)
# define expected_BPF_MAP_GET_NEXT_KEY_struct_size 24
+struct BPF_MAP_FREEZE_struct {
+ uint32_t map_fd;
+};
+
+# define BPF_MAP_FREEZE_struct_size \
+ sizeof(struct BPF_MAP_FREEZE_struct)
+# define expected_BPF_MAP_FREEZE_struct_size 4
+
struct BPF_PROG_LOAD_struct {
uint32_t prog_type;
uint32_t insn_cnt;
BPF_ATTR_DATA_FIELD(BPF_BTF_LOAD);
BPF_ATTR_DATA_FIELD(BPF_BTF_GET_FD_BY_ID);
BPF_ATTR_DATA_FIELD(BPF_TASK_FD_QUERY);
+ BPF_ATTR_DATA_FIELD(BPF_MAP_FREEZE);
char char_data[256];
};
}
};
+static const struct bpf_attr_check BPF_MAP_FREEZE_checks[] = {
+ {
+ .data = { .BPF_MAP_FREEZE_data = { .map_fd = -1 } },
+ .size = offsetofend(struct BPF_MAP_FREEZE_struct, map_fd),
+ .str = "map_fd=-1"
+ }
+};
+
static const struct bpf_insn insns[] = {
{
.code = 0x95,
CHK(BPF_BTF_GET_FD_BY_ID),
CHK(BPF_TASK_FD_QUERY),
CHK(BPF_MAP_LOOKUP_AND_DELETE_ELEM),
+ CHK(BPF_MAP_FREEZE),
};
page_size = get_page_size();