Discussion:
[PATCH] tiny: reverse logic for DISABLE_DEV_COREDUMP
Aristeu Rozanski
2014-10-15 15:25:23 UTC
Permalink
It's desirable for allnconfig and tinyconfig targets to result in the
least amount of code possible. DISABLE_DEV_COREDUMP exists as a way to
switch off DEV_COREDUMP regardless if any drivers select
WANT_DEV_COREDUMP.

This patch renames the option to ENABLE_DEV_COREDUMP and setting it to
'n' (as in allnconfig or tinyconfig) will effectively disable device
coredump.

Cc: Greg Kroah-Hartman <***@linuxfoundation.org>
Cc: Josh Triplett <***@joshtriplett.org>
Reviewed-by: Josh Triplett <***@joshtriplett.org>
Signed-off-by: Aristeu Rozanski <***@redhat.com>

diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index 134f763..63a5702 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -171,20 +171,23 @@ config WANT_DEV_COREDUMP
Drivers should "select" this option if they desire to use the
device coredump mechanism.

-config DISABLE_DEV_COREDUMP
- bool "Disable device coredump" if EXPERT
+config ENABLE_DEV_COREDUMP
+ bool "Enable device coredump" if EXPERT
+ default y
help
- Disable the device coredump mechanism despite drivers wanting to
- use it; this allows for more sensitive systems or systems that
- don't want to ever access the information to not have the code,
- nor keep any data.
+ This option controls if the device coredump mechanism is available or
+ not; if disabled, the mechanism will be omitted even if drivers that
+ can use it are enabled.
+ Say 'N' for more sensitive systems or systems that don't want
+ to ever access the information to not have the code, nor keep any
+ data.

- If unsure, say N.
+ If unsure, say Y.

config DEV_COREDUMP
bool
default y if WANT_DEV_COREDUMP
- depends on !DISABLE_DEV_COREDUMP
+ depends on ENABLE_DEV_COREDUMP

config DEBUG_DRIVER
bool "Driver Core verbose debug messages"
Greg Kroah-Hartman
2014-10-15 23:14:46 UTC
Permalink
Post by Aristeu Rozanski
It's desirable for allnconfig and tinyconfig targets to result in the
least amount of code possible. DISABLE_DEV_COREDUMP exists as a way to
switch off DEV_COREDUMP regardless if any drivers select
WANT_DEV_COREDUMP.
This patch renames the option to ENABLE_DEV_COREDUMP and setting it to
'n' (as in allnconfig or tinyconfig) will effectively disable device
coredump.
Any reason you didn't cc: the author of this feature / Kconfig option
about this change you are proposing?

Please resend it with the maintainer of this code in the distribution
list.

greg k-h
Josh Triplett
2014-10-16 03:51:58 UTC
Permalink
Post by Greg Kroah-Hartman
Post by Aristeu Rozanski
It's desirable for allnconfig and tinyconfig targets to result in the
least amount of code possible. DISABLE_DEV_COREDUMP exists as a way to
switch off DEV_COREDUMP regardless if any drivers select
WANT_DEV_COREDUMP.
This patch renames the option to ENABLE_DEV_COREDUMP and setting it to
'n' (as in allnconfig or tinyconfig) will effectively disable device
coredump.
Any reason you didn't cc: the author of this feature / Kconfig option
about this change you are proposing?
Likely my fault; I'd suggested using get_maintainer.pl, which does not
show that for this patch:

~/src/linux$ scripts/get_maintainer.pl < /tmp/patch
Greg Kroah-Hartman <***@linuxfoundation.org> (supporter:DRIVER CORE, KOBJ...)
linux-***@vger.kernel.org (open list)
Josh Triplett
2014-10-16 10:24:05 UTC
Permalink
Post by Josh Triplett
Post by Greg Kroah-Hartman
Post by Aristeu Rozanski
It's desirable for allnconfig and tinyconfig targets to result in the
least amount of code possible. DISABLE_DEV_COREDUMP exists as a way to
switch off DEV_COREDUMP regardless if any drivers select
WANT_DEV_COREDUMP.
This patch renames the option to ENABLE_DEV_COREDUMP and setting it to
'n' (as in allnconfig or tinyconfig) will effectively disable device
coredump.
Any reason you didn't cc: the author of this feature / Kconfig option
about this change you are proposing?
Likely my fault; I'd suggested using get_maintainer.pl, which does not
~/src/linux$ scripts/get_maintainer.pl < /tmp/patch
Yes, as that's just the Kconfig file, but at least let the person who
wrote that entry a chance to review it, that's just "being nice" :)
I agree; I'm just saying blame me rather than Aristeu. :)

