Skip to contentSkip to conversation

char: lack of bool string made CONFIG_DEVPORT always on

PATCH In review Max 5 participants 12 messages Dec 14, 2016 – Jan 3, 2017 1 message not in the archive Char and misc drivers

lore
Share & tools
lore

Max

author
#0 lore raw

PATCH 1/1 char: lack of bool string made CONFIG_DEVPORT always on

From: Max Bires <[email protected]>

Without a bool string present, using "# CONFIG_DEVPORT is not set" in defconfig files would not actually unset devport. This ensured that /dev/port was always on, but there are reasons a user may wish to disable it (smaller kernel, attack surface reduction) if it's not being used. Adding a message here in order to make this user visible.

---
 drivers/char/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/char/Kconfig +4 -1
index 7ad3127..d647e7e 100644
@@ -589,10 +589,13 @@ config TELCLOCK
 	  controlling the behavior of this hardware.
 
 config DEVPORT
-	bool
+	bool "/dev/port character device"
 	depends on !M68K
 	depends on ISA || PCI
 	default y
+	help
+		Say Y here if you want to support the /dev/port device. The
+		/dev/port device is similar to /dev/mem, but for I/O ports.
 
 config DCC_TTY
 	tristate "DCC tty driver"
Signature · 1 line
2.8.0.rc3.226.g39d4020
maintainer
#1 lore raw
Quoted 19 lines · Max

From: Max Bires <[email protected]>

Without a bool string present, using "# CONFIG_DEVPORT is not set" in defconfig files would not actually unset devport. This ensured that /dev/port was always on, but there are reasons a user may wish to disable it (smaller kernel, attack surface reduction) if it's not being used. Adding a message here in order to make this user visible.

---
 drivers/char/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/char/Kconfig +0 -0
index 7ad3127..d647e7e 100644
@@ -589,10 +589,13 @@ config TELCLOCK
 	  controlling the behavior of this hardware.

drivers/char/Kconfig config TELCLOCK · line 598

Quoted 10 lines
drivers/char/Kconfig +4 -1
 
 config DEVPORT
-	bool
+	bool "/dev/port character device"
 	depends on !M68K
 	depends on ISA || PCI
 	default y
+	help
+		Say Y here if you want to support the /dev/port device. The
+		/dev/port device is similar to /dev/mem, but for I/O ports.

Hm, did you look at how the indentation for all of the help entries are in this file? Please match it up to be the same...

Other than that, this looks much better, the format and style of the submission was fine.

thanks,

greg k-h

author
#2 lore raw

PATCH 1/1 char: lack of bool string made CONFIG_DEVPORT always on

Without a bool string present, using "# CONFIG_DEVPORT is not set" in defconfig files would not actually unset devport. This ensured that /dev/port was always on, but there are reasons a user may wish to disable it (smaller kernel, attack surface reduction) if it's not being used. Adding a message here in order to make this user visible.

---
 drivers/char/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/char/Kconfig +4 -1
index 7ad3127..e8fc493 100644
@@ -589,10 +589,13 @@ config TELCLOCK
 	  controlling the behavior of this hardware.
 
 config DEVPORT
-	bool
+	bool "/dev/port character device"
 	depends on !M68K
 	depends on ISA || PCI
 	default y
+	help
+	  Say Y here if you want to support the /dev/port device. The
+	  /dev/port device is similar to /dev/mem, but for I/O ports.
 
 config DCC_TTY
 	tristate "DCC tty driver"
Signature · 1 line
2.8.0.rc3.226.g39d4020
#3 lore raw
Quoted 17 lines · Max

Without a bool string present, using "# CONFIG_DEVPORT is not set" in defconfig files would not actually unset devport. This ensured that /dev/port was always on, but there are reasons a user may wish to disable it (smaller kernel, attack surface reduction) if it's not being used. Adding a message here in order to make this user visible.

---
 drivers/char/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/char/Kconfig +0 -0
index 7ad3127..e8fc493 100644

drivers/char/Kconfig config TELCLOCK · line 592

Quoted 5 lines
drivers/char/Kconfig +1 -1
@@ -589,10 +589,13 @@ config TELCLOCK
          controlling the behavior of this hardware.
 
 config DEVPORT
-       bool
+       bool "/dev/port character device"

bool "/dev/port character device" if EXPERT?

drivers/char/Kconfig config TELCLOCK · line 598

Quoted 6 lines
drivers/char/Kconfig +3 -0
        depends on !M68K
        depends on ISA || PCI
        default y
+       help
+         Say Y here if you want to support the /dev/port device. The
+         /dev/port device is similar to /dev/mem, but for I/O ports.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

maintainer
#4 lore raw
Quoted 11 lines · CET Geert Uytterhoeven

drivers/char/Kconfig config TELCLOCK · line 592

Quoted 9 lines
drivers/char/Kconfig +1 -1
@@ -589,10 +589,13 @@ config TELCLOCK
          controlling the behavior of this hardware.
 
 config DEVPORT
-       bool
+       bool "/dev/port character device"

bool "/dev/port character device" if EXPERT?

I think the 'default y' is good enough, there are good reasons even for non-EXPERT configurations to turn this off.

Arnd

#5 lore raw
Quoted 7 lines · Arnd Bergmann
Quoted 6 lines · CET Geert Uytterhoeven
Quoted 6 lines
drivers/char/Kconfig +0 -0
@@ -589,10 +589,13 @@ config TELCLOCK
          controlling the behavior of this hardware.
 
Quoted 8 lines
Quoted 5 lines

drivers/char/Kconfig config TELCLOCK · line 592

Quoted 3 lines
drivers/char/Kconfig +1 -1
 config DEVPORT
