2014-10-16 13:37:08

by Aristeu Rozanski

[permalink] [raw]
Subject: [PATCH] tiny: reverse logic for DISABLE_DEV_COREDUMP

(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 <[email protected]>
Cc: Josh Triplett <[email protected]>
Cc: Johannes Berg <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
Signed-off-by: Aristeu Rozanski <[email protected]>

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"


2014-10-16 13:44:41

by Josh Triplett

[permalink] [raw]
Subject: Re: [PATCH] tiny: reverse logic for DISABLE_DEV_COREDUMP

On Thu, Oct 16, 2014 at 09:36:58AM -0400, Aristeu Rozanski wrote:
> (This time Cc'ing Johannes)

This kind of note shouldn't be in the commit-message portion of the
commit.

> 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 <[email protected]>
> Cc: Josh Triplett <[email protected]>
> Cc: Johannes Berg <[email protected]>
> Reviewed-by: Josh Triplett <[email protected]>
> Signed-off-by: Aristeu Rozanski <[email protected]>

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

> 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"

2014-10-16 15:49:58

by Aristeu Rozanski

[permalink] [raw]
Subject: [PATCH] tiny: reverse logic for DISABLE_DEV_COREDUMP

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 <[email protected]>
Cc: Josh Triplett <[email protected]>
Cc: Johannes Berg <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
Signed-off-by: Aristeu Rozanski <[email protected]>
---
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

2014-10-20 09:42:41

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] tiny: reverse logic for DISABLE_DEV_COREDUMP

On Thu, 2014-10-16 at 11:49 -0400, Aristeu Rozanski wrote:
> 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 <[email protected]>
> Cc: Josh Triplett <[email protected]>
> Cc: Johannes Berg <[email protected]>

Reviewed-by: Johannes Berg <[email protected]>
Acked-by: Johannes Berg <[email protected]>

Yeah, looks sensible, and should work.

johannes

2014-10-20 11:55:20

by Josh Triplett

[permalink] [raw]
Subject: Re: [PATCH] tiny: reverse logic for DISABLE_DEV_COREDUMP

On Mon, Oct 20, 2014 at 11:42:31AM +0200, Johannes Berg wrote:
> On Thu, 2014-10-16 at 11:49 -0400, Aristeu Rozanski wrote:
> > 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 <[email protected]>
> > Cc: Josh Triplett <[email protected]>
> > Cc: Johannes Berg <[email protected]>
>
> Reviewed-by: Johannes Berg <[email protected]>
> Acked-by: Johannes Berg <[email protected]>
>
> 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

2014-10-20 22:19:08

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] tiny: reverse logic for DISABLE_DEV_COREDUMP

On Mon, Oct 20, 2014 at 04:55:11AM -0700, Josh Triplett wrote:
> On Mon, Oct 20, 2014 at 11:42:31AM +0200, Johannes Berg wrote:
> > On Thu, 2014-10-16 at 11:49 -0400, Aristeu Rozanski wrote:
> > > 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 <[email protected]>
> > > Cc: Josh Triplett <[email protected]>
> > > Cc: Johannes Berg <[email protected]>
> >
> > Reviewed-by: Johannes Berg <[email protected]>
> > Acked-by: Johannes Berg <[email protected]>
> >
> > 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.

I'll take it through the same tree this original came in and will get it
into 3.18 so we don't confuse anyone with an odd config option.

thanks,

greg k-h

2014-10-20 23:45:45

by Josh Triplett

[permalink] [raw]
Subject: Re: [PATCH] tiny: reverse logic for DISABLE_DEV_COREDUMP

On Tue, Oct 21, 2014 at 06:18:00AM +0800, Greg Kroah-Hartman wrote:
> On Mon, Oct 20, 2014 at 04:55:11AM -0700, Josh Triplett wrote:
> > On Mon, Oct 20, 2014 at 11:42:31AM +0200, Johannes Berg wrote:
> > > On Thu, 2014-10-16 at 11:49 -0400, Aristeu Rozanski wrote:
> > > > 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 <[email protected]>
> > > > Cc: Josh Triplett <[email protected]>
> > > > Cc: Johannes Berg <[email protected]>
> > >
> > > Reviewed-by: Johannes Berg <[email protected]>
> > > Acked-by: Johannes Berg <[email protected]>
> > >
> > > 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.
>
> I'll take it through the same tree this original came in and will get it
> into 3.18 so we don't confuse anyone with an odd config option.

Excellent, dropped from tiny then.

- Josh Triplett

2014-10-30 08:01:27

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] tiny: reverse logic for DISABLE_DEV_COREDUMP

On Tue, 2014-10-21 at 06:18 +0800, Greg Kroah-Hartman wrote:

> > 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.
>
> I'll take it through the same tree this original came in and will get it
> into 3.18 so we don't confuse anyone with an odd config option.

I don't know how far this commit made it, but looking at it again now I
think the new option should probably be called "Allow device coredump"
rather than "Enable device coredump" since it doesn't actually enable it
if no drivers want it.

Should I send another patch on top?

