2016-10-07 02:04:28

by Dave Young

[permalink] [raw]
Subject: Change CONFIG_DEVKMEM default value to n

Kconfig comment suggests setting it as "n" if in doubt thus move the
default value to 'n'.

Signed-off-by: Dave Young <[email protected]>
Suggested-by: Kees Cook <[email protected]>
---
drivers/char/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-x86.orig/drivers/char/Kconfig
+++ linux-x86/drivers/char/Kconfig
@@ -17,7 +17,7 @@ config DEVMEM

config DEVKMEM
bool "/dev/kmem virtual device support"
- default y
+ default n
help
Say Y here if you want to support the /dev/kmem device. The
/dev/kmem device is rarely used, but can be used for certain


2016-10-07 04:04:59

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: Change CONFIG_DEVKMEM default value to n

On Fri, Oct 07, 2016 at 10:04:11AM +0800, Dave Young wrote:
> Kconfig comment suggests setting it as "n" if in doubt thus move the
> default value to 'n'.
>
> Signed-off-by: Dave Young <[email protected]>
> Suggested-by: Kees Cook <[email protected]>
> ---
> drivers/char/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-x86.orig/drivers/char/Kconfig
> +++ linux-x86/drivers/char/Kconfig
> @@ -17,7 +17,7 @@ config DEVMEM
>
> config DEVKMEM
> bool "/dev/kmem virtual device support"
> - default y
> + default n

If you remove the "default" line, it defaults to 'n'.

And is it really "safe" to default this to n now?

thanks,

greg k-h

2016-10-07 17:07:57

by Kees Cook

[permalink] [raw]
Subject: Re: Change CONFIG_DEVKMEM default value to n

On Thu, Oct 6, 2016 at 8:57 PM, Greg Kroah-Hartman
<[email protected]> wrote:
> On Fri, Oct 07, 2016 at 10:04:11AM +0800, Dave Young wrote:
>> Kconfig comment suggests setting it as "n" if in doubt thus move the
>> default value to 'n'.
>>
>> Signed-off-by: Dave Young <[email protected]>
>> Suggested-by: Kees Cook <[email protected]>
>> ---
>> drivers/char/Kconfig | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- linux-x86.orig/drivers/char/Kconfig
>> +++ linux-x86/drivers/char/Kconfig
>> @@ -17,7 +17,7 @@ config DEVMEM
>>
>> config DEVKMEM
>> bool "/dev/kmem virtual device support"
>> - default y
>> + default n
>
> If you remove the "default" line, it defaults to 'n'.
>
> And is it really "safe" to default this to n now?

This is DEVKMEM which distros haven't (shouldn't have?) used for a
while now. I'm not so bold as to suggest making DEVMEM default-n yet.
;)

-Kees

--
Kees Cook
Nexus Security

2016-10-10 02:45:36

by Dave Young

[permalink] [raw]
Subject: Re: Change CONFIG_DEVKMEM default value to n

On 10/07/16 at 05:57am, Greg Kroah-Hartman wrote:
> On Fri, Oct 07, 2016 at 10:04:11AM +0800, Dave Young wrote:
> > Kconfig comment suggests setting it as "n" if in doubt thus move the
> > default value to 'n'.
> >
> > Signed-off-by: Dave Young <[email protected]>
> > Suggested-by: Kees Cook <[email protected]>
> > ---
> > drivers/char/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > --- linux-x86.orig/drivers/char/Kconfig
> > +++ linux-x86/drivers/char/Kconfig
> > @@ -17,7 +17,7 @@ config DEVMEM
> >
> > config DEVKMEM
> > bool "/dev/kmem virtual device support"
> > - default y
> > + default n
>
> If you remove the "default" line, it defaults to 'n'.

I personally perfer a "default n", but I can update it..

>
> And is it really "safe" to default this to n now?

There is an old article here:
https://lwn.net/Articles/147901/

AFAIK Distributions like Fedora/Debian has disabled it for long time.
If one really need it he can still enable it in his own config file.

>
> thanks,
>
> greg k-h

Thanks
Dave

2016-10-10 02:50:59

by Dave Young

[permalink] [raw]
Subject: Re: Change CONFIG_DEVKMEM default value to n

