Re: [PATCH v2 06/10] efi/libstub: Avoid efi_puts() for compile time constant strings
From: Vincent Mailhol
Date: Tue Sep 15 2026 - 13:20:19 EST
On 9/9/26 13:55, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb@xxxxxxxxxx>
>
> efi_puts() performs a UTF-8 to UTF-16 conversion on its input, as the
> EFI console's native character set is UTF-16.
>
> This is pointless for compile time constant strings, since we can
> simply define those as UTF-16 to begin with.
I would nuance this a bit. This is a trade-off between space and time.
ASCII text takes half of the space but needs a runtime conversion.
Note this is not an objection to the patch itself, but I think the
commit message could be slightly more nuanced.
> Note that efi_puts() also performs LF to CR-LF conversion, so this needs
> to be taken into account as well.
>
> Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
(...)
Yours sincerely,
Vincent Mailhol