Commit Graph

2 Commits

Author SHA1 Message Date
Pierre-Clément Tosi 7a74d40914 exceptions_panic: Fix wrong PSCI function ID
Use the right literal for a PSCI_SYSTEM_RESET.

Fixes: d40ff91f65 ("vmbase: Handle very early exceptions")
Bug: 237659918
Test: m crosvm
Change-Id: I7df28e537191441628273510526ce4f839ed40e4
2022-08-18 15:12:47 +01:00
Pierre-Clément Tosi d40ff91f65 vmbase: Handle very early exceptions
Introduce a vector table to provide a predictable behavior when
exceptions are raised before the Rust runtime is ready i.e. before
vector_table_el1 may be used. With this table, exceptions are "handled"
by attempting a PSCI_SYSTEM_RESET call and hanging if that returns. For
example, this may prevent a malicious host from triggering a fault when
entry.S accesses .data or .bss in entry.S and getting arbitrary code
execution from VBAR_EL1.

Bug: 237659918
Test: atest vmbase_example.integration_test
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
Change-Id: I5106e32b3118ec691ea6a7a80516d8c29918563c
2022-06-30 17:52:28 +01:00