Re: [PATCH] x86/sme: Fix memory encryption if enabled by default and not overridden
From: Borislav Petkov
Date: Sat Jan 27 2024 - 05:53:11 EST
On Fri, Jan 26, 2024 at 05:39:19PM +0100, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb@xxxxxxxxxx>
>
> Commit cbebd68f59f0 ("x86/mm: Fix use of uninitialized buffer in
> sme_enable()") 'fixed' an issue in sme_enable() detected by static
> analysis, and broke the common case in the process.
>
> cmdline_find_option() will return < 0 on an error, or when the command
> line argument does not appear at all.
Is it just me or cmdline_find_option() should be fixed to return 0 when
there's no cmdline argument and < 0 only when there was a real error
parsing?
Hohumm, sounds like a TODO for me or someone who wants to audit all
callers and fix them up accordingly.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette