diff options
author | Alexei Starovoitov <ast@kernel.org> | 2021-04-27 15:50:15 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-04-27 15:56:39 -0700 |
commit | 05eb3791a0deb79027c7f392342531cb1c884ede (patch) | |
tree | 2a9455b9328ad460e138774aaf5af191091a7605 /kernel/dma.c | |
parent | 2551c2d19c04cd1c7b6c99ec04a8ff08193b0ccc (diff) | |
parent | 48cac3f4a96ddf08df8e53809ed066de0dc93915 (diff) |
Merge branch 'Implement formatted output helpers with bstr_printf'
Florent Revest says:
====================
BPF's formatted output helpers are currently implemented with
snprintf-like functions which use variadic arguments. The types of all
arguments need to be known at compilation time. BPF_CAST_FMT_ARG casts
all arguments to the size they should be (known at runtime), but the C
type promotion rules cast them back to u64s. On 32 bit architectures,
this can cause misaligned va_lists and generate mangled output.
This series refactors these helpers to avoid variadic arguments. It uses
a "binary printf" instead, where arguments are passed in a buffer
constructed at runtime.
---
Changes in v2:
- Reworded the second patch's description to better describe how
arguments get mangled on 32 bit architectures
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/dma.c')
0 files changed, 0 insertions, 0 deletions