* [PATCH] x86: select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y
@ 2024-02-04 12:20 Masahiro Yamada
2024-03-20 15:30 ` Masahiro Yamada
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Masahiro Yamada @ 2024-02-04 12:20 UTC (permalink / raw)
To: x86
Cc: Josh Poimboeuf, Masahiro Yamada, Borislav Petkov, Dave Hansen,
H. Peter Anvin, Ingo Molnar, Thomas Gleixner, linux-kernel
It took me some time to understand the purpose of the tricky code at
the end of arch/x86/Kconfig.debug.
Without it, the following would be shown:
WARNING: unmet direct dependencies detected for FRAME_POINTER
because commit 81d387190039 ("x86/kconfig: Consolidate unwinders into
multiple choice selection") removed 'select ARCH_WANT_FRAME_POINTERS'.
The correct and more straightforward approach should have been to move
it where 'select FRAME_POINTER' is located.
Several architectures properly handle the conditional selection of
ARCH_WANT_FRAME_POINTERS. For example, 'config UNWINDER_FRAME_POINTER'
in arch/arm/Kconfig.debug.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/x86/Kconfig.debug | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index c5d614d28a75..74777a97e394 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -248,6 +248,7 @@ config UNWINDER_ORC
config UNWINDER_FRAME_POINTER
bool "Frame pointer unwinder"
+ select ARCH_WANT_FRAME_POINTERS
select FRAME_POINTER
help
This option enables the frame pointer unwinder for unwinding kernel
@@ -271,7 +272,3 @@ config UNWINDER_GUESS
overhead.
endchoice
-
-config FRAME_POINTER
- depends on !UNWINDER_ORC && !UNWINDER_GUESS
- bool
--
2.40.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86: select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y
2024-02-04 12:20 [PATCH] x86: select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y Masahiro Yamada
@ 2024-03-20 15:30 ` Masahiro Yamada
2024-05-17 7:18 ` Masahiro Yamada
2024-05-18 1:47 ` Josh Poimboeuf
2024-05-20 9:52 ` [tip: x86/urgent] x86/kconfig: Select " tip-bot2 for Masahiro Yamada
2 siblings, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2024-03-20 15:30 UTC (permalink / raw)
To: x86
Cc: Josh Poimboeuf, Borislav Petkov, Dave Hansen, H. Peter Anvin,
Ingo Molnar, Thomas Gleixner, linux-kernel
Ping?
On Sun, Feb 4, 2024 at 9:20 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> It took me some time to understand the purpose of the tricky code at
> the end of arch/x86/Kconfig.debug.
>
> Without it, the following would be shown:
>
> WARNING: unmet direct dependencies detected for FRAME_POINTER
>
> because commit 81d387190039 ("x86/kconfig: Consolidate unwinders into
> multiple choice selection") removed 'select ARCH_WANT_FRAME_POINTERS'.
>
> The correct and more straightforward approach should have been to move
> it where 'select FRAME_POINTER' is located.
>
> Several architectures properly handle the conditional selection of
> ARCH_WANT_FRAME_POINTERS. For example, 'config UNWINDER_FRAME_POINTER'
> in arch/arm/Kconfig.debug.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> arch/x86/Kconfig.debug | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
> index c5d614d28a75..74777a97e394 100644
> --- a/arch/x86/Kconfig.debug
> +++ b/arch/x86/Kconfig.debug
> @@ -248,6 +248,7 @@ config UNWINDER_ORC
>
> config UNWINDER_FRAME_POINTER
> bool "Frame pointer unwinder"
> + select ARCH_WANT_FRAME_POINTERS
> select FRAME_POINTER
> help
> This option enables the frame pointer unwinder for unwinding kernel
> @@ -271,7 +272,3 @@ config UNWINDER_GUESS
> overhead.
>
> endchoice
> -
> -config FRAME_POINTER
> - depends on !UNWINDER_ORC && !UNWINDER_GUESS
> - bool
> --
> 2.40.1
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86: select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y
2024-03-20 15:30 ` Masahiro Yamada
@ 2024-05-17 7:18 ` Masahiro Yamada
0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2024-05-17 7:18 UTC (permalink / raw)
To: x86
Cc: Josh Poimboeuf, Borislav Petkov, Dave Hansen, H. Peter Anvin,
Ingo Molnar, Thomas Gleixner, linux-kernel
Hi, x86 maintainers
Please check this.
And, please also note the current code is incorrect,
and it may get broken with future Kconfig refactoring.
On Thu, Mar 21, 2024 at 12:30 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Ping?
>
>
> On Sun, Feb 4, 2024 at 9:20 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > It took me some time to understand the purpose of the tricky code at
> > the end of arch/x86/Kconfig.debug.
> >
> > Without it, the following would be shown:
> >
> > WARNING: unmet direct dependencies detected for FRAME_POINTER
> >
> > because commit 81d387190039 ("x86/kconfig: Consolidate unwinders into
> > multiple choice selection") removed 'select ARCH_WANT_FRAME_POINTERS'.
> >
> > The correct and more straightforward approach should have been to move
> > it where 'select FRAME_POINTER' is located.
> >
> > Several architectures properly handle the conditional selection of
> > ARCH_WANT_FRAME_POINTERS. For example, 'config UNWINDER_FRAME_POINTER'
> > in arch/arm/Kconfig.debug.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> > arch/x86/Kconfig.debug | 5 +----
> > 1 file changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
> > index c5d614d28a75..74777a97e394 100644
> > --- a/arch/x86/Kconfig.debug
> > +++ b/arch/x86/Kconfig.debug
> > @@ -248,6 +248,7 @@ config UNWINDER_ORC
> >
> > config UNWINDER_FRAME_POINTER
> > bool "Frame pointer unwinder"
> > + select ARCH_WANT_FRAME_POINTERS
> > select FRAME_POINTER
> > help
> > This option enables the frame pointer unwinder for unwinding kernel
> > @@ -271,7 +272,3 @@ config UNWINDER_GUESS
> > overhead.
> >
> > endchoice
> > -
> > -config FRAME_POINTER
> > - depends on !UNWINDER_ORC && !UNWINDER_GUESS
> > - bool
> > --
> > 2.40.1
> >
>
>
> --
> Best Regards
> Masahiro Yamada
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86: select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y
2024-02-04 12:20 [PATCH] x86: select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y Masahiro Yamada
2024-03-20 15:30 ` Masahiro Yamada
@ 2024-05-18 1:47 ` Josh Poimboeuf
2024-05-20 9:52 ` [tip: x86/urgent] x86/kconfig: Select " tip-bot2 for Masahiro Yamada
2 siblings, 0 replies; 5+ messages in thread
From: Josh Poimboeuf @ 2024-05-18 1:47 UTC (permalink / raw)
To: Masahiro Yamada
Cc: x86, Borislav Petkov, Dave Hansen, H. Peter Anvin, Ingo Molnar,
Thomas Gleixner, linux-kernel
On Sun, Feb 04, 2024 at 09:20:03PM +0900, Masahiro Yamada wrote:
> It took me some time to understand the purpose of the tricky code at
> the end of arch/x86/Kconfig.debug.
>
> Without it, the following would be shown:
>
> WARNING: unmet direct dependencies detected for FRAME_POINTER
>
> because commit 81d387190039 ("x86/kconfig: Consolidate unwinders into
> multiple choice selection") removed 'select ARCH_WANT_FRAME_POINTERS'.
>
> The correct and more straightforward approach should have been to move
> it where 'select FRAME_POINTER' is located.
>
> Several architectures properly handle the conditional selection of
> ARCH_WANT_FRAME_POINTERS. For example, 'config UNWINDER_FRAME_POINTER'
> in arch/arm/Kconfig.debug.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Looks good, thanks for fixing that!
Fixes: 81d387190039 ("x86/kconfig: Consolidate unwinders into multiple choice selection")
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
--
Josh
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip: x86/urgent] x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y
2024-02-04 12:20 [PATCH] x86: select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y Masahiro Yamada
2024-03-20 15:30 ` Masahiro Yamada
2024-05-18 1:47 ` Josh Poimboeuf
@ 2024-05-20 9:52 ` tip-bot2 for Masahiro Yamada
2 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Masahiro Yamada @ 2024-05-20 9:52 UTC (permalink / raw)
To: linux-tip-commits
Cc: Masahiro Yamada, Borislav Petkov (AMD),
Josh Poimboeuf, x86, linux-kernel
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 66ee3636eddcc82ab82b539d08b85fb5ac1dff9b
Gitweb: https://git.kernel.org/tip/66ee3636eddcc82ab82b539d08b85fb5ac1dff9b
Author: Masahiro Yamada <masahiroy@kernel.org>
AuthorDate: Sun, 04 Feb 2024 21:20:03 +09:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Mon, 20 May 2024 11:37:23 +02:00
x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y
It took me some time to understand the purpose of the tricky code at
the end of arch/x86/Kconfig.debug.
Without it, the following would be shown:
WARNING: unmet direct dependencies detected for FRAME_POINTER
because
81d387190039 ("x86/kconfig: Consolidate unwinders into multiple choice selection")
removed 'select ARCH_WANT_FRAME_POINTERS'.
The correct and more straightforward approach should have been to move
it where 'select FRAME_POINTER' is located.
Several architectures properly handle the conditional selection of
ARCH_WANT_FRAME_POINTERS. For example, 'config UNWINDER_FRAME_POINTER'
in arch/arm/Kconfig.debug.
Fixes: 81d387190039 ("x86/kconfig: Consolidate unwinders into multiple choice selection")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Link: https://lore.kernel.org/r/20240204122003.53795-1-masahiroy@kernel.org
---
arch/x86/Kconfig.debug | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index c5d614d..74777a9 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -248,6 +248,7 @@ config UNWINDER_ORC
config UNWINDER_FRAME_POINTER
bool "Frame pointer unwinder"
+ select ARCH_WANT_FRAME_POINTERS
select FRAME_POINTER
help
This option enables the frame pointer unwinder for unwinding kernel
@@ -271,7 +272,3 @@ config UNWINDER_GUESS
overhead.
endchoice
-
-config FRAME_POINTER
- depends on !UNWINDER_ORC && !UNWINDER_GUESS
- bool
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-20 9:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04 12:20 [PATCH] x86: select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y Masahiro Yamada
2024-03-20 15:30 ` Masahiro Yamada
2024-05-17 7:18 ` Masahiro Yamada
2024-05-18 1:47 ` Josh Poimboeuf
2024-05-20 9:52 ` [tip: x86/urgent] x86/kconfig: Select " tip-bot2 for Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®