Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1453415 > unrolled thread

[PATCH 0/4] x86/platform/UV: SGI UV4 Kernel Fixes

Started byMike Travis <travis@sgi.com>
First post2016-08-01 21:10 +0200
Last post2016-08-10 20:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/4] x86/platform/UV: SGI UV4 Kernel Fixes Mike Travis <travis@sgi.com> - 2016-08-01 21:10 +0200
    [PATCH 2/4] x86/platform/UV: Fix problem with iounmap UV4 EFI System Table causing panic Mike Travis <travis@sgi.com> - 2016-08-01 21:10 +0200
      [tip:x86/urgent] x86/platform/UV: Fix bug with iounmap() of the UV4  EFI System Table causing a crash tip-bot for Mike Travis <tipbot@zytor.com> - 2016-08-10 20:20 +0200

#1453415 — [PATCH 0/4] x86/platform/UV: SGI UV4 Kernel Fixes

FromMike Travis <travis@sgi.com>
Date2016-08-01 21:10 +0200
Subject[PATCH 0/4] x86/platform/UV: SGI UV4 Kernel Fixes
Message-ID<s1qL8-1VI-11@gated-at.bofh.it>
A few problems have been found as the UV4 BIOS and hardware is being
developed and tested.  These patches fix those problems.

Patch1: uv4_fix_gam_range_lookup_table
  - Fixes a problem with building the UV4 GAM range table

Patch2: uv4_fix_bios_init_error
  - Fixes a panic associated with the UV4 system table

Patch3: uv4_remove_uvsystab_pxm
  - Fixes a problem with incorrect data from UV4 BIOS

Patch4: uv4_disable_is_uv_system
  - Fixes a panic using the RHEL7 kdump kernel

-- 

[toc] | [next] | [standalone]


#1453416 — [PATCH 2/4] x86/platform/UV: Fix problem with iounmap UV4 EFI System Table causing panic

FromMike Travis <travis@sgi.com>
Date2016-08-01 21:10 +0200
Subject[PATCH 2/4] x86/platform/UV: Fix problem with iounmap UV4 EFI System Table causing panic
Message-ID<s1qL9-1VI-43@gated-at.bofh.it>
In reply to#1453415
Save the size field from the uv_systab struct before doing the iounmap
of the struct pointer, to avoid a null dereference error.

Reviewed-by: Dimitri Sivanich <sivanich@sgi.com>
Reviewed-by: Nathan Zimmer <nzimmer@sgi.com>
Tested-by: Frank Ramsay <framsay@sgi.com>
Tested-by: John Estabrook <estabrook@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
---
v2: modify description and changelog.
---
 arch/x86/platform/uv/bios_uv.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- linux.orig/arch/x86/platform/uv/bios_uv.c
+++ linux/arch/x86/platform/uv/bios_uv.c
@@ -200,12 +200,14 @@ void uv_bios_init(void)
 		return;
 	}
 
+	/* Starting with UV4 the UV systab size is variable */
 	if (uv_systab->revision >= UV_SYSTAB_VERSION_UV4) {
+		int size = uv_systab->size;
+
 		iounmap(uv_systab);
-		uv_systab = ioremap(efi.uv_systab, uv_systab->size);
+		uv_systab = ioremap(efi.uv_systab, size);
 		if (!uv_systab) {
-			pr_err("UV: UVsystab: ioremap(%d) failed!\n",
-				uv_systab->size);
+			pr_err("UV: UVsystab: ioremap(%d) failed!\n", size);
 			return;
 		}
 	}

-- 

[toc] | [prev] | [next] | [standalone]


#1459381 — [tip:x86/urgent] x86/platform/UV: Fix bug with iounmap() of the UV4 EFI System Table causing a crash

Fromtip-bot for Mike Travis <tipbot@zytor.com>
Date2016-08-10 20:20 +0200
Subject[tip:x86/urgent] x86/platform/UV: Fix bug with iounmap() of the UV4 EFI System Table causing a crash
Message-ID<s4GgH-79-91@gated-at.bofh.it>
In reply to#1453416
Commit-ID:  e363d24c2b997c421476c6aa00547edadf678efe
Gitweb:     http://git.kernel.org/tip/e363d24c2b997c421476c6aa00547edadf678efe
Author:     Mike Travis <travis@sgi.com>
AuthorDate: Mon, 1 Aug 2016 13:40:51 -0500
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 10 Aug 2016 15:55:38 +0200

x86/platform/UV: Fix bug with iounmap() of the UV4 EFI System Table causing a crash

Save the uv_systab::size field before doing the iounmap()
of the struct pointer, to avoid a NULL dereference crash.

Tested-by: Frank Ramsay <framsay@sgi.com>
Tested-by: John Estabrook <estabrook@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Dimitri Sivanich <sivanich@sgi.com>
Reviewed-by: Nathan Zimmer <nzimmer@sgi.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: Andrew Banman <abanman@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russ Anderson <rja@sgi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20160801184050.250424783@asylum.americas.sgi.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/platform/uv/bios_uv.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c
index 66b2166..4e9fd13 100644
--- a/arch/x86/platform/uv/bios_uv.c
+++ b/arch/x86/platform/uv/bios_uv.c
@@ -199,12 +199,14 @@ void uv_bios_init(void)
 		return;
 	}
 
+	/* Starting with UV4 the UV systab size is variable */
 	if (uv_systab->revision >= UV_SYSTAB_VERSION_UV4) {
+		int size = uv_systab->size;
+
 		iounmap(uv_systab);
-		uv_systab = ioremap(efi.uv_systab, uv_systab->size);
+		uv_systab = ioremap(efi.uv_systab, size);
 		if (!uv_systab) {
-			pr_err("UV: UVsystab: ioremap(%d) failed!\n",
-				uv_systab->size);
+			pr_err("UV: UVsystab: ioremap(%d) failed!\n", size);
 			return;
 		}
 	}

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web