acrn-hypervisor/hypervisor/boot
Shiqing Gao c808972926 hv: fix the potential dead loop in _parse_madt
With current implementation:
If the case 'entry->length < sizeof(struct acpi_subtable_header)' is
triggered, it will lead to a dead loop.

What this patch does:
Gracefully return when this case is triggered.

Why:
If 'entry->length < sizeof(struct acpi_subtable_header)', it means that
there is no valid 'struct acpi_subtable_header' starting from the entry.
There must be something wrong. It should not happen in normal case.

v1 -> v2:
 * Remove the unacceptable ASSERT, just gracefully return

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-13 16:20:18 +08:00
..
include hv: cleanup cpu.c and cpu.h 2018-07-11 10:25:16 +08:00
sbl HV: Fix missing brackets for MISRA C Violations 2018-07-13 09:09:12 +08:00
acpi.c hv: fix the potential dead loop in _parse_madt 2018-07-13 16:20:18 +08:00
dmar_parse.c Revert "hv: More changes to enable GPU passthru" 2018-07-05 11:06:47 +08:00
reloc.c HV: build: make relocation-related code configurable 2018-07-11 19:18:26 +08:00