On 10/10/16 at 10:44am, Dave Young wrote:
> On 10/07/16 at 05:57am, Greg Kroah-Hartman wrote:
> > On Fri, Oct 07, 2016 at 10:04:11AM +0800, Dave Young wrote:
> > > Kconfig comment suggests setting it as "n" if in doubt thus move the
> > > default value to 'n'.
> > >
> > > Signed-off-by: Dave Young <[email protected]>
> > > Suggested-by: Kees Cook <[email protected]>
> > > ---
> > > drivers/char/Kconfig | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > --- linux-x86.orig/drivers/char/Kconfig
> > > +++ linux-x86/drivers/char/Kconfig
> > > @@ -17,7 +17,7 @@ config DEVMEM
> > >
> > > config DEVKMEM
> > > bool "/dev/kmem virtual device support"
> > > - default y
> > > + default n
> >
> > If you remove the "default" line, it defaults to 'n'.
>
> I personally perfer a "default n", but I can update it..

Greg, here is an update with dropping the default line:

Move CONFIG_DEVKMEM default to n

Kconfig comment suggests setting it as "n" if in doubt thus move the
default value to 'n'.

Signed-off-by: Dave Young <[email protected]>
Suggested-by: Kees Cook <[email protected]>
---
drivers/char/Kconfig | 1 -
1 file changed, 1 deletion(-)

--- linux-x86.orig/drivers/char/Kconfig
+++ linux-x86/drivers/char/Kconfig
@@ -17,7 +17,6 @@ config DEVMEM

config DEVKMEM
bool "/dev/kmem virtual device support"
- default y
help
Say Y here if you want to support the /dev/kmem device. The
/dev/kmem device is rarely used, but can be used for certain

2016-10-10 05:12:34

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: Change CONFIG_DEVKMEM default value to n

On Mon, Oct 10, 2016 at 10:50:50AM +0800, Dave Young wrote:
> On 10/10/16 at 10:44am, Dave Young wrote:
> > On 10/07/16 at 05:57am, Greg Kroah-Hartman wrote:
> > > On Fri, Oct 07, 2016 at 10:04:11AM +0800, Dave Young wrote:
> > > > Kconfig comment suggests setting it as "n" if in doubt thus move the
> > > > default value to 'n'.
> > > >
> > > > Signed-off-by: Dave Young <[email protected]>
> > > > Suggested-by: Kees Cook <[email protected]>
> > > > ---
> > > > drivers/char/Kconfig | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > --- linux-x86.orig/drivers/char/Kconfig
> > > > +++ linux-x86/drivers/char/Kconfig
> > > > @@ -17,7 +17,7 @@ config DEVMEM
> > > >
> > > > config DEVKMEM
> > > > bool "/dev/kmem virtual device support"
> > > > - default y
> > > > + default n
> > >
> > > If you remove the "default" line, it defaults to 'n'.
> >
> > I personally perfer a "default n", but I can update it..
>
> Greg, here is an update with dropping the default line:

<snip>

Can you resend it in a format I can apply it in?

thanks,

greg k-h

2016-10-10 05:35:49

by Dave Young

[permalink] [raw]
Subject: Re: Change CONFIG_DEVKMEM default value to n

On 10/10/16 at 07:12am, Greg Kroah-Hartman wrote:
> On Mon, Oct 10, 2016 at 10:50:50AM +0800, Dave Young wrote:
> > On 10/10/16 at 10:44am, Dave Young wrote:
> > > On 10/07/16 at 05:57am, Greg Kroah-Hartman wrote:
> > > > On Fri, Oct 07, 2016 at 10:04:11AM +0800, Dave Young wrote:
> > > > > Kconfig comment suggests setting it as "n" if in doubt thus move the
> > > > > default value to 'n'.
> > > > >
> > > > > Signed-off-by: Dave Young <[email protected]>
> > > > > Suggested-by: Kees Cook <[email protected]>
> > > > > ---
> > > > > drivers/char/Kconfig | 2 +-
> > > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > --- linux-x86.orig/drivers/char/Kconfig
> > > > > +++ linux-x86/drivers/char/Kconfig
> > > > > @@ -17,7 +17,7 @@ config DEVMEM
> > > > >
> > > > > config DEVKMEM
> > > > > bool "/dev/kmem virtual device support"
> > > > > - default y
> > > > > + default n
> > > >
> > > > If you remove the "default" line, it defaults to 'n'.
> > >
> > > I personally perfer a "default n", but I can update it..
> >
> > Greg, here is an update with dropping the default line:
>
> <snip>
>
> Can you resend it in a format I can apply it in?

Done, thanks you!

>
> thanks,
>
> greg k-h