Files
kernel_arpi/include/linux
Florent Revest 7b15523a98 bpf: Add a bpf_snprintf helper
The implementation takes inspiration from the existing bpf_trace_printk
helper but there are a few differences:

To allow for a large number of format-specifiers, parameters are
provided in an array, like in bpf_seq_printf.

Because the output string takes two arguments and the array of
parameters also takes two arguments, the format string needs to fit in
one argument. Thankfully, ARG_PTR_TO_CONST_STR is guaranteed to point to
a zero-terminated read-only map so we don't need a format string length
arg.

Because the format-string is known at verification time, we also do
a first pass of format string validation in the verifier logic. This
makes debugging easier.

Signed-off-by: Florent Revest <revest@chromium.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210419155243.1632274-4-revest@chromium.org
2021-04-19 15:27:36 -07:00
..
2021-03-22 11:32:12 -07:00
2021-04-19 15:27:36 -07:00
2021-02-26 09:41:03 -08:00
2021-02-17 14:07:48 +01:00
2021-02-08 12:28:07 +01:00
2021-03-30 22:37:06 +02:00
2021-02-11 13:24:44 -08:00
2021-02-26 09:41:03 -08:00
2021-02-17 14:12:42 +01:00
2021-02-26 09:41:02 -08:00
2021-02-26 09:41:03 -08:00
2021-02-26 09:41:03 -08:00
2021-03-13 11:27:30 -08:00
2021-02-16 16:11:14 -05:00
2021-02-17 13:17:49 -08:00
2021-02-26 09:40:59 -08:00
2021-02-03 19:05:50 +01:00
2021-03-24 15:20:07 -07:00
2021-02-26 09:41:03 -08:00
2021-03-02 17:25:46 -07:00
2021-02-20 10:13:32 -05:00
2021-03-25 17:39:33 -07:00
2021-02-09 12:27:29 -05:00
2021-02-13 17:17:53 +01:00
2021-03-30 17:06:49 -07:00
2021-02-09 12:15:07 +01:00
2021-02-08 22:58:55 +01:00