linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 RESEND 0/2] x86/mm/KASLR: Do not adapt the size of the direct mapping section for SGI UV system
@ 2017-09-07  7:42 Baoquan He
  2017-09-07  7:42 ` [PATCH v2 RESEND 1/2] x86/UV: Introduce a helper function to check UV system at earlier stage Baoquan He
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Baoquan He @ 2017-09-07  7:42 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: mingo, tglx, hpa, thgarnie, keescook, akpm, yamada.masahiro, rja,
	frank.ramsay, Baoquan He

This is v2 post RESEND. Add Mike's Acked-by to patch 2/2 as he suggested
in private mail. And update patches log slightly.

This patchset is trying to fix a bug that SGI UV system casually hang
during boot with KASLR enabled. The root cause is that mm KASLR adapts
size of the direct mapping section only based on the system RAM size.
Then later when map SGI UV MMIOH region into the direct mapping during
rest_init() invocation, it might go beyond of the directing mapping
section and step into VMALLOC or VMEMMAP area, then BUG_ON triggered.

The fix is adding a helper function is_early_uv_system to check UV system
earlier, then call the helper function in kernel_randomize_memory() to
check if it's a SGI UV system, if yes, we keep the size of direct mapping
section to be 64TB just as nokslr.

With this fix, SGI UV system can have 64TB direct mapping size always,
and the starting address of direct mapping/vmalloc/vmemmap and the padding
between them can still be randomized to enhance the system security.

v1->v2:
    1. Mike suggested making is_early_uv_system() an inline function and be
    put in include/asm/uv/uv.h so that they can adjust them easier in the
    future.

    2. Split the v1 code into uv part and mm KASLR part as Mike suggested.

Baoquan He (2):
  x86/UV: Introduce a helper function to check UV system at earlier
    stage
  x86/mm/KASLR: Do not adapt the size of the direct mapping section for
    SGI UV system

 arch/x86/include/asm/uv/uv.h | 6 ++++++
 arch/x86/mm/kaslr.c          | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

-- 
2.5.5

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2018-05-31  3:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-07  7:42 [PATCH v2 RESEND 0/2] x86/mm/KASLR: Do not adapt the size of the direct mapping section for SGI UV system Baoquan He
2017-09-07  7:42 ` [PATCH v2 RESEND 1/2] x86/UV: Introduce a helper function to check UV system at earlier stage Baoquan He
2017-09-14  7:29   ` Baoquan He
2017-09-14  7:49     ` Dave Young
2017-09-14  8:08       ` Baoquan He
2017-09-15  0:47         ` Dave Young
2017-09-15  0:55         ` Dave Young
2017-09-07  7:42 ` [PATCH v2 RESEND 2/2] x86/mm/KASLR: Do not adapt the size of the direct mapping section for SGI UV system Baoquan He
2017-09-28  7:56   ` Ingo Molnar
2017-09-28  8:31     ` Baoquan He
2017-09-28  9:01       ` Ingo Molnar
2017-09-28 14:10         ` Mike Travis
2017-09-30 11:25           ` Baoquan He
2018-05-17  3:18           ` Baoquan He
2018-05-17 15:06             ` Ramsay, Frank
2018-05-17 15:47               ` Mike Travis
     [not found]             ` <53301a1e-e817-912f-cf7d-0000b078c7a3@hpe.com>
     [not found]               ` <20180523000306.GY24627@MiWiFi-R3L-srv>
     [not found]                 ` <7ce3cc80-3991-f914-c539-9fa38256ea4b@hpe.com>
2018-05-31  3:26                   ` Baoquan He
2017-09-14  1:44 ` [PATCH v2 RESEND 0/2] " Baoquan He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).