Skip to contentSkip to conversation

powerpc/configs: Disable /dev/port in skiroot defconfig

PATCH Applied Daniel Axtens 3 participants 4 messages Jun 27, 2019 – Aug 28, 2019 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/configs: Disable /dev/port in skiroot defconfig

While reviewing lockdown patches, I discovered that we still enable /dev/port (CONFIG_DEVPORT) in skiroot.

We don't need it. Deselect CONFIG_DEVPORT for skiroot.

---
 arch/powerpc/configs/skiroot_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/configs/skiroot_defconfig +1 -0
index 5ba131c30f6b..b2e8f37156eb 100644
@@ -212,6 +212,7 @@ CONFIG_IPMI_WATCHDOG=y
 CONFIG_HW_RANDOM=y
 CONFIG_TCG_TPM=y
 CONFIG_TCG_TIS_I2C_NUVOTON=y
+# CONFIG_DEVPORT is not set
 CONFIG_I2C=y
 # CONFIG_I2C_COMPAT is not set
 CONFIG_I2C_CHARDEV=y
Signature · 1 line
2.20.1
#1 lore raw
Quoted 4 lines · Daniel Axtens

While reviewing lockdown patches, I discovered that we still enable /dev/port (CONFIG_DEVPORT) in skiroot.

We don't need it. Deselect CONFIG_DEVPORT for skiroot.

Why don't we need it? :)

cheers

Quoted 14 lines
arch/powerpc/configs/skiroot_defconfig +1 -0
index 5ba131c30f6b..b2e8f37156eb 100644
@@ -212,6 +212,7 @@ CONFIG_IPMI_WATCHDOG=y
 CONFIG_HW_RANDOM=y
 CONFIG_TCG_TPM=y
 CONFIG_TCG_TIS_I2C_NUVOTON=y
+# CONFIG_DEVPORT is not set
 CONFIG_I2C=y
 # CONFIG_I2C_COMPAT is not set
 CONFIG_I2C_CHARDEV=y
Signature · 1 line
2.20.1
#2 lore raw
Quoted 7 lines · Michael Ellerman
Quoted 4 lines · Daniel Axtens

While reviewing lockdown patches, I discovered that we still enable /dev/port (CONFIG_DEVPORT) in skiroot.

We don't need it. Deselect CONFIG_DEVPORT for skiroot.

Why don't we need it? :)

I should have explained this better :)

/dev/port is used for old x86 style IO accesses.

It's set up in drivers/char/mem.c, and is only created if arch_has_dev_port() returns true. Per arch/powerpc/include/asm/io.h, on PPC64 with PCI, this is only true if there's a legacy ISA bridge.

Even if a system has a legacy ISA bridge installed, we have no business accessing it in skiroot.

Regards,
Daniel

Quoted 17 lines

cheers

Quoted 14 lines
arch/powerpc/configs/skiroot_defconfig +1 -0
index 5ba131c30f6b..b2e8f37156eb 100644
@@ -212,6 +212,7 @@ CONFIG_IPMI_WATCHDOG=y
 CONFIG_HW_RANDOM=y
 CONFIG_TCG_TPM=y
 CONFIG_TCG_TIS_I2C_NUVOTON=y
+# CONFIG_DEVPORT is not set
 CONFIG_I2C=y
 # CONFIG_I2C_COMPAT is not set
 CONFIG_I2C_CHARDEV=y
Signature · 1 line
2.20.1