diff options
author | Chris Koch <chrisko@google.com> | 2023-12-15 22:05:21 +0300 |
---|---|---|
committer | Dave Hansen <dave.hansen@linux.intel.com> | 2024-02-23 02:13:57 +0300 |
commit | 43b1d3e68ee7f41c494ee5558d8def3d3d0b7f1b (patch) | |
tree | 659553db237015c70de48d9b6c71b81e1a4f8723 /Documentation/arch | |
parent | ac456ca0af4fe9630cf84e7efd20b7f7bf596aab (diff) | |
download | linux-43b1d3e68ee7f41c494ee5558d8def3d3d0b7f1b.tar.xz |
kexec: Allocate kernel above bzImage's pref_address
A relocatable kernel will relocate itself to pref_address if it is
loaded below pref_address. This means a booted kernel may be relocating
itself to an area with reserved memory on modern systems, potentially
clobbering arbitrary data that may be important to the system.
This is often the case, as the default value of PHYSICAL_START is
0x1000000 and kernels are typically loaded at 0x100000 or above by
bootloaders like iPXE or kexec. GRUB behaves like the approach
implemented here.
Also fixes the documentation around pref_address and PHYSICAL_START to
be accurate.
[ dhansen: changelog tweak ]
Co-developed-by: Cloud Hsu <cloudhsu@google.com>
Signed-off-by: Cloud Hsu <cloudhsu@google.com>
Signed-off-by: Chris Koch <chrisko@google.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Link: https://lore.kernel.org/all/20231215190521.3796022-1-chrisko%40google.com
Diffstat (limited to 'Documentation/arch')
-rw-r--r-- | Documentation/arch/x86/boot.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/arch/x86/boot.rst b/Documentation/arch/x86/boot.rst index c513855a54bb..4fd492cb4970 100644 --- a/Documentation/arch/x86/boot.rst +++ b/Documentation/arch/x86/boot.rst @@ -878,7 +878,8 @@ Protocol: 2.10+ address if possible. A non-relocatable kernel will unconditionally move itself and to run - at this address. + at this address. A relocatable kernel will move itself to this address if it + loaded below this address. ============ ======= Field name: init_size |