x86/mm/KASLR: Do not adapt the size of the direct mapping section for SGI UV system
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest posting 2/22 patches 15 repliesIn review
- v2 posting 1/22 patches 7 repliesSuperseded
- v11 patch 3 repliesSuperseded
Changes in v2 from the cover letter
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.
Patches in v2 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | x86/UV: Introduce a helper function to check UV system at earlier stagearch/ | +6 | 5 replies | |
| 2/2 | x86/mm/KASLR: Do not adapt the size of the direct mapping section for SGI UV systemarch/ | +2 | 9 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Mike Travis | Thomas Garnier |
|---|---|---|
| 1/2 | A-b | |
| 2/2 | A-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 RESEND 0/2] x86/mm/KASLR: Do not adapt the size of the direct mapping section for SGI UV system
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(-)
Signature · 1 line
2.5.5