Patch "s390/vmem: split pages when debug pagealloc is enabled" has been added to the 6.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    s390/vmem: split pages when debug pagealloc is enabled

to the 6.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     s390-vmem-split-pages-when-debug-pagealloc-is-enable.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 80f6a4e001711ee634ac53beabb5f3d10de1c561
Author: Sven Schnelle <svens@xxxxxxxxxxxxx>
Date:   Wed Jul 26 11:10:19 2023 +0200

    s390/vmem: split pages when debug pagealloc is enabled
    
    [ Upstream commit edc1e4b6e26536868ef819a735e04a5b32c10589 ]
    
    Since commit bb1520d581a3 ("s390/mm: start kernel with DAT enabled")
    the kernel crashes early during boot when debug pagealloc is enabled:
    
    mem auto-init: stack:off, heap alloc:off, heap free:off
    addressing exception: 0005 ilc:2 [#1] SMP DEBUG_PAGEALLOC
    Modules linked in:
    CPU: 0 PID: 0 Comm: swapper Not tainted 6.5.0-rc3-09759-gc5666c912155 #630
    [..]
    Krnl Code: 00000000001325f6: ec5600248064 cgrj %r5,%r6,8,000000000013263e
               00000000001325fc: eb880002000c srlg %r8,%r8,2
              #0000000000132602: b2210051     ipte %r5,%r1,%r0,0
              >0000000000132606: b90400d1     lgr %r13,%r1
               000000000013260a: 41605008     la %r6,8(%r5)
               000000000013260e: a7db1000     aghi %r13,4096
               0000000000132612: b221006d     ipte %r6,%r13,%r0,0
               0000000000132616: e3d0d0000171 lay %r13,4096(%r13)
    
    Call Trace:
     __kernel_map_pages+0x14e/0x320
     __free_pages_ok+0x23a/0x5a8)
     free_low_memory_core_early+0x214/0x2c8
     memblock_free_all+0x28/0x58
     mem_init+0xb6/0x228
     mm_core_init+0xb6/0x3b0
     start_kernel+0x1d2/0x5a8
     startup_continue+0x36/0x40
    Kernel panic - not syncing: Fatal exception: panic_on_oops
    
    This is caused by using large mappings on machines with EDAT1/EDAT2. Add
    the code to split the mappings into 4k pages if debug pagealloc is enabled
    by CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT or the debug_pagealloc kernel
    command line option.
    
    Fixes: bb1520d581a3 ("s390/mm: start kernel with DAT enabled")
    Signed-off-by: Sven Schnelle <svens@xxxxxxxxxxxxx>
    Reviewed-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
    Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index b9dcb4ae6c59a..05f4912380fac 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -761,6 +761,8 @@ void __init vmem_map_init(void)
 	if (static_key_enabled(&cpu_has_bear))
 		set_memory_nx(0, 1);
 	set_memory_nx(PAGE_SIZE, 1);
+	if (debug_pagealloc_enabled())
+		set_memory_4k(0, ident_map_size >> PAGE_SHIFT);
 
 	pr_info("Write protected kernel read-only data: %luk\n",
 		(unsigned long)(__end_rodata - _stext) >> 10);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux