coreboot/src/cpu
Arthur Heymans d7c371619a cpu/x86/smm_module_load: Rewrite setup_stub
This code was hard to read as it did too much and had a lot of state
to keep track of.

It also looks like the staggered entry points were first copied and
only later the parameters of the first stub were filled in. This
means that only the BSP stub is actually jumping to the permanent
smihandler. On the APs the stub would jump to wherever c_handler
happens to point to, which is likely 0. This effectively means that on
APs it's likely easy to have arbitrary code execution in SMM which is a
security problem.

Change-Id: I42ef9d6a30f3039f25e2cde975086a1365ca4182
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63478
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@tutanota.com>
2022-05-28 05:07:57 +00:00
..
amd cpu/amd: Remove unused <cpu/x86/pae.h> 2022-05-16 02:41:33 +00:00
armltd Kconfig: comply to Linux 5.3's Kconfig language rules 2019-11-23 20:09:56 +00:00
intel arch/x86/postcar_loader.c: Change prepare_and_run_postcar signature 2022-05-16 07:05:59 +00:00
power9 src/cpu/power9: add file structure for power9, implement SCOM access 2022-02-11 13:53:29 +00:00
qemu-power8 src: Remove leading blank lines from SPDX header 2020-05-18 07:00:27 +00:00
qemu-x86 cpu/x86/lapic: Move LAPIC configuration to MP init 2022-02-05 07:59:04 +00:00
x86 cpu/x86/smm_module_load: Rewrite setup_stub 2022-05-28 05:07:57 +00:00
Kconfig src/cpu: Remove unused symbols 2021-02-18 10:11:24 +00:00
Makefile.inc src/cpu/power9: add file structure for power9, implement SCOM access 2022-02-11 13:53:29 +00:00