From 77f2261d810df7210daf3a5ec2b8d1f72c0ee63c Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Mon, 7 Aug 2023 14:14:35 +0300 Subject: [PATCH] Rebase patch for RC4 Signed-off-by: David Abdurachmanov --- linux-kernel-test.patch | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/linux-kernel-test.patch b/linux-kernel-test.patch index c27c73ecc..37df609b2 100644 --- a/linux-kernel-test.patch +++ b/linux-kernel-test.patch @@ -1,21 +1,3 @@ -commit e79633f74b1ef25ddcdc3b0f54335edc799025fa (HEAD) -Author: Alexandre Ghiti -Date: Mon Aug 7 10:15:42 2023 +0000 - - riscv: Do not allow vmap pud mappings for 3-level page table - - The vmalloc_fault() path was removed and to avoid syncing the vmalloc PGD - mappings, they are now preallocated. But if the kernel can use a PUD mapping - (which in sv39 is actually a PGD mapping) for large vmalloc allocation, it - will free the current unused preallocated PGD mapping and install a new leaf - one. Since there is no sync anymore, some page tables lack this new mapping - and that triggers a panic. - - So only allow PUD mappings for sv48 and sv57. - - Fixes: 7d3332be011e ("riscv: mm: Pre-allocate PGD entries for vmalloc/modules area") - Signed-off-by: Alexandre Ghiti - diff --git a/arch/riscv/include/asm/vmalloc.h b/arch/riscv/include/asm/vmalloc.h index 58d3e447f191..924d01b56c9a 100644 --- a/arch/riscv/include/asm/vmalloc.h @@ -31,8 +13,8 @@ index 58d3e447f191..924d01b56c9a 100644 #define arch_vmap_pud_supported arch_vmap_pud_supported static inline bool arch_vmap_pud_supported(pgprot_t prot) { -- return true; -+ return pgtable_l4_enabled || pgtable_l5_enabled; +- return true; ++ return pgtable_l4_enabled || pgtable_l5_enabled; } #define arch_vmap_pmd_supported arch_vmap_pmd_supported