From: Ben Hutchings Date: Tue, 16 Feb 2016 02:45:42 +0000 (+0000) Subject: PCI: Set pci=nobios by default X-Git-Tag: archive/raspbian/4.9.51-1+rpi1~8^2~42 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2c2fb9a1237dcecee11051decccd004be487d20e;p=linux-4.9.git PCI: Set pci=nobios by default 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 --- diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index a4fdfa7dcc1b..f5506966a9c4 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -19,8 +19,8 @@ #include #include -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); unsigned int pci_early_dump_regs; static int pci_bf_sort;