summaryrefslogtreecommitdiffstats
path: root/include/linux/bpf.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2022-12-15 22:44:28 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2022-12-19 22:07:52 +0100
commit78aa1cc9404399a15d2a1205329c6a06236f5378 (patch)
treebddc2687a2809ddd9be24d1fceeb6d3b312dab6b /include/linux/bpf.h
parent0e43662e61f2569500ab83b8188c065603530785 (diff)
downloadlinux-78aa1cc9404399a15d2a1205329c6a06236f5378.tar.gz
linux-78aa1cc9404399a15d2a1205329c6a06236f5378.tar.bz2
linux-78aa1cc9404399a15d2a1205329c6a06236f5378.zip
bpf: Add struct for bin_args arg in bpf_bprintf_prepare
Adding struct bpf_bprintf_data to hold bin_args argument for bpf_bprintf_prepare function. We will add another return argument to bpf_bprintf_prepare and pass the struct to bpf_bprintf_cleanup for proper cleanup in following changes. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20221215214430.1336195-2-jolsa@kernel.org
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r--include/linux/bpf.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 3de24cfb7a3d..cc390ba32e70 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -2796,8 +2796,13 @@ bool btf_id_set_contains(const struct btf_id_set *set, u32 id);
#define MAX_BPRINTF_VARARGS 12
+struct bpf_bprintf_data {
+ u32 *bin_args;
+ bool get_bin_args;
+};
+
int bpf_bprintf_prepare(char *fmt, u32 fmt_size, const u64 *raw_args,
- u32 **bin_buf, u32 num_args);
+ u32 num_args, struct bpf_bprintf_data *data);
void bpf_bprintf_cleanup(void);
/* the implementation of the opaque uapi struct bpf_dynptr */