diff options
author | Gary Guo <gary@garyguo.net> | 2021-07-03 17:38:57 +0200 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2022-09-28 09:00:20 +0200 |
commit | 787983da77185d355564b0436f7b4eaa40b8904b (patch) | |
tree | f42d510e54ef7abf81a24c0683cad0ddd3dd1eaf /io_uring | |
parent | rust: export generated symbols (diff) | |
download | linux-787983da77185d355564b0436f7b4eaa40b8904b.tar.xz linux-787983da77185d355564b0436f7b4eaa40b8904b.zip |
vsprintf: add new `%pA` format specifier
This patch adds a format specifier `%pA` to `vsprintf` which formats
a pointer as `core::fmt::Arguments`. Doing so allows us to directly
format to the internal buffer of `printf`, so we do not have to use
a temporary buffer on the stack to pre-assemble the message on
the Rust side.
This specifier is intended only to be used from Rust and not for C, so
`checkpatch.pl` is intentionally unchanged to catch any misuse.
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Co-developed-by: Alex Gaynor <alex.gaynor@gmail.com>
Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
Co-developed-by: Wedson Almeida Filho <wedsonaf@google.com>
Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
Signed-off-by: Gary Guo <gary@garyguo.net>
Co-developed-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'io_uring')
0 files changed, 0 insertions, 0 deletions