From e60264f30163b15b659d0c84a6a4c8e7edb7a0a3 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Mon, 27 Nov 2023 16:31:21 +0100 Subject: sys/linux: add all format specifiers for bpf_trace_printk The bpf_trace_printk helper supports a limited set of format specifiers [1]. This commit ensures they are all covered in the union. 1 - https://man7.org/linux/man-pages/man7/bpf-helpers.7.html Signed-off-by: Paul Chaignon --- sys/linux/test/bpf_helpers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/linux/test') diff --git a/sys/linux/test/bpf_helpers b/sys/linux/test/bpf_helpers index c486dcdb4..e1f994afa 100644 --- a/sys/linux/test/bpf_helpers +++ b/sys/linux/test/bpf_helpers @@ -1,6 +1,6 @@ # Load and execute a BPF program that simply calls bpf_trace_printk -r1 = bpf$PROG_LOAD(AUTO, &AUTO={0x3, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [@printk={@integer=AUTO, AUTO, AUTO, AUTO, AUTO, {AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, 0x1234}, AUTO}], AUTO}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, "00000000000000000000000000000000", 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0xa0) +r1 = bpf$PROG_LOAD(AUTO, &AUTO={0x3, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [@printk={@d=AUTO, AUTO, AUTO, AUTO, AUTO, {AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, 0x1234}, AUTO}], AUTO}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, "00000000000000000000000000000000", 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0xa0) r2 = bpf$BPF_PROG_TEST_RUN(AUTO, &AUTO={r1, AUTO, 0x10, 0x10, &AUTO="0000000000000000", &AUTO="0000000000000000", 0x1, AUTO, 0x0, 0x0, 0x0, 0x0, 0x0, AUTO, 0x0}, 0x4c) -- cgit mrf-deployment