[i386/686-pae] PCI: Set pci=nobios by default
authorBen Hutchings <ben@decadent.org.uk>
Tue, 16 Feb 2016 02:45:42 +0000 (02:45 +0000)
committerBen Hutchings <benh@debian.org>
Thu, 3 Oct 2024 21:58:46 +0000 (23:58 +0200)
Forwarded: not-needed

CONFIG_PCI_GOBIOS results in physical addresses 640KB-1MB being mapped
W+X, which is undesirable for security reasons and will result in a
warning at boot now that we enable CONFIG_DEBUG_WX.

This can be overridden using the kernel parameter "pci=nobios", but we
want to disable W+X by default.  Disable PCI BIOS probing by default;
it can still be enabled using "pci=bios".

Gbp-Pq: Topic debian
Gbp-Pq: Name i386-686-pae-pci-set-pci-nobios-by-default.patch

arch/x86/pci/common.c

index 3507f456fcd09d601c0de1517adb5b6735a2021c..132be4c569ae577cb54b4b4da67a7c334b393fdd 100644 (file)
@@ -21,8 +21,8 @@
 #include <asm/setup.h>
 #include <asm/irqdomain.h>
 
-unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
-                               PCI_PROBE_MMCONF;
+unsigned int pci_probe = PCI_PROBE_CONF1 | PCI_PROBE_CONF2 | PCI_PROBE_MMCONF |
+       (IS_ENABLED(CONFIG_X86_64) || IS_ENABLED(CONFIG_X86_PAE) ? 0 : PCI_PROBE_BIOS);
 
 static int pci_bf_sort;
 int pci_routeirq;