From: Will Deacon <will@kernel.org>
To: Li Zetao <lizetao1@huawei.com>
Cc: catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, eric.devolder@oracle.com,
ebiederm@xmission.com
Subject: Re: [PATCH -next] arm64: enable ARCH_SUPPORTS_KEXEC_SIG_FORCE for arm64
Date: Tue, 27 Aug 2024 13:43:38 +0100 [thread overview]
Message-ID: <20240827124337.GA4772@willie-the-truck> (raw)
In-Reply-To: <20240824111234.2216355-1-lizetao1@huawei.com>
On Sat, Aug 24, 2024 at 07:12:34PM +0800, Li Zetao wrote:
> When the CONFIG_KEXEC_SIG is enabled, an illegal image is loaded through
> kexec, and the illegal image is successfully loaded. The test example is
> as follows:
>
> # cat /sys/kernel/kexec_loaded
> 0
> # kexec -s -l ./Image.illegal_signature
> # echo $?
> 0
> # dmesg | tail
> PEFILE: Digest mismatch
> # cat /sys/kernel/kexec_loaded
> 1
>
> The root cause of this problem is that CONFIG_KEXEC_SIG_FORCE is not
> enabled. Solve this problem by enabling the ARCH_SUPPORTS_KEXEC_SIG_FORCE
> feature.
I'm not sure this is a problem as such -- it seems to be working as
intended if you look at the Kconfig help text:
// Kconfig.kexec :: KEXEC_SIG
| The image can still be loaded without a valid signature unless you
| also enable KEXEC_SIG_FORCE, though if there's a signature that we
| can check, then it must be valid.
> Signed-off-by: Li Zetao <lizetao1@huawei.com>
> ---
> arch/arm64/Kconfig | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index a2f8ff354ca6..9952c40a2bd8 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -1549,6 +1549,9 @@ config ARCH_SELECTS_KEXEC_FILE
> config ARCH_SUPPORTS_KEXEC_SIG
> def_bool y
>
> +config ARCH_SUPPORTS_KEXEC_SIG_FORCE
> + def_bool y
I think the real question is why on Earth does KEXEC_SIG_FORCE depend on
this arch option? Can't we just remove ARCH_SUPPORTS_KEXEC_SIG_FORCE,
seeing as it doesn't appear to do anything?
Will
prev parent reply other threads:[~2024-08-27 12:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-24 11:12 [PATCH -next] arm64: enable ARCH_SUPPORTS_KEXEC_SIG_FORCE for arm64 Li Zetao
2024-08-27 12:43 ` Will Deacon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240827124337.GA4772@willie-the-truck \
--to=will@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=ebiederm@xmission.com \
--cc=eric.devolder@oracle.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizetao1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox