lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-b607e2126705ca28ecf21aa051172882bbdaae8a@git.kernel.org>
Date:	Sun, 27 Jan 2013 20:32:15 -0800
From:	tip-bot for David Woodhouse <David.Woodhouse@...el.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
	matt.fleming@...el.com, stable@...nel.org, tglx@...utronix.de,
	hpa@...ux.intel.com, David.Woodhouse@...el.com
Subject: [tip:x86/efi] x86, efi: Fix PCI ROM handing in EFI boot stub,
  in 32-bit mode

Commit-ID:  b607e2126705ca28ecf21aa051172882bbdaae8a
Gitweb:     http://git.kernel.org/tip/b607e2126705ca28ecf21aa051172882bbdaae8a
Author:     David Woodhouse <David.Woodhouse@...el.com>
AuthorDate: Mon, 7 Jan 2013 22:09:49 +0000
Committer:  H. Peter Anvin <hpa@...ux.intel.com>
CommitDate: Sun, 27 Jan 2013 20:19:37 -0800

x86, efi: Fix PCI ROM handing in EFI boot stub, in 32-bit mode

The 'Attributes' argument to pci->Attributes() function is 64-bit. So
when invoking in 32-bit mode it takes two registers, not just one.

This fixes memory corruption when booting via the 32-bit EFI boot stub.

Signed-off-by: David Woodhouse <David.Woodhouse@...el.com>
Cc: <stable@...nel.org>
Link: http://lkml.kernel.org/r/1358513837.2397.247.camel@shinybook.infradead.org
Signed-off-by: H. Peter Anvin <hpa@...ux.intel.com>
Cc: Matt Fleming <matt.fleming@...el.com>
---
 arch/x86/boot/compressed/eboot.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index 448a86e..b7f2208 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -295,10 +295,15 @@ static efi_status_t setup_efi_pci(struct boot_params *params)
 		if (!pci)
 			continue;
 
+#ifdef CONFIG_X86_64
 		status = efi_call_phys4(pci->attributes, pci,
 					EfiPciIoAttributeOperationGet, 0,
 					&attributes);
-
+#else
+		status = efi_call_phys5(pci->attributes, pci,
+					EfiPciIoAttributeOperationGet, 0, 0,
+					&attributes);
+#endif
 		if (status != EFI_SUCCESS)
 			continue;
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