summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-04-28 21:59:31 +0300
committerJakub Kicinski <kuba@kernel.org>2021-04-28 21:59:31 +0300
commitf89271f09f589b8e9f98a9d3373d4868d3e668a5 (patch)
treeb881b4f7f309d4d7c94201f68c971eedf9f7eb3c /include
parent99ba0ea616aabdc8e26259fd722503e012199a76 (diff)
parent3733bfbbdd28f7a65340d0058d15d15190a4944a (diff)
downloadlinux-f89271f09f589b8e9f98a9d3373d4868d3e668a5.tar.xz
Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
Daniel Borkmann says: ==================== pull-request: bpf-next 2021-04-28 The main changes are: 1) Add link detach and following re-attach for trampolines, from Jiri Olsa. 2) Use kernel's "binary printf" lib for formatted output BPF helpers (which avoids the needs for variadic argument handling), from Florent Revest. 3) Fix verifier 64 to 32 bit min/max bound propagation, from Daniel Borkmann. 4) Convert cpumap to use netif_receive_skb_list(), from Lorenzo Bianconi. 5) Add generic batched-ops support to percpu array map, from Pedro Tammela. 6) Various CO-RE relocation BPF selftests fixes, from Andrii Nakryiko. 7) Misc doc rst fixes, from Hengqi Chen. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: bpf, selftests: Update array map tests for per-cpu batched ops bpf: Add batched ops support for percpu array bpf: Implement formatted output helpers with bstr_printf seq_file: Add a seq_bprintf function bpf, docs: Fix literal block for example code bpf, cpumap: Bulk skb using netif_receive_skb_list bpf: Fix propagation of 32 bit unsigned bounds from 64 bit bounds bpf: Lock bpf_trace_printk's tmp buf before it is written to selftests/bpf: Fix core_reloc test runner selftests/bpf: Fix field existence CO-RE reloc tests selftests/bpf: Fix BPF_CORE_READ_BITFIELD() macro libbpf: Support BTF_KIND_FLOAT during type compatibility checks in CO-RE selftests/bpf: Add remaining ASSERT_xxx() variants selftests/bpf: Use ASSERT macros in lsm test selftests/bpf: Test that module can't be unloaded with attached trampoline selftests/bpf: Add re-attach test to lsm test selftests/bpf: Add re-attach test to fexit_test selftests/bpf: Add re-attach test to fentry_test bpf: Allow trampoline re-attach for tracing and lsm programs ==================== Link: https://lore.kernel.org/r/20210427233740.22238-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/bpf.h22
-rw-r--r--include/linux/seq_file.h4
2 files changed, 7 insertions, 19 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index ad4bcf1cadbb..b33f199c4cc2 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -2081,24 +2081,8 @@ int bpf_arch_text_poke(void *ip, enum bpf_text_poke_type t,
struct btf_id_set;
bool btf_id_set_contains(const struct btf_id_set *set, u32 id);
-enum bpf_printf_mod_type {
- BPF_PRINTF_INT,
- BPF_PRINTF_LONG,
- BPF_PRINTF_LONG_LONG,
-};
-
-/* Workaround for getting va_list handling working with different argument type
- * combinations generically for 32 and 64 bit archs.
- */
-#define BPF_CAST_FMT_ARG(arg_nb, args, mod) \
- (mod[arg_nb] == BPF_PRINTF_LONG_LONG || \
- (mod[arg_nb] == BPF_PRINTF_LONG && __BITS_PER_LONG == 64) \
- ? (u64)args[arg_nb] \
- : (u32)args[arg_nb])
-
-int bpf_printf_prepare(char *fmt, u32 fmt_size, const u64 *raw_args,
- u64 *final_args, enum bpf_printf_mod_type *mod,
- u32 num_args);
-void bpf_printf_cleanup(void);
+int bpf_bprintf_prepare(char *fmt, u32 fmt_size, const u64 *raw_args,
+ u32 **bin_buf, u32 num_args);
+void bpf_bprintf_cleanup(void);
#endif /* _LINUX_BPF_H */
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index b83b3ae3c877..723b1fa1177e 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -146,6 +146,10 @@ void *__seq_open_private(struct file *, const struct seq_operations *, int);
int seq_open_private(struct file *, const struct seq_operations *, int);
int seq_release_private(struct inode *, struct file *);
+#ifdef CONFIG_BINARY_PRINTF
+void seq_bprintf(struct seq_file *m, const char *f, const u32 *binary);
+#endif
+
#define DEFINE_SEQ_ATTRIBUTE(__name) \
static int __name ## _open(struct inode *inode, struct file *file) \
{ \