johannes

2014-10-30 09:00:44

by Johannes Berg

[permalink] [raw]
Subject: [PATCH 3.18] tiny: rename ENABLE_DEV_COREDUMP to ALLOW_DEV_COREDUMP

From: Johannes Berg <[email protected]>

The ENABLE_DEV_COREDUMP option is misleading as it implies that
it gets the framework enabled, this isn't true it just allows it
to get enabled if a driver needs it.

Rename it to ALLOW_DEV_COREDUMP to better capture its semantics.

Signed-off-by: Johannes Berg <[email protected]>
---
drivers/base/Kconfig | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

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

-config ENABLE_DEV_COREDUMP
- bool "Enable device coredump" if EXPERT
+config ALLOW_DEV_COREDUMP
+ bool "Allow device coredump" if EXPERT
default y
help
This option controls if the device coredump mechanism is available or
@@ -187,7 +187,7 @@ config ENABLE_DEV_COREDUMP
config DEV_COREDUMP
bool
default y if WANT_DEV_COREDUMP
- depends on ENABLE_DEV_COREDUMP
+ depends on ALLOW_DEV_COREDUMP

config DEBUG_DRIVER
bool "Driver Core verbose debug messages"
--
2.1.0

2014-10-30 12:55:14

by Aristeu Rozanski

[permalink] [raw]
Subject: Re: [PATCH 3.18] tiny: rename ENABLE_DEV_COREDUMP to ALLOW_DEV_COREDUMP

On Thu, Oct 30, 2014 at 10:00:35AM +0100, Johannes Berg wrote:
> From: Johannes Berg <[email protected]>
>
> The ENABLE_DEV_COREDUMP option is misleading as it implies that
> it gets the framework enabled, this isn't true it just allows it
> to get enabled if a driver needs it.
>
> Rename it to ALLOW_DEV_COREDUMP to better capture its semantics.

Sounds much better!

Acked-by: Aristeu Rozanski <[email protected]>

>
> Signed-off-by: Johannes Berg <[email protected]>
> ---
> drivers/base/Kconfig | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
> index 99d30729d11e..e9f96afe920d 100644
> --- a/drivers/base/Kconfig
> +++ b/drivers/base/Kconfig
> @@ -171,8 +171,8 @@ config WANT_DEV_COREDUMP
> Drivers should "select" this option if they desire to use the
> device coredump mechanism.
>
> -config ENABLE_DEV_COREDUMP
> - bool "Enable device coredump" if EXPERT
> +config ALLOW_DEV_COREDUMP
> + bool "Allow device coredump" if EXPERT
> default y
> help
> This option controls if the device coredump mechanism is available or
> @@ -187,7 +187,7 @@ config ENABLE_DEV_COREDUMP
> config DEV_COREDUMP
> bool
> default y if WANT_DEV_COREDUMP
> - depends on ENABLE_DEV_COREDUMP
> + depends on ALLOW_DEV_COREDUMP
>
> config DEBUG_DRIVER
> bool "Driver Core verbose debug messages"
> --
> 2.1.0
>
>

--
Aristeu

2014-10-30 13:32:57

by Josh Triplett

[permalink] [raw]
Subject: Re: [PATCH 3.18] tiny: rename ENABLE_DEV_COREDUMP to ALLOW_DEV_COREDUMP

On Thu, Oct 30, 2014 at 10:00:35AM +0100, Johannes Berg wrote:
> From: Johannes Berg <[email protected]>
>
> The ENABLE_DEV_COREDUMP option is misleading as it implies that
> it gets the framework enabled, this isn't true it just allows it
> to get enabled if a driver needs it.
>
> Rename it to ALLOW_DEV_COREDUMP to better capture its semantics.
>
> Signed-off-by: Johannes Berg <[email protected]>

Seems reasonable. The original "DISABLE" was really "FORCE_DISABLE"
(even if used), and the inverse of "FORCE_DISABLE" is not "ENABLE", it's
"ALLOW" (if used).

Reviewed-by: Josh Triplett <[email protected]>

> drivers/base/Kconfig | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
> index 99d30729d11e..e9f96afe920d 100644
> --- a/drivers/base/Kconfig
> +++ b/drivers/base/Kconfig
> @@ -171,8 +171,8 @@ config WANT_DEV_COREDUMP
> Drivers should "select" this option if they desire to use the
> device coredump mechanism.
>
> -config ENABLE_DEV_COREDUMP
> - bool "Enable device coredump" if EXPERT
> +config ALLOW_DEV_COREDUMP
> + bool "Allow device coredump" if EXPERT
> default y
> help
> This option controls if the device coredump mechanism is available or
> @@ -187,7 +187,7 @@ config ENABLE_DEV_COREDUMP
> config DEV_COREDUMP
> bool
> default y if WANT_DEV_COREDUMP
> - depends on ENABLE_DEV_COREDUMP
> + depends on ALLOW_DEV_COREDUMP
>
> config DEBUG_DRIVER
> bool "Driver Core verbose debug messages"
> --
> 2.1.0
>
>