On Tue, Mar 14, 2023, at 3:13 AM, Evgeniy Baskov wrote:
After every implicit mapping is removed, this code is no longer needed.
Remove memory mapping from page fault handler to ensure that there are
no hidden invalid memory accesses.
This patch is *by far* the scariest of the bunch in my boot. And it
violates a basic principle of kernel development: it's better to run
in degraded mode than to fail outright unless running in degraded mode
is dangerous for some reason.
And this boot code is not actually meaningfully exposed to attack.
Anyone who can get the boot code to consume garbage likely *already*
controls the system, including anything that we might write to TPM or
any other verification mechanism.
So I think this should log an error, set a flag to make sure we print
an even louder error after full boot, but still add the mapping and
keep trying.
...
--Andy
Tested-by: Mario Limonciello <mario.limonciello@xxxxxxx>
Signed-off-by: Evgeniy Baskov <baskov@xxxxxxxxx>
---
arch/x86/boot/compressed/ident_map_64.c | 26 ++++++++++---------------
1 file changed, 10 insertions(+), 16 deletions(-)