public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec: drop dependency on ARCH_SUPPORTS_KEXEC from CRASH_DUMP
@ 2023-11-29 22:04 Ignat Korchagin
  2023-11-29 22:23 ` Andrew Morton
  2023-11-30  1:41 ` Baoquan He
  0 siblings, 2 replies; 5+ messages in thread
From: Ignat Korchagin @ 2023-11-29 22:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ignat Korchagin, kexec, linux-arm-kernel, akpm, eric_devolder,
	agordeev, bhe, kernel-team, stable

In commit f8ff23429c62 ("kernel/Kconfig.kexec: drop select of KEXEC for
CRASH_DUMP") we tried to fix a config regression, where CONFIG_CRASH_DUMP
required CONFIG_KEXEC.

However, it was not enough at least for arm64 platforms. While further testing
the patch with our arm64 config I noticed that CONFIG_CRASH_DUMP is unavailable
in menuconfig. This is because CONFIG_CRASH_DUMP still depends on the new
CONFIG_ARCH_SUPPORTS_KEXEC introduced in commit 91506f7e5d21 ("arm64/kexec:
refactor for kernel/Kconfig.kexec") and on arm64 CONFIG_ARCH_SUPPORTS_KEXEC
requires CONFIG_PM_SLEEP_SMP=y, which in turn requires either CONFIG_SUSPEND=y
or CONFIG_HIBERNATION=y neither of which are set in our config.

Given that we already established that CONFIG_KEXEC (which is a switch for kexec
system call itself) is not required for CONFIG_CRASH_DUMP drop
CONFIG_ARCH_SUPPORTS_KEXEC dependency as well. The arm64 kernel builds just fine
with CONFIG_CRASH_DUMP=y and with both CONFIG_KEXEC=n and CONFIG_KEXEC_FILE=n
after f8ff23429c62 ("kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP")
and this patch are applied given that the necessary shared bits are included via
CONFIG_KEXEC_CORE dependency.

Fixes: 91506f7e5d21 ("arm64/kexec: refactor for kernel/Kconfig.kexec")
Cc: stable@vger.kernel.org # 6.6+: f8ff234: kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP
Cc: stable@vger.kernel.org # 6.6+
Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
---
 kernel/Kconfig.kexec | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexec
index fc38f1ae3a30..946dffa048b7 100644
--- a/kernel/Kconfig.kexec
+++ b/kernel/Kconfig.kexec
@@ -96,7 +96,6 @@ config KEXEC_JUMP
 config CRASH_DUMP
 	bool "kernel crash dumps"
 	depends on ARCH_SUPPORTS_CRASH_DUMP
-	depends on ARCH_SUPPORTS_KEXEC
 	select CRASH_CORE
 	select KEXEC_CORE
 	help
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] kexec: drop dependency on ARCH_SUPPORTS_KEXEC from CRASH_DUMP
  2023-11-29 22:04 [PATCH] kexec: drop dependency on ARCH_SUPPORTS_KEXEC from CRASH_DUMP Ignat Korchagin
@ 2023-11-29 22:23 ` Andrew Morton
  2023-11-29 22:34   ` Ignat Korchagin
  2023-11-30  1:41 ` Baoquan He
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2023-11-29 22:23 UTC (permalink / raw)
  To: Ignat Korchagin
  Cc: linux-kernel, kexec, linux-arm-kernel, eric_devolder, agordeev,
	bhe, kernel-team, stable

On Wed, 29 Nov 2023 22:04:09 +0000 Ignat Korchagin <ignat@cloudflare.com> wrote:

> Fixes: 91506f7e5d21 ("arm64/kexec: refactor for kernel/Kconfig.kexec")
> Cc: stable@vger.kernel.org # 6.6+: f8ff234: kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP
> Cc: stable@vger.kernel.org # 6.6+

I doubt if anyone knows what the two above lines mean.  What are your
recommendations for the merging of this patch?

> Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kexec: drop dependency on ARCH_SUPPORTS_KEXEC from CRASH_DUMP
  2023-11-29 22:23 ` Andrew Morton
@ 2023-11-29 22:34   ` Ignat Korchagin
  2023-11-29 22:54     ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Ignat Korchagin @ 2023-11-29 22:34 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, kexec, linux-arm-kernel, eric_devolder, agordeev,
	bhe, kernel-team, stable

On Wed, Nov 29, 2023 at 10:23 PM Andrew Morton
<akpm@linux-foundation.org> wrote:
>
> On Wed, 29 Nov 2023 22:04:09 +0000 Ignat Korchagin <ignat@cloudflare.com> wrote:
>
> > Fixes: 91506f7e5d21 ("arm64/kexec: refactor for kernel/Kconfig.kexec")
> > Cc: stable@vger.kernel.org # 6.6+: f8ff234: kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP
> > Cc: stable@vger.kernel.org # 6.6+
>
> I doubt if anyone knows what the two above lines mean.  What are your
> recommendations for the merging of this patch?

Hmm... I was just following
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-1
and basically wanted to make sure that this patch gets backported
together with commit f8ff234: kernel/Kconfig.kexec: drop select of
KEXEC for CRASH_DUMP (they should go together)

> > Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kexec: drop dependency on ARCH_SUPPORTS_KEXEC from CRASH_DUMP
  2023-11-29 22:34   ` Ignat Korchagin
@ 2023-11-29 22:54     ` Andrew Morton
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2023-11-29 22:54 UTC (permalink / raw)
  To: Ignat Korchagin
  Cc: linux-kernel, kexec, linux-arm-kernel, eric_devolder, agordeev,
	bhe, kernel-team, stable

On Wed, 29 Nov 2023 22:34:13 +0000 Ignat Korchagin <ignat@cloudflare.com> wrote:

> On Wed, Nov 29, 2023 at 10:23 PM Andrew Morton
> <akpm@linux-foundation.org> wrote:
> >
> > On Wed, 29 Nov 2023 22:04:09 +0000 Ignat Korchagin <ignat@cloudflare.com> wrote:
> >
> > > Fixes: 91506f7e5d21 ("arm64/kexec: refactor for kernel/Kconfig.kexec")
> > > Cc: stable@vger.kernel.org # 6.6+: f8ff234: kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP
> > > Cc: stable@vger.kernel.org # 6.6+
> >
> > I doubt if anyone knows what the two above lines mean.  What are your
> > recommendations for the merging of this patch?
> 
> Hmm... I was just following
> https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-1
> and basically wanted to make sure that this patch gets backported
> together with commit f8ff234: kernel/Kconfig.kexec: drop select of
> KEXEC for CRASH_DUMP (they should go together)

I see, thanks.  I don't think I've ever received a patch which did this!



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kexec: drop dependency on ARCH_SUPPORTS_KEXEC from CRASH_DUMP
  2023-11-29 22:04 [PATCH] kexec: drop dependency on ARCH_SUPPORTS_KEXEC from CRASH_DUMP Ignat Korchagin
  2023-11-29 22:23 ` Andrew Morton
@ 2023-11-30  1:41 ` Baoquan He
  1 sibling, 0 replies; 5+ messages in thread
From: Baoquan He @ 2023-11-30  1:41 UTC (permalink / raw)
  To: Ignat Korchagin
  Cc: linux-kernel, kexec, linux-arm-kernel, akpm, eric_devolder,
	agordeev, kernel-team, stable

On 11/29/23 at 10:04pm, Ignat Korchagin wrote:
> In commit f8ff23429c62 ("kernel/Kconfig.kexec: drop select of KEXEC for
> CRASH_DUMP") we tried to fix a config regression, where CONFIG_CRASH_DUMP
> required CONFIG_KEXEC.
> 
> However, it was not enough at least for arm64 platforms. While further testing
> the patch with our arm64 config I noticed that CONFIG_CRASH_DUMP is unavailable
> in menuconfig. This is because CONFIG_CRASH_DUMP still depends on the new
> CONFIG_ARCH_SUPPORTS_KEXEC introduced in commit 91506f7e5d21 ("arm64/kexec:
> refactor for kernel/Kconfig.kexec") and on arm64 CONFIG_ARCH_SUPPORTS_KEXEC
> requires CONFIG_PM_SLEEP_SMP=y, which in turn requires either CONFIG_SUSPEND=y
> or CONFIG_HIBERNATION=y neither of which are set in our config.
> 
> Given that we already established that CONFIG_KEXEC (which is a switch for kexec
> system call itself) is not required for CONFIG_CRASH_DUMP drop
> CONFIG_ARCH_SUPPORTS_KEXEC dependency as well. The arm64 kernel builds just fine
> with CONFIG_CRASH_DUMP=y and with both CONFIG_KEXEC=n and CONFIG_KEXEC_FILE=n
> after f8ff23429c62 ("kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP")
> and this patch are applied given that the necessary shared bits are included via
> CONFIG_KEXEC_CORE dependency.
> 
> Fixes: 91506f7e5d21 ("arm64/kexec: refactor for kernel/Kconfig.kexec")
> Cc: stable@vger.kernel.org # 6.6+: f8ff234: kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP
> Cc: stable@vger.kernel.org # 6.6+
> Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
> ---
>  kernel/Kconfig.kexec | 1 -
>  1 file changed, 1 deletion(-)

This is a good catch, thanks.

Acked-by: Baoquan He <bhe@redhat.com>

> 
> diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexec
> index fc38f1ae3a30..946dffa048b7 100644
> --- a/kernel/Kconfig.kexec
> +++ b/kernel/Kconfig.kexec
> @@ -96,7 +96,6 @@ config KEXEC_JUMP
>  config CRASH_DUMP
>  	bool "kernel crash dumps"
>  	depends on ARCH_SUPPORTS_CRASH_DUMP
> -	depends on ARCH_SUPPORTS_KEXEC
>  	select CRASH_CORE
>  	select KEXEC_CORE
>  	help
> -- 
> 2.39.2
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-11-30  1:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-29 22:04 [PATCH] kexec: drop dependency on ARCH_SUPPORTS_KEXEC from CRASH_DUMP Ignat Korchagin
2023-11-29 22:23 ` Andrew Morton
2023-11-29 22:34   ` Ignat Korchagin
2023-11-29 22:54     ` Andrew Morton
2023-11-30  1:41 ` Baoquan He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox