From f640d9b32fa302e8f9ba46b93243752e2a17a9da Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 2 Sep 2014 15:26:05 -0700 Subject: [PATCH] 3.10-stable patches added patches: drm-radeon-add-additional-si-pci-ids.patch hpsa-fix-bad-enomem-return-value-in-hpsa_big_passthru_ioctl.patch x86-don-t-exclude-low-bios-area-when-allocating-address-space-for-non-pci-cards.patch x86-efi-enforce-config_relocatable-for-efi-boot-stub.patch x86_64-vsyscall-fix-warn_bad_vsyscall-log-output.patch --- ...drm-radeon-add-additional-si-pci-ids.patch | 38 ++++++++ ...urn-value-in-hpsa_big_passthru_ioctl.patch | 34 +++++++ queue-3.10/series | 5 ++ ...ting-address-space-for-non-pci-cards.patch | 90 +++++++++++++++++++ ...config_relocatable-for-efi-boot-stub.patch | 49 ++++++++++ ...all-fix-warn_bad_vsyscall-log-output.patch | 50 +++++++++++ 6 files changed, 266 insertions(+) create mode 100644 queue-3.10/drm-radeon-add-additional-si-pci-ids.patch create mode 100644 queue-3.10/hpsa-fix-bad-enomem-return-value-in-hpsa_big_passthru_ioctl.patch create mode 100644 queue-3.10/x86-don-t-exclude-low-bios-area-when-allocating-address-space-for-non-pci-cards.patch create mode 100644 queue-3.10/x86-efi-enforce-config_relocatable-for-efi-boot-stub.patch create mode 100644 queue-3.10/x86_64-vsyscall-fix-warn_bad_vsyscall-log-output.patch diff --git a/queue-3.10/drm-radeon-add-additional-si-pci-ids.patch b/queue-3.10/drm-radeon-add-additional-si-pci-ids.patch new file mode 100644 index 00000000000..ba1df61f6dd --- /dev/null +++ b/queue-3.10/drm-radeon-add-additional-si-pci-ids.patch @@ -0,0 +1,38 @@ +From 37dbeab788a8f23fd946c0be083e5484d6f929a1 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 21 Aug 2014 10:55:07 -0400 +Subject: drm/radeon: add additional SI pci ids + +From: Alex Deucher + +commit 37dbeab788a8f23fd946c0be083e5484d6f929a1 upstream. + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + include/drm/drm_pciids.h | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/include/drm/drm_pciids.h ++++ b/include/drm/drm_pciids.h +@@ -143,8 +143,11 @@ + {0x1002, 0x6601, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6602, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6603, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ ++ {0x1002, 0x6604, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ ++ {0x1002, 0x6605, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6606, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6607, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ ++ {0x1002, 0x6608, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6610, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6611, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6613, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ +@@ -256,6 +259,7 @@ + {0x1002, 0x6829, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x682A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x682B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ ++ {0x1002, 0x682C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x682D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x682F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6830, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ diff --git a/queue-3.10/hpsa-fix-bad-enomem-return-value-in-hpsa_big_passthru_ioctl.patch b/queue-3.10/hpsa-fix-bad-enomem-return-value-in-hpsa_big_passthru_ioctl.patch new file mode 100644 index 00000000000..b281afa4b55 --- /dev/null +++ b/queue-3.10/hpsa-fix-bad-enomem-return-value-in-hpsa_big_passthru_ioctl.patch @@ -0,0 +1,34 @@ +From 0758f4f732b08b6ef07f2e5f735655cf69fea477 Mon Sep 17 00:00:00 2001 +From: "Stephen M. Cameron" +Date: Thu, 3 Jul 2014 10:18:03 -0500 +Subject: hpsa: fix bad -ENOMEM return value in hpsa_big_passthru_ioctl + +From: "Stephen M. Cameron" + +commit 0758f4f732b08b6ef07f2e5f735655cf69fea477 upstream. + +When copy_from_user fails, return -EFAULT, not -ENOMEM + +Signed-off-by: Stephen M. Cameron +Reported-by: Robert Elliott +Reviewed-by: Joe Handzik +Reviewed-by: Scott Teel +Reviewed by: Mike MIller +Signed-off-by: Christoph Hellwig +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/hpsa.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/hpsa.c ++++ b/drivers/scsi/hpsa.c +@@ -3118,7 +3118,7 @@ static int hpsa_big_passthru_ioctl(struc + } + if (ioc->Request.Type.Direction == XFER_WRITE) { + if (copy_from_user(buff[sg_used], data_ptr, sz)) { +- status = -ENOMEM; ++ status = -EFAULT; + goto cleanup1; + } + } else diff --git a/queue-3.10/series b/queue-3.10/series index db08039d891..bfad25e502d 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -31,3 +31,8 @@ kvm-nvmx-fix-acknowledge-interrupt-on-exit-when-apicv-is-in-use.patch revert-kvm-x86-increase-the-number-of-fixed-mtrr-regs-to-10.patch kvm-iommu-fix-the-third-parameter-of-kvm_iommu_put_pages-cve-2014-3601.patch ext4-fix-bug_on-in-mb_free_blocks.patch +drm-radeon-add-additional-si-pci-ids.patch +x86-don-t-exclude-low-bios-area-when-allocating-address-space-for-non-pci-cards.patch +x86_64-vsyscall-fix-warn_bad_vsyscall-log-output.patch +x86-efi-enforce-config_relocatable-for-efi-boot-stub.patch +hpsa-fix-bad-enomem-return-value-in-hpsa_big_passthru_ioctl.patch diff --git a/queue-3.10/x86-don-t-exclude-low-bios-area-when-allocating-address-space-for-non-pci-cards.patch b/queue-3.10/x86-don-t-exclude-low-bios-area-when-allocating-address-space-for-non-pci-cards.patch new file mode 100644 index 00000000000..e39f056405b --- /dev/null +++ b/queue-3.10/x86-don-t-exclude-low-bios-area-when-allocating-address-space-for-non-pci-cards.patch @@ -0,0 +1,90 @@ +From cbace46a9710a480cae51e4611697df5de41713e Mon Sep 17 00:00:00 2001 +From: Christoph Schulz +Date: Wed, 16 Jul 2014 10:00:57 +0200 +Subject: x86: don't exclude low BIOS area when allocating address space for non-PCI cards + +From: Christoph Schulz + +commit cbace46a9710a480cae51e4611697df5de41713e upstream. + +Commit 30919b0bf356 ("x86: avoid low BIOS area when allocating address +space") moved the test for resource allocations that fall within the first +1MB of address space from the PCI-specific path to a generic path, such +that all resource allocations will avoid this area. However, this breaks +ISA cards which need to allocate a memory region within the first 1MB. An +example is the i82365 PCMCIA controller and derivatives like the Ricoh +RF5C296/396 which map part of the PCMCIA socket memory address space into +the first 1MB of system memory address space. They do not work anymore as +no usable memory region exists due to this change: + + Intel ISA PCIC probe: Ricoh RF5C296/396 ISA-to-PCMCIA at port 0x3e0 ofs 0x00, 2 sockets + host opts [0]: none + host opts [1]: none + ISA irqs (scanned) = 3,4,5,9,10 status change on irq 10 + pcmcia_socket pcmcia_socket1: pccard: PCMCIA card inserted into slot 1 + pcmcia_socket pcmcia_socket0: cs: IO port probe 0xc00-0xcff: excluding 0xcf8-0xcff + pcmcia_socket pcmcia_socket0: cs: IO port probe 0xa00-0xaff: clean. + pcmcia_socket pcmcia_socket0: cs: IO port probe 0x100-0x3ff: excluding 0x170-0x177 0x1f0-0x1f7 0x2f8-0x2ff 0x370-0x37f 0x3c0-0x3e7 0x3f0-0x3ff + pcmcia_socket pcmcia_socket0: cs: memory probe 0x0a0000-0x0affff: excluding 0xa0000-0xaffff + pcmcia_socket pcmcia_socket0: cs: memory probe 0x0b0000-0x0bffff: excluding 0xb0000-0xbffff + pcmcia_socket pcmcia_socket0: cs: memory probe 0x0c0000-0x0cffff: excluding 0xc0000-0xcbfff + pcmcia_socket pcmcia_socket0: cs: memory probe 0x0d0000-0x0dffff: clean. + pcmcia_socket pcmcia_socket0: cs: memory probe 0x0e0000-0x0effff: clean. + pcmcia_socket pcmcia_socket0: cs: memory probe 0x60000000-0x60ffffff: clean. + pcmcia_socket pcmcia_socket0: cs: memory probe 0xa0000000-0xa0ffffff: clean. + pcmcia_socket pcmcia_socket1: cs: IO port probe 0xc00-0xcff: excluding 0xcf8-0xcff + pcmcia_socket pcmcia_socket1: cs: IO port probe 0xa00-0xaff: clean. + pcmcia_socket pcmcia_socket1: cs: IO port probe 0x100-0x3ff: excluding 0x170-0x177 0x1f0-0x1f7 0x2f8-0x2ff 0x370-0x37f 0x3c0-0x3e7 0x3f0-0x3ff + pcmcia_socket pcmcia_socket1: cs: memory probe 0x0a0000-0x0affff: excluding 0xa0000-0xaffff + pcmcia_socket pcmcia_socket1: cs: memory probe 0x0b0000-0x0bffff: excluding 0xb0000-0xbffff + pcmcia_socket pcmcia_socket1: cs: memory probe 0x0c0000-0x0cffff: excluding 0xc0000-0xcbfff + pcmcia_socket pcmcia_socket1: cs: memory probe 0x0d0000-0x0dffff: clean. + pcmcia_socket pcmcia_socket1: cs: memory probe 0x0e0000-0x0effff: clean. + pcmcia_socket pcmcia_socket1: cs: memory probe 0x60000000-0x60ffffff: clean. + pcmcia_socket pcmcia_socket1: cs: memory probe 0xa0000000-0xa0ffffff: clean. + pcmcia_socket pcmcia_socket1: cs: memory probe 0x0cc000-0x0effff: excluding 0xe0000-0xeffff + pcmcia_socket pcmcia_socket1: cs: unable to map card memory! + +If filtering out the first 1MB is reverted, everything works as expected. + +Tested-by: Robert Resch +Signed-off-by: Christoph Schulz +Signed-off-by: Bjorn Helgaas +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/resource.c | 8 +++++--- + arch/x86/pci/i386.c | 4 ++++ + 2 files changed, 9 insertions(+), 3 deletions(-) + +--- a/arch/x86/kernel/resource.c ++++ b/arch/x86/kernel/resource.c +@@ -37,10 +37,12 @@ static void remove_e820_regions(struct r + + void arch_remove_reservations(struct resource *avail) + { +- /* Trim out BIOS areas (low 1MB and high 2MB) and E820 regions */ ++ /* ++ * Trim out BIOS area (high 2MB) and E820 regions. We do not remove ++ * the low 1MB unconditionally, as this area is needed for some ISA ++ * cards requiring a memory range, e.g. the i82365 PCMCIA controller. ++ */ + if (avail->flags & IORESOURCE_MEM) { +- if (avail->start < BIOS_END) +- avail->start = BIOS_END; + resource_clip(avail, BIOS_ROM_BASE, BIOS_ROM_END); + + remove_e820_regions(avail); +--- a/arch/x86/pci/i386.c ++++ b/arch/x86/pci/i386.c +@@ -162,6 +162,10 @@ pcibios_align_resource(void *data, const + return start; + if (start & 0x300) + start = (start + 0x3ff) & ~0x3ff; ++ } else if (res->flags & IORESOURCE_MEM) { ++ /* The low 1MB range is reserved for ISA cards */ ++ if (start < BIOS_END) ++ start = BIOS_END; + } + return start; + } diff --git a/queue-3.10/x86-efi-enforce-config_relocatable-for-efi-boot-stub.patch b/queue-3.10/x86-efi-enforce-config_relocatable-for-efi-boot-stub.patch new file mode 100644 index 00000000000..fb694542f69 --- /dev/null +++ b/queue-3.10/x86-efi-enforce-config_relocatable-for-efi-boot-stub.patch @@ -0,0 +1,49 @@ +From 7b2a583afb4ab894f78bc0f8bd136e96b6499a7e Mon Sep 17 00:00:00 2001 +From: Matt Fleming +Date: Fri, 11 Jul 2014 08:45:25 +0100 +Subject: x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Matt Fleming + +commit 7b2a583afb4ab894f78bc0f8bd136e96b6499a7e upstream. + +Without CONFIG_RELOCATABLE the early boot code will decompress the +kernel to LOAD_PHYSICAL_ADDR. While this may have been fine in the BIOS +days, that isn't going to fly with UEFI since parts of the firmware +code/data may be located at LOAD_PHYSICAL_ADDR. + +Straying outside of the bounds of the regions we've explicitly requested +from the firmware will cause all sorts of trouble. Bruno reports that +his machine resets while trying to decompress the kernel image. + +We already go to great pains to ensure the kernel is loaded into a +suitably aligned buffer, it's just that the address isn't necessarily +LOAD_PHYSICAL_ADDR, because we can't guarantee that address isn't in-use +by the firmware. + +Explicitly enforce CONFIG_RELOCATABLE for the EFI boot stub, so that we +can load the kernel at any address with the correct alignment. + +Reported-by: Bruno Prémont +Tested-by: Bruno Prémont +Cc: H. Peter Anvin +Signed-off-by: Matt Fleming +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/x86/Kconfig ++++ b/arch/x86/Kconfig +@@ -1578,6 +1578,7 @@ config EFI + config EFI_STUB + bool "EFI stub support" + depends on EFI ++ select RELOCATABLE + ---help--- + This kernel feature allows a bzImage to be loaded directly + by EFI firmware without the use of a bootloader. diff --git a/queue-3.10/x86_64-vsyscall-fix-warn_bad_vsyscall-log-output.patch b/queue-3.10/x86_64-vsyscall-fix-warn_bad_vsyscall-log-output.patch new file mode 100644 index 00000000000..8aea333e12e --- /dev/null +++ b/queue-3.10/x86_64-vsyscall-fix-warn_bad_vsyscall-log-output.patch @@ -0,0 +1,50 @@ +From 53b884ac3745353de220d92ef792515c3ae692f0 Mon Sep 17 00:00:00 2001 +From: Andy Lutomirski +Date: Fri, 25 Jul 2014 16:30:27 -0700 +Subject: x86_64/vsyscall: Fix warn_bad_vsyscall log output + +From: Andy Lutomirski + +commit 53b884ac3745353de220d92ef792515c3ae692f0 upstream. + +This commit in Linux 3.6: + + commit c767a54ba0657e52e6edaa97cbe0b0a8bf1c1655 + Author: Joe Perches + Date: Mon May 21 19:50:07 2012 -0700 + + x86/debug: Add KERN_ to bare printks, convert printks to pr_ + +caused warn_bad_vsyscall to output garbage in the middle of the +line. Revert the bad part of it. + +The printk in question isn't actually bare; the level is "%s". + +The bug this fixes is purely cosmetic; backports are optional. + +Signed-off-by: Andy Lutomirski +Link: http://lkml.kernel.org/r/03eac1f24110bbe496ecc12a4df467e0d88466d4.1406330947.git.luto@amacapital.net +Signed-off-by: H. Peter Anvin +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/vsyscall_64.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/x86/kernel/vsyscall_64.c ++++ b/arch/x86/kernel/vsyscall_64.c +@@ -125,10 +125,10 @@ static void warn_bad_vsyscall(const char + if (!show_unhandled_signals) + return; + +- pr_notice_ratelimited("%s%s[%d] %s ip:%lx cs:%lx sp:%lx ax:%lx si:%lx di:%lx\n", +- level, current->comm, task_pid_nr(current), +- message, regs->ip, regs->cs, +- regs->sp, regs->ax, regs->si, regs->di); ++ printk_ratelimited("%s%s[%d] %s ip:%lx cs:%lx sp:%lx ax:%lx si:%lx di:%lx\n", ++ level, current->comm, task_pid_nr(current), ++ message, regs->ip, regs->cs, ++ regs->sp, regs->ax, regs->si, regs->di); + } + + static int addr_to_vsyscall_nr(unsigned long addr) -- 2.47.3