* CONFIG_DEBUG_TEST_DRIVER_REMOVE needs a warning
@ 2016-10-06 23:53 Laura Abbott
2016-10-07 3:56 ` Greg Kroah-Hartman
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Laura Abbott @ 2016-10-06 23:53 UTC (permalink / raw)
To: Rob Herring, Arnd Bergmann, Greg Kroah-Hartman; +Cc: Linux Kernel Mailing List
On a whim, I decided to turn on CONFIG_DEBUG_TEST_DRIVER_REMOVE on
Fedora rawhide since it sounded harmless enough. It spewed warnings
and panicked some systems. Clearly it's doing its job
well of finding drivers that can't handle remove properly and I
underestimated it. I was expecting to maybe find a driver or two.
Can we get stronger Kconfig text indicating that this shouldn't be
turned on lightly? I'll be turning the option off in Fedora but sending
out reports from what was found.
Thanks,
Laura
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: CONFIG_DEBUG_TEST_DRIVER_REMOVE needs a warning 2016-10-06 23:53 CONFIG_DEBUG_TEST_DRIVER_REMOVE needs a warning Laura Abbott @ 2016-10-07 3:56 ` Greg Kroah-Hartman 2016-10-07 15:40 ` Laura Abbott 2016-10-07 4:06 ` Rob Herring 2016-10-07 16:09 ` [PATCH] driver core: Make Kconfig text for DEBUG_TEST_DRIVER_REMOVE stronger Laura Abbott 2 siblings, 1 reply; 12+ messages in thread From: Greg Kroah-Hartman @ 2016-10-07 3:56 UTC (permalink / raw) To: Laura Abbott; +Cc: Rob Herring, Arnd Bergmann, Linux Kernel Mailing List On Thu, Oct 06, 2016 at 04:53:20PM -0700, Laura Abbott wrote: > On a whim, I decided to turn on CONFIG_DEBUG_TEST_DRIVER_REMOVE on > Fedora rawhide since it sounded harmless enough. It spewed warnings > and panicked some systems. Clearly it's doing its job > well of finding drivers that can't handle remove properly and I > underestimated it. Yes, we knew it was going to find bugs, you were brave :) > I was expecting to maybe find a driver or two. > Can we get stronger Kconfig text indicating that this shouldn't be > turned on lightly? I'll be turning the option off in Fedora but sending > out reports from what was found. Care to send a patch with the wording change you would have found better to warn yourself not to do this? thanks, greg k-h ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: CONFIG_DEBUG_TEST_DRIVER_REMOVE needs a warning 2016-10-07 3:56 ` Greg Kroah-Hartman @ 2016-10-07 15:40 ` Laura Abbott 0 siblings, 0 replies; 12+ messages in thread From: Laura Abbott @ 2016-10-07 15:40 UTC (permalink / raw) To: Greg Kroah-Hartman; +Cc: Rob Herring, Arnd Bergmann, Linux Kernel Mailing List On 10/06/2016 08:56 PM, Greg Kroah-Hartman wrote: > On Thu, Oct 06, 2016 at 04:53:20PM -0700, Laura Abbott wrote: >> On a whim, I decided to turn on CONFIG_DEBUG_TEST_DRIVER_REMOVE on >> Fedora rawhide since it sounded harmless enough. It spewed warnings >> and panicked some systems. Clearly it's doing its job >> well of finding drivers that can't handle remove properly and I >> underestimated it. > > Yes, we knew it was going to find bugs, you were brave :) > Sure, let's go with brave. That makes me sound good ;) >> I was expecting to maybe find a driver or two. >> Can we get stronger Kconfig text indicating that this shouldn't be >> turned on lightly? I'll be turning the option off in Fedora but sending >> out reports from what was found. > > Care to send a patch with the wording change you would have found better > to warn yourself not to do this? > Sure. > thanks, > > greg k-h > Thanks, Laura ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: CONFIG_DEBUG_TEST_DRIVER_REMOVE needs a warning 2016-10-06 23:53 CONFIG_DEBUG_TEST_DRIVER_REMOVE needs a warning Laura Abbott 2016-10-07 3:56 ` Greg Kroah-Hartman @ 2016-10-07 4:06 ` Rob Herring 2016-10-07 15:45 ` Laura Abbott 2016-10-07 16:09 ` [PATCH] driver core: Make Kconfig text for DEBUG_TEST_DRIVER_REMOVE stronger Laura Abbott 2 siblings, 1 reply; 12+ messages in thread From: Rob Herring @ 2016-10-07 4:06 UTC (permalink / raw) To: Laura Abbott; +Cc: Arnd Bergmann, Greg Kroah-Hartman, Linux Kernel Mailing List On Thu, Oct 6, 2016 at 6:53 PM, Laura Abbott <labbott@redhat.com> wrote: > On a whim, I decided to turn on CONFIG_DEBUG_TEST_DRIVER_REMOVE on > Fedora rawhide since it sounded harmless enough. It spewed warnings > and panicked some systems. Clearly it's doing its job > well of finding drivers that can't handle remove properly and I > underestimated it. I was expecting to maybe find a driver or two. > Can we get stronger Kconfig text indicating that this shouldn't be > turned on lightly? I'll be turning the option off in Fedora but sending > out reports from what was found. It hides behind CONFIG_DEBUG already. Is there a better option that distros won't turn on? Rob ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: CONFIG_DEBUG_TEST_DRIVER_REMOVE needs a warning 2016-10-07 4:06 ` Rob Herring @ 2016-10-07 15:45 ` Laura Abbott 0 siblings, 0 replies; 12+ messages in thread From: Laura Abbott @ 2016-10-07 15:45 UTC (permalink / raw) To: Rob Herring; +Cc: Arnd Bergmann, Greg Kroah-Hartman, Linux Kernel Mailing List On 10/06/2016 09:06 PM, Rob Herring wrote: > On Thu, Oct 6, 2016 at 6:53 PM, Laura Abbott <labbott@redhat.com> wrote: >> On a whim, I decided to turn on CONFIG_DEBUG_TEST_DRIVER_REMOVE on >> Fedora rawhide since it sounded harmless enough. It spewed warnings >> and panicked some systems. Clearly it's doing its job >> well of finding drivers that can't handle remove properly and I >> underestimated it. I was expecting to maybe find a driver or two. >> Can we get stronger Kconfig text indicating that this shouldn't be >> turned on lightly? I'll be turning the option off in Fedora but sending >> out reports from what was found. > > It hides behind CONFIG_DEBUG already. Is there a better option that > distros won't turn on? For Fedora rawhide, we tend to turn on debug options that don't have a significant performance impact to hopefully make the kernel better for Fedora stable releases. Apart from a more explicit Kconfig text, you could hide it behind CONFIG_EXPERT which Fedora doesn't turn on and is more of a hint that this should only be used in specific circumstances. > > Rob > Thanks, Laura ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] driver core: Make Kconfig text for DEBUG_TEST_DRIVER_REMOVE stronger 2016-10-06 23:53 CONFIG_DEBUG_TEST_DRIVER_REMOVE needs a warning Laura Abbott 2016-10-07 3:56 ` Greg Kroah-Hartman 2016-10-07 4:06 ` Rob Herring @ 2016-10-07 16:09 ` Laura Abbott 2016-10-31 10:12 ` Geert Uytterhoeven 2 siblings, 1 reply; 12+ messages in thread From: Laura Abbott @ 2016-10-07 16:09 UTC (permalink / raw) To: Greg Kroah-Hartman, Rob Herring, Arnd Bergmann; +Cc: Laura Abbott, linux-kernel The current state of driver removal is not great. CONFIG_DEBUG_TEST_DRIVER_REMOVE finds lots of errors. The help text currently undersells exactly how many errors this option will find. Add a bit more description to indicate this option shouldn't be turned on unless you actually want to debug driver removal. The text can be changed later when more drivers are fixed up. Signed-off-by: Laura Abbott <labbott@redhat.com> --- drivers/base/Kconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index fdf44ca..d02e7c0 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -213,14 +213,16 @@ config DEBUG_DEVRES If you are unsure about this, Say N here. config DEBUG_TEST_DRIVER_REMOVE - bool "Test driver remove calls during probe" + bool "Test driver remove calls during probe (UNSTABLE)" depends on DEBUG_KERNEL help Say Y here if you want the Driver core to test driver remove functions by calling probe, remove, probe. This tests the remove path without having to unbind the driver or unload the driver module. - If you are unsure about this, say N here. + This option is expected to find errors and may render your system + unusable. You should say N here unless you are explicitly looking to + test this functionality. config SYS_HYPERVISOR bool -- 2.7.4 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] driver core: Make Kconfig text for DEBUG_TEST_DRIVER_REMOVE stronger 2016-10-07 16:09 ` [PATCH] driver core: Make Kconfig text for DEBUG_TEST_DRIVER_REMOVE stronger Laura Abbott @ 2016-10-31 10:12 ` Geert Uytterhoeven 2016-10-31 12:21 ` Greg Kroah-Hartman 0 siblings, 1 reply; 12+ messages in thread From: Geert Uytterhoeven @ 2016-10-31 10:12 UTC (permalink / raw) To: Laura Abbott Cc: Greg Kroah-Hartman, Rob Herring, Arnd Bergmann, linux-kernel@vger.kernel.org, linux-clk On Fri, Oct 7, 2016 at 6:09 PM, Laura Abbott <labbott@redhat.com> wrote: > The current state of driver removal is not great. > CONFIG_DEBUG_TEST_DRIVER_REMOVE finds lots of errors. The help text > currently undersells exactly how many errors this option will find. Add > a bit more description to indicate this option shouldn't be turned on > unless you actually want to debug driver removal. The text can be > changed later when more drivers are fixed up. Indeed, this is failing miserably for e.g. SoC clock drivers using platform_driver_probe(), which are never retried, rendering the complete system useless. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] driver core: Make Kconfig text for DEBUG_TEST_DRIVER_REMOVE stronger 2016-10-31 10:12 ` Geert Uytterhoeven @ 2016-10-31 12:21 ` Greg Kroah-Hartman 2016-10-31 12:28 ` Geert Uytterhoeven 0 siblings, 1 reply; 12+ messages in thread From: Greg Kroah-Hartman @ 2016-10-31 12:21 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Laura Abbott, Rob Herring, Arnd Bergmann, linux-kernel@vger.kernel.org, linux-clk On Mon, Oct 31, 2016 at 11:12:45AM +0100, Geert Uytterhoeven wrote: > On Fri, Oct 7, 2016 at 6:09 PM, Laura Abbott <labbott@redhat.com> wrote: > > The current state of driver removal is not great. > > CONFIG_DEBUG_TEST_DRIVER_REMOVE finds lots of errors. The help text > > currently undersells exactly how many errors this option will find. Add > > a bit more description to indicate this option shouldn't be turned on > > unless you actually want to debug driver removal. The text can be > > changed later when more drivers are fixed up. > > Indeed, this is failing miserably for e.g. SoC clock drivers using > platform_driver_probe(), which are never retried, rendering the complete > system useless. Why are they never retried? ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] driver core: Make Kconfig text for DEBUG_TEST_DRIVER_REMOVE stronger 2016-10-31 12:21 ` Greg Kroah-Hartman @ 2016-10-31 12:28 ` Geert Uytterhoeven 2016-10-31 14:10 ` Rob Herring 0 siblings, 1 reply; 12+ messages in thread From: Geert Uytterhoeven @ 2016-10-31 12:28 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Laura Abbott, Rob Herring, Arnd Bergmann, linux-kernel@vger.kernel.org, linux-clk Hi Greg, On Mon, Oct 31, 2016 at 1:21 PM, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote: > On Mon, Oct 31, 2016 at 11:12:45AM +0100, Geert Uytterhoeven wrote: >> On Fri, Oct 7, 2016 at 6:09 PM, Laura Abbott <labbott@redhat.com> wrote: >> > The current state of driver removal is not great. >> > CONFIG_DEBUG_TEST_DRIVER_REMOVE finds lots of errors. The help text >> > currently undersells exactly how many errors this option will find. Add >> > a bit more description to indicate this option shouldn't be turned on >> > unless you actually want to debug driver removal. The text can be >> > changed later when more drivers are fixed up. >> >> Indeed, this is failing miserably for e.g. SoC clock drivers using >> platform_driver_probe(), which are never retried, rendering the complete >> system useless. > > Why are they never retried? Because platform_driver_probe() is meant for non-hotpluggable devices, and unregisters the platform driver immediately if probe fails. See also the comments for __platform_driver_probe(): * Note that this is incompatible with deferred probing. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] driver core: Make Kconfig text for DEBUG_TEST_DRIVER_REMOVE stronger 2016-10-31 12:28 ` Geert Uytterhoeven @ 2016-10-31 14:10 ` Rob Herring 2016-10-31 15:07 ` Greg Kroah-Hartman 0 siblings, 1 reply; 12+ messages in thread From: Rob Herring @ 2016-10-31 14:10 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Greg Kroah-Hartman, Laura Abbott, Arnd Bergmann, linux-kernel@vger.kernel.org, linux-clk On Mon, Oct 31, 2016 at 7:28 AM, Geert Uytterhoeven <geert@linux-m68k.org> wrote: > Hi Greg, > > On Mon, Oct 31, 2016 at 1:21 PM, Greg Kroah-Hartman > <gregkh@linuxfoundation.org> wrote: >> On Mon, Oct 31, 2016 at 11:12:45AM +0100, Geert Uytterhoeven wrote: >>> On Fri, Oct 7, 2016 at 6:09 PM, Laura Abbott <labbott@redhat.com> wrote: >>> > The current state of driver removal is not great. >>> > CONFIG_DEBUG_TEST_DRIVER_REMOVE finds lots of errors. The help text >>> > currently undersells exactly how many errors this option will find. Add >>> > a bit more description to indicate this option shouldn't be turned on >>> > unless you actually want to debug driver removal. The text can be >>> > changed later when more drivers are fixed up. >>> >>> Indeed, this is failing miserably for e.g. SoC clock drivers using >>> platform_driver_probe(), which are never retried, rendering the complete >>> system useless. >> >> Why are they never retried? > > Because platform_driver_probe() is meant for non-hotpluggable devices, > and unregisters the platform driver immediately if probe fails. > See also the comments for __platform_driver_probe(): My patch "driver core: skip removal test for non-removable drivers" fixes this case. It seems to have dropped from Greg's queue, so I'll resend. Rob ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] driver core: Make Kconfig text for DEBUG_TEST_DRIVER_REMOVE stronger 2016-10-31 14:10 ` Rob Herring @ 2016-10-31 15:07 ` Greg Kroah-Hartman 2016-10-31 15:07 ` Greg Kroah-Hartman 0 siblings, 1 reply; 12+ messages in thread From: Greg Kroah-Hartman @ 2016-10-31 15:07 UTC (permalink / raw) To: Rob Herring Cc: Geert Uytterhoeven, Laura Abbott, Arnd Bergmann, linux-kernel@vger.kernel.org, linux-clk On Mon, Oct 31, 2016 at 09:10:57AM -0500, Rob Herring wrote: > On Mon, Oct 31, 2016 at 7:28 AM, Geert Uytterhoeven > <geert@linux-m68k.org> wrote: > > Hi Greg, > > > > On Mon, Oct 31, 2016 at 1:21 PM, Greg Kroah-Hartman > > <gregkh@linuxfoundation.org> wrote: > >> On Mon, Oct 31, 2016 at 11:12:45AM +0100, Geert Uytterhoeven wrote: > >>> On Fri, Oct 7, 2016 at 6:09 PM, Laura Abbott <labbott@redhat.com> wrote: > >>> > The current state of driver removal is not great. > >>> > CONFIG_DEBUG_TEST_DRIVER_REMOVE finds lots of errors. The help text > >>> > currently undersells exactly how many errors this option will find. Add > >>> > a bit more description to indicate this option shouldn't be turned on > >>> > unless you actually want to debug driver removal. The text can be > >>> > changed later when more drivers are fixed up. > >>> > >>> Indeed, this is failing miserably for e.g. SoC clock drivers using > >>> platform_driver_probe(), which are never retried, rendering the complete > >>> system useless. > >> > >> Why are they never retried? > > > > Because platform_driver_probe() is meant for non-hotpluggable devices, > > and unregisters the platform driver immediately if probe fails. > > See also the comments for __platform_driver_probe(): > > My patch "driver core: skip removal test for non-removable drivers" > fixes this case. It seems to have dropped from Greg's queue, so I'll > resend. Odd, I don't see that anywhere here, sorry about that... ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] driver core: Make Kconfig text for DEBUG_TEST_DRIVER_REMOVE stronger 2016-10-31 15:07 ` Greg Kroah-Hartman @ 2016-10-31 15:07 ` Greg Kroah-Hartman 0 siblings, 0 replies; 12+ messages in thread From: Greg Kroah-Hartman @ 2016-10-31 15:07 UTC (permalink / raw) To: Rob Herring Cc: Geert Uytterhoeven, Laura Abbott, Arnd Bergmann, linux-kernel@vger.kernel.org, linux-clk On Mon, Oct 31, 2016 at 09:07:24AM -0600, Greg Kroah-Hartman wrote: > On Mon, Oct 31, 2016 at 09:10:57AM -0500, Rob Herring wrote: > > On Mon, Oct 31, 2016 at 7:28 AM, Geert Uytterhoeven > > <geert@linux-m68k.org> wrote: > > > Hi Greg, > > > > > > On Mon, Oct 31, 2016 at 1:21 PM, Greg Kroah-Hartman > > > <gregkh@linuxfoundation.org> wrote: > > >> On Mon, Oct 31, 2016 at 11:12:45AM +0100, Geert Uytterhoeven wrote: > > >>> On Fri, Oct 7, 2016 at 6:09 PM, Laura Abbott <labbott@redhat.com> wrote: > > >>> > The current state of driver removal is not great. > > >>> > CONFIG_DEBUG_TEST_DRIVER_REMOVE finds lots of errors. The help text > > >>> > currently undersells exactly how many errors this option will find. Add > > >>> > a bit more description to indicate this option shouldn't be turned on > > >>> > unless you actually want to debug driver removal. The text can be > > >>> > changed later when more drivers are fixed up. > > >>> > > >>> Indeed, this is failing miserably for e.g. SoC clock drivers using > > >>> platform_driver_probe(), which are never retried, rendering the complete > > >>> system useless. > > >> > > >> Why are they never retried? > > > > > > Because platform_driver_probe() is meant for non-hotpluggable devices, > > > and unregisters the platform driver immediately if probe fails. > > > See also the comments for __platform_driver_probe(): > > > > My patch "driver core: skip removal test for non-removable drivers" > > fixes this case. It seems to have dropped from Greg's queue, so I'll > > resend. > > Odd, I don't see that anywhere here, sorry about that... Ah, found it, will queue it up now. ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-10-31 15:07 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-10-06 23:53 CONFIG_DEBUG_TEST_DRIVER_REMOVE needs a warning Laura Abbott 2016-10-07 3:56 ` Greg Kroah-Hartman 2016-10-07 15:40 ` Laura Abbott 2016-10-07 4:06 ` Rob Herring 2016-10-07 15:45 ` Laura Abbott 2016-10-07 16:09 ` [PATCH] driver core: Make Kconfig text for DEBUG_TEST_DRIVER_REMOVE stronger Laura Abbott 2016-10-31 10:12 ` Geert Uytterhoeven 2016-10-31 12:21 ` Greg Kroah-Hartman 2016-10-31 12:28 ` Geert Uytterhoeven 2016-10-31 14:10 ` Rob Herring 2016-10-31 15:07 ` Greg Kroah-Hartman 2016-10-31 15:07 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).