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

2020-05-27 Thread Jiri Bohac
On Wed, May 27, 2020 at 12:08:12PM +0800, lijiang wrote: > Or the following change looks better? What's your opinion? > > static int > kimage_validate_signature(struct kimage *image) > { > int ret; > > ret = arch_kexec_kernel_verify_sig(image, image->kernel_buf, >

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

2020-05-26 Thread lijiang
在 2020年05月27日 11:15, lijiang 写道: > 在 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

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

2020-05-26 Thread lijiang
在 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

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

2020-05-26 Thread 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

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

2020-05-25 Thread Dave Young
On 05/25/20 at 01:23pm, Lianbo Jiang wrote: > Signature verification is an important security feature, to protect > system from being attacked with a kernel of unknown origin. Kexec > rebooting is a way to replace the running kernel, hence need be > secured carefully. > > In the current code of

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

2020-05-24 Thread Lianbo Jiang
Signature verification is an important security feature, to protect system from being attacked with a kernel of unknown origin. Kexec rebooting is a way to replace the running kernel, hence need be secured carefully. In the current code of handling signature verification of kexec kernel, the