Patch "xen: use correct end address of kernel for conflict checking" has been added to the 4.19-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

    xen: use correct end address of kernel for conflict checking

to the 4.19-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:
     xen-use-correct-end-address-of-kernel-for-conflict-c.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 1e72911b35deda997202b4fc0160a4847c760dc1
Author: Juergen Gross <jgross@xxxxxxxx>
Date:   Sat Aug 3 08:01:22 2024 +0200

    xen: use correct end address of kernel for conflict checking
    
    [ Upstream commit fac1bceeeb04886fc2ee952672e6e6c85ce41dca ]
    
    When running as a Xen PV dom0 the kernel is loaded by the hypervisor
    using a different memory map than that of the host. In order to
    minimize the required changes in the kernel, the kernel adapts its
    memory map to that of the host. In order to do that it is checking
    for conflicts of its load address with the host memory map.
    
    Unfortunately the tested memory range does not include the .brk
    area, which might result in crashes or memory corruption when this
    area does conflict with the memory map of the host.
    
    Fix the test by using the _end label instead of __bss_stop.
    
    Fixes: 808fdb71936c ("xen: check for kernel memory conflicting with memory layout")
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Tested-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 075ed47993bbf..69fd1134b7fcf 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -862,7 +862,7 @@ char * __init xen_memory_setup(void)
 	 * to relocating (and even reusing) pages with kernel text or data.
 	 */
 	if (xen_is_e820_reserved(__pa_symbol(_text),
-			__pa_symbol(__bss_stop) - __pa_symbol(_text))) {
+				 __pa_symbol(_end) - __pa_symbol(_text))) {
 		xen_raw_console_write("Xen hypervisor allocated kernel memory conflicts with E820 map\n");
 		BUG();
 	}




[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