From 525638312734aacbc4bb226e614f3ec910adee9c Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Wed, 13 Mar 2019 18:38:51 +0000 Subject: [PATCH] bpf: make decoders of BPF_*_GET_FD_BY_ID commands return RVAL_FD These bpf commands return file descriptors. * bpf.c (BPF_PROG_GET_FD_BY_ID, BPF_MAP_GET_FD_BY_ID): Add RVAL_FD to END_BPF_CMD_DECODER. --- bpf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bpf.c b/bpf.c index 72f1640a..fbd77dcf 100644 --- a/bpf.c +++ b/bpf.c @@ -394,7 +394,7 @@ BEGIN_BPF_CMD_DECODER(BPF_PROG_GET_FD_BY_ID) PRINT_FIELD_FLAGS(", ", attr, open_flags, bpf_file_mode_flags, "BPF_F_???"); } -END_BPF_CMD_DECODER(RVAL_DECODED) +END_BPF_CMD_DECODER(RVAL_DECODED | RVAL_FD) BEGIN_BPF_CMD_DECODER(BPF_MAP_GET_FD_BY_ID) { @@ -407,7 +407,7 @@ BEGIN_BPF_CMD_DECODER(BPF_MAP_GET_FD_BY_ID) PRINT_FIELD_FLAGS(", ", attr, open_flags, bpf_file_mode_flags, "BPF_F_???"); } -END_BPF_CMD_DECODER(RVAL_DECODED) +END_BPF_CMD_DECODER(RVAL_DECODED | RVAL_FD) struct obj_get_info_saved; typedef void (*print_bpf_obj_info_fn)(struct tcb *, -- 2.40.0