- Josh Triplett
Aristeu Rozanski
2014-10-16 13:02:33 UTC
Permalink
Post by Josh Triplett
I agree; I'm just saying blame me rather than Aristeu. :)
Thanks Josh, but I should have used my brain and realized it's just the
Kconfig. Will resubmit it shortly.
--
Aristeu
Greg Kroah-Hartman
2014-10-16 10:18:43 UTC
Permalink
Post by Josh Triplett
Post by Greg Kroah-Hartman
Post by Aristeu Rozanski
It's desirable for allnconfig and tinyconfig targets to result in the
least amount of code possible. DISABLE_DEV_COREDUMP exists as a way to
switch off DEV_COREDUMP regardless if any drivers select
WANT_DEV_COREDUMP.
This patch renames the option to ENABLE_DEV_COREDUMP and setting it to
'n' (as in allnconfig or tinyconfig) will effectively disable device
coredump.
Any reason you didn't cc: the author of this feature / Kconfig option
about this change you are proposing?
Likely my fault; I'd suggested using get_maintainer.pl, which does not
~/src/linux$ scripts/get_maintainer.pl < /tmp/patch
Yes, as that's just the Kconfig file, but at least let the person who
wrote that entry a chance to review it, that's just "being nice" :)

thanks,

greg k-h
Aristeu Rozanski
2014-10-16 13:36:58 UTC
Permalink
(This time Cc'ing Johannes)

It's desirable for allnconfig and tinyconfig targets to result in the
least amount of code possible. DISABLE_DEV_COREDUMP exists as a way to
switch off DEV_COREDUMP regardless if any drivers select
WANT_DEV_COREDUMP.

This patch renames the option to ENABLE_DEV_COREDUMP and setting it to
'n' (as in allnconfig or tinyconfig) will effectively disable device
coredump.

Cc: Greg Kroah-Hartman <***@linuxfoundation.org>
Cc: Josh Triplett <***@joshtriplett.org>
Cc: Johannes Berg <***@sipsolutions.net>
Reviewed-by: Josh Triplett <***@joshtriplett.org>
Signed-off-by: Aristeu Rozanski <***@redhat.com>

diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index 134f763..99d3072 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -171,20 +171,23 @@ config WANT_DEV_COREDUMP
Drivers should "select" this option if they desire to use the
device coredump mechanism.

-config DISABLE_DEV_COREDUMP
- bool "Disable device coredump" if EXPERT
+config ENABLE_DEV_COREDUMP
+ bool "Enable device coredump" if EXPERT
+ default y
help
- Disable the device coredump mechanism despite drivers wanting to
- use it; this allows for more sensitive systems or systems that
- don't want to ever access the information to not have the code,
- nor keep any data.
+ This option controls if the device coredump mechanism is available or
+ not; if disabled, the mechanism will be omitted even if drivers that
+ can use it are enabled.
+ Say 'N' for more sensitive systems or systems that don't want
+ to ever access the information to not have the code, nor keep any
+ data.

- If unsure, say N.
+ If unsure, say Y.

config DEV_COREDUMP
bool
default y if WANT_DEV_COREDUMP
- depends on !DISABLE_DEV_COREDUMP
+ depends on ENABLE_DEV_COREDUMP

config DEBUG_DRIVER
bool "Driver Core verbose debug messages"
Josh Triplett
2014-10-16 13:44:30 UTC
Permalink
Post by Aristeu Rozanski
(This time Cc'ing Johannes)
This kind of note shouldn't be in the commit-message portion of the
commit.
Post by Aristeu Rozanski
It's desirable for allnconfig and tinyconfig targets to result in the
least amount of code possible. DISABLE_DEV_COREDUMP exists as a way to
switch off DEV_COREDUMP regardless if any drivers select
WANT_DEV_COREDUMP.
This patch renames the option to ENABLE_DEV_COREDUMP and setting it to
'n' (as in allnconfig or tinyconfig) will effectively disable device
coredump.
You should have a "---" line here, followed by a diffstat. If you're
not using git format-patch to format your patches, you should.

- Josh Triplett
Post by Aristeu Rozanski
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index 134f763..99d3072 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -171,20 +171,23 @@ config WANT_DEV_COREDUMP
Drivers should "select" this option if they desire to use the
device coredump mechanism.
-config DISABLE_DEV_COREDUMP
- bool "Disable device coredump" if EXPERT
+config ENABLE_DEV_COREDUMP
+ bool "Enable device coredump" if EXPERT
+ default y
help
- Disable the device coredump mechanism despite drivers wanting to
- use it; this allows for more sensitive systems or systems that
- don't want to ever access the information to not have the code,
- nor keep any data.
+ This option controls if the device coredump mechanism is available or
+ not; if disabled, the mechanism will be omitted even if drivers that
+ can use it are enabled.
+ Say 'N' for more sensitive systems or systems that don't want
+ to ever access the information to not have the code, nor keep any
+ data.
- If unsure, say N.
+ If unsure, say Y.
config DEV_COREDUMP
bool
default y if WANT_DEV_COREDUMP
- depends on !DISABLE_DEV_COREDUMP
+ depends on ENABLE_DEV_COREDUMP
config DEBUG_DRIVER
bool "Driver Core verbose debug messages"
Aristeu Rozanski
2014-10-16 15:49:49 UTC
Permalink
It's desirable for allnconfig and tinyconfig targets to result in the
least amount of code possible. DISABLE_DEV_COREDUMP exists as a way to
switch off DEV_COREDUMP regardless if any drivers select
WANT_DEV_COREDUMP.

This patch renames the option to ENABLE_DEV_COREDUMP and setting it to
'n' (as in allnconfig or tinyconfig) will effectively disable device
coredump.

Cc: Greg Kroah-Hartman <***@linuxfoundation.org>
Cc: Josh Triplett <***@joshtriplett.org>
Cc: Johannes Berg <***@sipsolutions.net>
Reviewed-by: Josh Triplett <***@joshtriplett.org>
Signed-off-by: Aristeu Rozanski <***@redhat.com>
---
drivers/base/Kconfig | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index 134f763..99d3072 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -171,20 +171,23 @@ config WANT_DEV_COREDUMP
Drivers should "select" this option if they desire to use the
device coredump mechanism.

-config DISABLE_DEV_COREDUMP
- bool "Disable device coredump" if EXPERT
+config ENABLE_DEV_COREDUMP
+ bool "Enable device coredump" if EXPERT
+ default y
help
- Disable the device coredump mechanism despite drivers wanting to
- use it; this allows for more sensitive systems or systems that
- don't want to ever access the information to not have the code,
- nor keep any data.
+ This option controls if the device coredump mechanism is available or
+ not; if disabled, the mechanism will be omitted even if drivers that
+ can use it are enabled.
+ Say 'N' for more sensitive systems or systems that don't want
+ to ever access the information to not have the code, nor keep any
+ data.

- If unsure, say N.
+ If unsure, say Y.

config DEV_COREDUMP
bool
default y if WANT_DEV_COREDUMP
- depends on !DISABLE_DEV_COREDUMP
+ depends on ENABLE_DEV_COREDUMP

config DEBUG_DRIVER
bool "Driver Core verbose debug messages"
--
1.8.3.1
Johannes Berg
2014-10-20 09:42:31 UTC
Permalink
Post by Aristeu Rozanski
It's desirable for allnconfig and tinyconfig targets to result in the
least amount of code possible. DISABLE_DEV_COREDUMP exists as a way to
switch off DEV_COREDUMP regardless if any drivers select
WANT_DEV_COREDUMP.
This patch renames the option to ENABLE_DEV_COREDUMP and setting it to
'n' (as in allnconfig or tinyconfig) will effectively disable device
coredump.
Reviewed-by: Johannes Berg <***@sipsolutions.net>
Acked-by: Johannes Berg <***@sipsolutions.net>

Yeah, looks sensible, and should work.

johannes
Josh Triplett
2014-10-20 11:55:11 UTC
Permalink
Post by Johannes Berg
Post by Aristeu Rozanski
It's desirable for allnconfig and tinyconfig targets to result in the
least amount of code possible. DISABLE_DEV_COREDUMP exists as a way to
switch off DEV_COREDUMP regardless if any drivers select
WANT_DEV_COREDUMP.
This patch renames the option to ENABLE_DEV_COREDUMP and setting it to
'n' (as in allnconfig or tinyconfig) will effectively disable device
coredump.
Yeah, looks sensible, and should work.
Thanks.

I've added this to the tiny/reverse-dev-coredump branch of my
tinification tree at
https://git.kernel.org/cgit/linux/kernel/git/josh/linux.git/ , with
Johannes' review, and I'll push it upstream during the 3.19 merge
window.

- Josh Triplett

Loading...