-       bool
+       bool "/dev/port character device"

bool "/dev/port character device" if EXPERT?

I think the 'default y' is good enough, there are good reasons even for non-EXPERT configurations to turn this off.

Agreed. /dev/port seems like something the majority of modern systems can safely turn off.

A message that is not in the archive (sent off-list or not yet received): CALVgH4S9b7JJj0wbR1N9Bd4tJB-CqJWfm_SPXv3z-m7U372ZmA@mail.gmail.com

maintainer Acked-by
#7 lore raw
Quoted 3 lines · CET Max Bires

So this is fine as is then? Just making sure that outside of the development tree being closed for now that this patch is good to go now that space/tab formatting is fixed.

Yes, the change is fine, please add my

Note two details:

- Please avoid top-posting in emails as you did here

- In your patch submission the sender is listed as "Max" without a last name, while your Signed-off-by line contains your full name. As the sender gets used as the author tag, please resubmit the patch with your full name as sender or add a separate "From: " line at the beginning of the mail. Git format-patch/send-email gets this right as long as your git configuration has your full name.

Arnd

author
#8 lore raw

PATCH 1/1 char: lack of bool string made CONFIG_DEVPORT always on

In reply to Max

Without a bool string present, using "# CONFIG_DEVPORT is not set" in defconfig files would not actually unset devport. This ensured that /dev/port was always on, but there are reasons a user may wish to disable it (smaller kernel, attack surface reduction) if it's not being used. Adding a message here in order to make this user visible.

---
 drivers/char/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/char/Kconfig +4 -1
index 7ad3127..e8fc493 100644
@@ -589,10 +589,13 @@ config TELCLOCK
 	  controlling the behavior of this hardware.
 
 config DEVPORT
-	bool
+	bool "/dev/port character device"
 	depends on !M68K
 	depends on ISA || PCI
 	default y
+	help
+	  Say Y here if you want to support the /dev/port device. The
+	  /dev/port device is similar to /dev/mem, but for I/O ports.
 
 config DCC_TTY
 	tristate "DCC tty driver"
Signature · 1 line
2.8.0.rc3.226.g39d4020
maintainer
#9 lore raw
Quoted 21 lines · Max Bires

Without a bool string present, using "# CONFIG_DEVPORT is not set" in defconfig files would not actually unset devport. This ensured that /dev/port was always on, but there are reasons a user may wish to disable it (smaller kernel, attack surface reduction) if it's not being used. Adding a message here in order to make this user visible.

---
 drivers/char/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/char/Kconfig +0 -1
index 7ad3127..e8fc493 100644
@@ -589,10 +589,13 @@ config TELCLOCK
 	  controlling the behavior of this hardware.
 
 config DEVPORT
-	bool

drivers/char/Kconfig config TELCLOCK · line 601

Quoted 10 lines
drivers/char/Kconfig +4 -0
+	bool "/dev/port character device"
 	depends on !M68K
 	depends on ISA || PCI
 	default y
+	help
+	  Say Y here if you want to support the /dev/port device. The
+	  /dev/port device is similar to /dev/mem, but for I/O ports.
 
 config DCC_TTY
 	tristate "DCC tty driver"

This does not apply at all to 4.10-rc2, what did you make it against? Please redo it so that I can actually apply it...

thanks,

greg k-h

author
#10 lore raw

PATCH 1/1 Without a bool string present, using "# CONFIG_DEVPORT is not set" in defconfig files would not actually unset devport. This esnured that /dev/port was always on, but there are reasons a user may wish to disable it (smaller kernel, attack surface reduction) if it's not being used. Adding a message here in order to make this user visible.

In reply to Max
---
 drivers/char/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/char/Kconfig +4 -1
index fde005e..4ee2a10 100644
@@ -571,9 +571,12 @@ config TELCLOCK
 	  controlling the behavior of this hardware.
 
 config DEVPORT
-	bool
+	bool "/dev/port character device"
 	depends on ISA || PCI
 	default y
+	help
+	  Say Y here if you want to support the /dev/port device. The /dev/port
+	  device is similar to /dev/mem, but for I/O ports.
 
 source "drivers/s390/char/Kconfig"
 
Signature · 1 line
2.8.0.rc3.226.g39d4020
maintainer
#11 lore raw

Re: [PATCH] Without a bool string present, using "# CONFIG_DEVPORT is not set" in defconfig files would not actually unset devport. This esnured that /dev/port was always on, but there are reasons a user may wish to disable it (smaller kernel, attack surface reduction) if it's not being used. Adding a message here in order to make this user visible.

Quoted 5 lines · Max Bires
---
 drivers/char/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Odd subject line :(

author
#12 lore raw

PATCH 1/1 char: lack of bool string made CONFIG_DEVPORT always on

In reply to Max Bires

Without a bool string present, using "# CONFIG_DEVPORT is not set" in defconfig files would not actually unset devport. This esnured that /dev/port was always on, but there are reasons a user may wish to disable it (smaller kernel, attack surface reduction) if it's not being used. Adding a message here in order to make this user visible.

---
 drivers/char/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/char/Kconfig +4 -1
index fde005e..4ee2a10 100644
@@ -571,9 +571,12 @@ config TELCLOCK
 	  controlling the behavior of this hardware.
 
 config DEVPORT
-	bool
+	bool "/dev/port character device"
 	depends on ISA || PCI
 	default y
+	help
+	  Say Y here if you want to support the /dev/port device. The /dev/port
+	  device is similar to /dev/mem, but for I/O ports.
 
 source "drivers/s390/char/Kconfig"
 
Signature · 1 line
2.8.0.rc3.226.g39d4020