Re: [PATCH] kexec: Do not verify the signature without the lockdown or mandatory signature

From: lijiang
Date: Tue May 26 2020 - 23:16:08 EST

å 2020å05æ26æ 21:59, Jiri Bohac åé:
> On Mon, May 25, 2020 at 01:23:51PM +0800, Lianbo Jiang wrote:
>> So, here, let's simplify the logic to improve code readability. If the
>> KEXEC_SIG_FORCE enabled or kexec lockdown enabled, signature verification
>> is mandated. Otherwise, we lift the bar for any kernel image.
> I agree completely; in fact that was my intention when
> introducing the code, but I got overruled about the return codes:
> I like this simplification very much, except this part:
>> + if (ret) {
>> + pr_debug("kernel signature verification failed (%d).\n", ret);
> ...
>> - pr_notice("kernel signature verification failed (%d).\n", ret);
> I think the log level should stay at most PR_NOTICE when the
> verification failure results in rejecting the kernel. Perhaps
> even lower.

Thank you for the comment, Jiri Bohac.

I like the idea of staying at most PR_NOTICE, but the pr_notice() will output
some messages that kernel could want to ignore, such as the case you mentioned

> In case verification is not enforced and the failure is
> ignored, KERN_DEBUG seems reasonable.

Yes, good understanding. It seems that the pr_debug() is still a good option here?
Any other thoughts?


> Regards,