acrn-hypervisor/hypervisor/arch/x86
Jiaqing Zhao 53825c5cac e820: properly reserve memory for multiboot modules
In current implementation, if there are multiple continous 4k-aligned
modules, 0-sized e820 entries will be created between these regions.
And for non-4k-aligned modules, when two of them are located in one
page, the second memory range will not be reserved as it was not in
one e820 entry after the first is reserved, making it vulnerable.

This patch fixes it by marking the exact memory range of multiboot
modules as unusable first, then shrinking the e820 entries to page
boundary. If the module crosses multiple e820 entries, possibly due
to a buggy bootloader, hypervisor will panic immediately to prevent
modules getting corrupted.

Tracked-On: #8617
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2024-06-20 09:10:27 +08:00
..
boot Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
configs HV: emulate dummy multi-function dev in Service VM 2023-09-11 16:13:16 +08:00
guest hv: cpuid: fix hybrid related cpuid error 2024-06-19 17:07:10 +08:00
lib hv: shell: improve console to modify input easier 2022-07-28 23:31:43 +08:00
seed Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
cpu_caps.c hv: cve hotfix: Disable RRSBA on platform using retpoline 2022-07-22 09:38:41 +08:00
cpu_state_tbl.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
cpu.c hv: enable thermal lvt interrupt 2024-05-16 09:40:32 +08:00
e820.c e820: properly reserve memory for multiboot modules 2024-06-20 09:10:27 +08:00
exception.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
gdt.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
hw_thermal.c hv: enable thermal lvt interrupt 2024-05-16 09:40:32 +08:00
idt.S Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
init.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
ioapic.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
irq.c hv: enable thermal lvt interrupt 2024-05-16 09:40:32 +08:00
lapic.c hypervisor: Fix spelling and grammar mistakes. 2023-10-23 16:45:28 +08:00
mmu.c hv: mmu: intiialize ppt_page_pool.bitmap in allocate_ppt_pages() 2024-03-25 09:57:08 +08:00
nmi.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
notify.c hypervisor: Fix spelling and grammar mistakes. 2023-10-24 11:10:47 +08:00
page.c hypervisor: Fix spelling and grammar mistakes. 2023-10-24 11:10:47 +08:00
pagetable.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
platform_caps.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
pm.c hypervisor: Fix spelling and grammar mistakes. 2023-10-24 11:10:47 +08:00
rdt.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
rtcm.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
sched.S Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
security.c hv: refine set_fs_base() function 2024-04-23 11:00:43 +08:00
sgx.c hv: sgx: refactor partition_epc() 2023-06-06 15:22:19 +08:00
trampoline.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
tsc_deadline_timer.c HV: arch: fix a violation of coding guideline C-TY-24 2021-11-04 18:15:47 +08:00
tsc.c hv: tsc: start HPET counter before calibration 2022-09-15 03:14:01 +08:00
vmx.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
vtd.c doc: Fix spelling and typo mistakes. 2023-09-05 09:34:21 +08:00
wakeup.S Update copyright year range in code headers 2022-07-15 11:48:35 +08:00