* FAILED: patch "[PATCH] drm: Select DRM_KMS_HELPER from" failed to apply to 6.6-stable tree
@ 2025-05-05 7:53 gregkh
2025-05-05 8:33 ` Janne Grunau
0 siblings, 1 reply; 5+ messages in thread
From: gregkh @ 2025-05-05 7:53 UTC (permalink / raw)
To: j, alyssa, tzimmermann; +Cc: stable
The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 32dce6b1949a696dc7abddc04de8cbe35c260217
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2025050504-placate-iodize-9693@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 32dce6b1949a696dc7abddc04de8cbe35c260217 Mon Sep 17 00:00:00 2001
From: Janne Grunau <j@jannau.net>
Date: Tue, 4 Mar 2025 20:12:14 +0100
Subject: [PATCH] drm: Select DRM_KMS_HELPER from
DRM_DEBUG_DP_MST_TOPOLOGY_REFS
Using "depends on" and "select" for the same Kconfig symbol is known to
cause circular dependencies (cmp. "Kconfig recursive dependency
limitations" in Documentation/kbuild/kconfig-language.rst.
DRM drivers are selecting drm helpers so do the same for
DRM_DEBUG_DP_MST_TOPOLOGY_REFS.
Fixes following circular dependency reported on x86 for the downstream
Asahi Linux tree:
error: recursive dependency detected!
symbol DRM_KMS_HELPER is selected by DRM_GEM_SHMEM_HELPER
symbol DRM_GEM_SHMEM_HELPER is selected by RUST_DRM_GEM_SHMEM_HELPER
symbol RUST_DRM_GEM_SHMEM_HELPER is selected by DRM_ASAHI
symbol DRM_ASAHI depends on RUST
symbol RUST depends on CALL_PADDING
symbol CALL_PADDING depends on OBJTOOL
symbol OBJTOOL is selected by STACK_VALIDATION
symbol STACK_VALIDATION depends on UNWINDER_FRAME_POINTER
symbol UNWINDER_FRAME_POINTER is part of choice block at arch/x86/Kconfig.debug:224
symbol <choice> unknown is visible depending on UNWINDER_GUESS
symbol UNWINDER_GUESS prompt is visible depending on STACKDEPOT
symbol STACKDEPOT is selected by DRM_DEBUG_DP_MST_TOPOLOGY_REFS
symbol DRM_DEBUG_DP_MST_TOPOLOGY_REFS depends on DRM_KMS_HELPER
Fixes: 12a280c72868 ("drm/dp_mst: Add topology ref history tracking for debugging")
Cc: stable@vger.kernel.org
Signed-off-by: Janne Grunau <j@jannau.net>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250304-drm_debug_dp_mst_topo_kconfig-v1-1-e16fd152f258@jannau.net
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 2cba2b6ebe1c..f01925ed8176 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -188,7 +188,7 @@ config DRM_DEBUG_DP_MST_TOPOLOGY_REFS
bool "Enable refcount backtrace history in the DP MST helpers"
depends on STACKTRACE_SUPPORT
select STACKDEPOT
- depends on DRM_KMS_HELPER
+ select DRM_KMS_HELPER
depends on DEBUG_KERNEL
depends on EXPERT
help
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: FAILED: patch "[PATCH] drm: Select DRM_KMS_HELPER from" failed to apply to 6.6-stable tree
2025-05-05 7:53 FAILED: patch "[PATCH] drm: Select DRM_KMS_HELPER from" failed to apply to 6.6-stable tree gregkh
@ 2025-05-05 8:33 ` Janne Grunau
2025-05-05 8:49 ` Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Janne Grunau @ 2025-05-05 8:33 UTC (permalink / raw)
To: Greg Kroah-Hartman, Alyssa Rosenzweig, Thomas Zimmermann
Cc: stable@vger.kernel.org
Hej,
On Mon, May 5, 2025, at 09:53, gregkh@linuxfoundation.org wrote:
> The patch below does not apply to the 6.6-stable tree. If someone
> wants it applied there, or to any other stable or longterm tree, then
> please email the backport, including the original git commit id to
> <stable@vger.kernel.org>.
>
> To reproduce the conflict and resubmit, you may use the following
> commands:
>
> git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
> git checkout FETCH_HEAD
> git cherry-pick -x 32dce6b1949a696dc7abddc04de8cbe35c260217
This works for me without conflicts. Are there git configs which might
influence this? The only noticeable thing is that the position of the
DRM_DEBUG_DP_MST_TOPOLOGY_REFS entry shifted 82 lines down. I looked
at the history of drivers/gpu/drm/Kconfig and the config
DRM_DEBUG_DP_MST_TOPOLOGY_REFS block hasn't changed since v5.10. So I
would expect the cherry-pick to work.
Having said all that I don't know how important it is to have this in
older stable releases when nobody noticed it before. The issue presents
itself only with out-of-tree rust DRM drivers. I don't expect that
anyone will try to backport those to old stable releases.
I'm fine with skipping this commit for stable releases for 6.6 and older
and won't post backports.
Janne
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: FAILED: patch "[PATCH] drm: Select DRM_KMS_HELPER from" failed to apply to 6.6-stable tree
2025-05-05 8:33 ` Janne Grunau
@ 2025-05-05 8:49 ` Greg Kroah-Hartman
2025-05-05 10:51 ` Janne Grunau
0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-05 8:49 UTC (permalink / raw)
To: Janne Grunau; +Cc: Alyssa Rosenzweig, Thomas Zimmermann, stable@vger.kernel.org
On Mon, May 05, 2025 at 10:33:49AM +0200, Janne Grunau wrote:
> Hej,
>
> On Mon, May 5, 2025, at 09:53, gregkh@linuxfoundation.org wrote:
> > The patch below does not apply to the 6.6-stable tree. If someone
> > wants it applied there, or to any other stable or longterm tree, then
> > please email the backport, including the original git commit id to
> > <stable@vger.kernel.org>.
> >
> > To reproduce the conflict and resubmit, you may use the following
> > commands:
> >
> > git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
> > git checkout FETCH_HEAD
> > git cherry-pick -x 32dce6b1949a696dc7abddc04de8cbe35c260217
>
> This works for me without conflicts. Are there git configs which might
> influence this? The only noticeable thing is that the position of the
> DRM_DEBUG_DP_MST_TOPOLOGY_REFS entry shifted 82 lines down. I looked
> at the history of drivers/gpu/drm/Kconfig and the config
> DRM_DEBUG_DP_MST_TOPOLOGY_REFS block hasn't changed since v5.10. So I
> would expect the cherry-pick to work.
It applies cleanly, but breaks the build badly. Try it and see :)
> Having said all that I don't know how important it is to have this in
> older stable releases when nobody noticed it before. The issue presents
> itself only with out-of-tree rust DRM drivers. I don't expect that
> anyone will try to backport those to old stable releases.
>
> I'm fine with skipping this commit for stable releases for 6.6 and older
> and won't post backports.
Ok, thanks!
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: FAILED: patch "[PATCH] drm: Select DRM_KMS_HELPER from" failed to apply to 6.6-stable tree
2025-05-05 8:49 ` Greg Kroah-Hartman
@ 2025-05-05 10:51 ` Janne Grunau
2025-05-06 6:19 ` Randy Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Janne Grunau @ 2025-05-05 10:51 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Alyssa Rosenzweig, Thomas Zimmermann, stable@vger.kernel.org,
Masahiro Yamada, linux-kbuild
[-- Attachment #1: Type: text/plain, Size: 2011 bytes --]
Hej,
On Mon, May 5, 2025, at 10:49, Greg Kroah-Hartman wrote:
> On Mon, May 05, 2025 at 10:33:49AM +0200, Janne Grunau wrote:
>> Hej,
>>
>> On Mon, May 5, 2025, at 09:53, gregkh@linuxfoundation.org wrote:
>> > The patch below does not apply to the 6.6-stable tree. If someone
>> > wants it applied there, or to any other stable or longterm tree, then
>> > please email the backport, including the original git commit id to
>> > <stable@vger.kernel.org>.
>> >
>> > To reproduce the conflict and resubmit, you may use the following
>> > commands:
>> >
>> > git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
>> > git checkout FETCH_HEAD
>> > git cherry-pick -x 32dce6b1949a696dc7abddc04de8cbe35c260217
>>
>> This works for me without conflicts. Are there git configs which might
>> influence this? The only noticeable thing is that the position of the
>> DRM_DEBUG_DP_MST_TOPOLOGY_REFS entry shifted 82 lines down. I looked
>> at the history of drivers/gpu/drm/Kconfig and the config
>> DRM_DEBUG_DP_MST_TOPOLOGY_REFS block hasn't changed since v5.10. So I
>> would expect the cherry-pick to work.
>
> It applies cleanly, but breaks the build badly. Try it and see :)
Indeed. The issue is caused by turning CONFIG_DRM_KMS_HELPER from 'm'
to 'y' while leaving CONFIG_DRM as 'm'. This is clearly broken and not intended.
It's exactly what Documentation/kbuild/kconfig-language.rst warns about. OTOH
it also warns about using both 'depends on' and 'select' on the same symbol
which blows up here.
I don't see which change between in v6.6..v6.12 for scripts/kconfig could have
changed this.
Using "select DRM_KMS_HELPER if DRM" fixes the linux-6.6.y build. I only
discovered this as possible solution from the commit message of commit
77a92660d8fe ("kconfig: remove wrong expr_trans_bool()").
CC-ing kconfig maintainer for clarification if "select DRM_KMS_HELPER if
DRM" is a valid solution for this issue. Commit causing issue replicated below
for context.
thanks,
Janne
[-- Attachment #2: 0001-drm-Select-DRM_KMS_HELPER-from-DRM_DEBUG_DP_MST_TOPO.patch --]
[-- Type: text/x-patch, Size: 2407 bytes --]
From 32dce6b1949a696dc7abddc04de8cbe35c260217 Mon Sep 17 00:00:00 2001
From: Janne Grunau <j@jannau.net>
Date: Tue, 4 Mar 2025 20:12:14 +0100
Subject: [PATCH 1/1] drm: Select DRM_KMS_HELPER from
DRM_DEBUG_DP_MST_TOPOLOGY_REFS
Using "depends on" and "select" for the same Kconfig symbol is known to
cause circular dependencies (cmp. "Kconfig recursive dependency
limitations" in Documentation/kbuild/kconfig-language.rst.
DRM drivers are selecting drm helpers so do the same for
DRM_DEBUG_DP_MST_TOPOLOGY_REFS.
Fixes following circular dependency reported on x86 for the downstream
Asahi Linux tree:
error: recursive dependency detected!
symbol DRM_KMS_HELPER is selected by DRM_GEM_SHMEM_HELPER
symbol DRM_GEM_SHMEM_HELPER is selected by RUST_DRM_GEM_SHMEM_HELPER
symbol RUST_DRM_GEM_SHMEM_HELPER is selected by DRM_ASAHI
symbol DRM_ASAHI depends on RUST
symbol RUST depends on CALL_PADDING
symbol CALL_PADDING depends on OBJTOOL
symbol OBJTOOL is selected by STACK_VALIDATION
symbol STACK_VALIDATION depends on UNWINDER_FRAME_POINTER
symbol UNWINDER_FRAME_POINTER is part of choice block at arch/x86/Kconfig.debug:224
symbol <choice> unknown is visible depending on UNWINDER_GUESS
symbol UNWINDER_GUESS prompt is visible depending on STACKDEPOT
symbol STACKDEPOT is selected by DRM_DEBUG_DP_MST_TOPOLOGY_REFS
symbol DRM_DEBUG_DP_MST_TOPOLOGY_REFS depends on DRM_KMS_HELPER
Fixes: 12a280c72868 ("drm/dp_mst: Add topology ref history tracking for debugging")
Cc: stable@vger.kernel.org
Signed-off-by: Janne Grunau <j@jannau.net>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250304-drm_debug_dp_mst_topo_kconfig-v1-1-e16fd152f258@jannau.net
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
---
drivers/gpu/drm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 2cba2b6ebe1c..f01925ed8176 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -188,7 +188,7 @@ config DRM_DEBUG_DP_MST_TOPOLOGY_REFS
bool "Enable refcount backtrace history in the DP MST helpers"
depends on STACKTRACE_SUPPORT
select STACKDEPOT
- depends on DRM_KMS_HELPER
+ select DRM_KMS_HELPER
depends on DEBUG_KERNEL
depends on EXPERT
help
--
2.49.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: FAILED: patch "[PATCH] drm: Select DRM_KMS_HELPER from" failed to apply to 6.6-stable tree
2025-05-05 10:51 ` Janne Grunau
@ 2025-05-06 6:19 ` Randy Dunlap
0 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2025-05-06 6:19 UTC (permalink / raw)
To: Janne Grunau, Greg Kroah-Hartman
Cc: Alyssa Rosenzweig, Thomas Zimmermann, stable@vger.kernel.org,
Masahiro Yamada, linux-kbuild
Hi,
On 5/5/25 3:51 AM, Janne Grunau wrote:
> Hej,
>
> On Mon, May 5, 2025, at 10:49, Greg Kroah-Hartman wrote:
>> On Mon, May 05, 2025 at 10:33:49AM +0200, Janne Grunau wrote:
>>> Hej,
>>>
>>> On Mon, May 5, 2025, at 09:53, gregkh@linuxfoundation.org wrote:
>>>> The patch below does not apply to the 6.6-stable tree. If someone
>>>> wants it applied there, or to any other stable or longterm tree, then
>>>> please email the backport, including the original git commit id to
>>>> <stable@vger.kernel.org>.
>>>>
>>>> To reproduce the conflict and resubmit, you may use the following
>>>> commands:
>>>>
>>>> git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
>>>> git checkout FETCH_HEAD
>>>> git cherry-pick -x 32dce6b1949a696dc7abddc04de8cbe35c260217
>>>
>>> This works for me without conflicts. Are there git configs which might
>>> influence this? The only noticeable thing is that the position of the
>>> DRM_DEBUG_DP_MST_TOPOLOGY_REFS entry shifted 82 lines down. I looked
>>> at the history of drivers/gpu/drm/Kconfig and the config
>>> DRM_DEBUG_DP_MST_TOPOLOGY_REFS block hasn't changed since v5.10. So I
>>> would expect the cherry-pick to work.
>>
>> It applies cleanly, but breaks the build badly. Try it and see :)
>
> Indeed. The issue is caused by turning CONFIG_DRM_KMS_HELPER from 'm'
> to 'y' while leaving CONFIG_DRM as 'm'. This is clearly broken and not intended.
> It's exactly what Documentation/kbuild/kconfig-language.rst warns about. OTOH
> it also warns about using both 'depends on' and 'select' on the same symbol
> which blows up here.
> I don't see which change between in v6.6..v6.12 for scripts/kconfig could have
> changed this.
>
> Using "select DRM_KMS_HELPER if DRM" fixes the linux-6.6.y build. I only
> discovered this as possible solution from the commit message of commit
> 77a92660d8fe ("kconfig: remove wrong expr_trans_bool()").
>
> CC-ing kconfig maintainer for clarification if "select DRM_KMS_HELPER if
> DRM" is a valid solution for this issue. Commit causing issue replicated below
> for context.
I would just add one more line to the Kconfig:
config DRM_DEBUG_DP_MST_TOPOLOGY_REFS
bool "Enable refcount backtrace history in the DP MST helpers"
+ depends on DRM
depends on STACKTRACE_SUPPORT
select STACKDEPOT
- depends on DRM_KMS_HELPER
+ select DRM_KMS_HELPER
depends on DEBUG_KERNEL
depends on EXPERT
help
No problems with that in my testing.
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-05-06 6:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-05 7:53 FAILED: patch "[PATCH] drm: Select DRM_KMS_HELPER from" failed to apply to 6.6-stable tree gregkh
2025-05-05 8:33 ` Janne Grunau
2025-05-05 8:49 ` Greg Kroah-Hartman
2025-05-05 10:51 ` Janne Grunau
2025-05-06 6:19 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox