summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2026-09-06 13:23:41 +0200
committerArd Biesheuvel <ardb@kernel.org>2026-09-17 10:36:26 +0100
commit10bfb3ed534efe4a93c8a87e2941a77623554d55 (patch)
tree83b5e0d24c93509826c639580d734c517f288ec0 /tools/perf/scripts/python/stackcollapse.py
parent9bcc2af24b8671fc9ba3f59502f5469288a74934 (diff)
downloadlinux-next-10bfb3ed534efe4a93c8a87e2941a77623554d55.tar.gz
linux-next-10bfb3ed534efe4a93c8a87e2941a77623554d55.zip
efi/libstub: Output UTF-16 directly from vsnprintf()
The only remaining users of vsnprintf() in the EFI stub are the diagnostic printk()'s, which are emitted to the console and not recorded for posterity. The EFI console uses UTF-16 (or actually, UCS-2) natively, and so all non-UTF16 strings that are emitted need to be converted. Given the stub's vsnprintf() support for wide strings (using the %ls conversion modifier), which uses UTF-16 to UTF-8 conversion internally, the final conversion to UTF-16 needs to support not just plain ASCII but UTF-8 as well. This is all pointless, of course, and it makes more sense to use UTF-16 internally. This removes the need for UTF-16 to UTF-8 conversion in vsnprintf(), and given that all non-wide string inputs to vsnprintf() that exist in the stub today are compile time constant ASCII strings, the need to convert UTF-8 to UTF-16 disappears as well. So implement efi_vsnprintf() taking a const char *fmt as before, but outputting a efi_char16_t[] that can be passed to the EFI console directly, rather than via efi_puts(), leaving the latter unused and therefore removed. Note that efi_puts() performs LF to CR-LF conversion internally, so add this capability to efi_vsnprintf() as well. Reviewed-by: Vincent Mailhol <mailhol@kernel.org> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions