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] [day] [month] [year] [list]
Date:	Sun, 11 Oct 2015 02:06:41 -0700
From:	tip-bot for Matt Fleming <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, linux@...ck-us.net,
	sfr@...b.auug.org.au, tony.luck@...il.com, zjzhang@...eaurora.org,
	tony.luck@...el.com, ard.biesheuvel@...aro.org,
	peterz@...radead.org, matt@...eblueprint.co.uk, tglx@...utronix.de,
	matt.fleming@...el.com, mingo@...nel.org, hpa@...or.com
Subject: [tip:core/efi] efi: Use the generic efi.memmap instead of 'memmap
 '

Commit-ID:  0ce423b6492a02be11662bfaa837dd16945aad3e
Gitweb:     http://git.kernel.org/tip/0ce423b6492a02be11662bfaa837dd16945aad3e
Author:     Matt Fleming <matt@...eblueprint.co.uk>
AuthorDate: Sat, 3 Oct 2015 23:26:07 +0100
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Sun, 11 Oct 2015 11:04:18 +0200

efi: Use the generic efi.memmap instead of 'memmap'

Guenter reports that commit:

  7bf793115dd9 ("efi, x86: Rearrange efi_mem_attributes()")

breaks the IA64 compilation with the following error:

  drivers/built-in.o: In function `efi_mem_attributes': (.text+0xde962): undefined reference to `memmap'

Instead of using the (rather poorly named) global variable
'memmap' which doesn't exist on IA64, use efi.memmap which
points to the 'memmap' object on x86 and arm64 and which is NULL
for IA64.

The fact that efi.memmap is NULL for IA64 is OK because IA64
provides its own implementation of efi_mem_attributes().

Reported-by: Guenter Roeck <linux@...ck-us.net>
Signed-off-by: Matt Fleming <matt.fleming@...el.com>
Cc: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: Jonathan Zhang <zjzhang@...eaurora.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Tony Luck <tony.luck@...il.com>
Cc: Tony Luck <tony.luck@...el.com>
Link: http://lkml.kernel.org/r/20151003222607.GA2682@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 drivers/firmware/efi/efi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index afee2880..16c4928 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -623,13 +623,15 @@ char * __init efi_md_typeattr_format(char *buf, size_t size,
  */
 u64 __weak efi_mem_attributes(unsigned long phys_addr)
 {
+	struct efi_memory_map *map;
 	efi_memory_desc_t *md;
 	void *p;
 
 	if (!efi_enabled(EFI_MEMMAP))
 		return 0;
 
-	for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
+	map = efi.memmap;
+	for (p = map->map; p < map->map_end; p += map->desc_size) {
 		md = p;
 		if ((md->phys_addr <= phys_addr) &&
 		    (phys_addr < (md->phys_addr +
--
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