[PATCH 11/17] psci: use __pa_function for cpu_resume

Kees Cook keescook at chromium.org
Fri Mar 12 02:45:51 GMT 2021


On Thu, Mar 11, 2021 at 04:49:13PM -0800, Sami Tolvanen wrote:
> With CONFIG_CFI_CLANG, the compiler replaces function pointers with
> jump table addresses, which results in __pa_symbol returning the
> physical address of the jump table entry. As the jump table contains
> an immediate jump to an EL1 virtual address, this typically won't
> work as intended. Use __pa_function instead to get the address to
> cpu_resume.
> 
> Signed-off-by: Sami Tolvanen <samitolvanen at google.com>

Reviewed-by: Kees Cook <keescook at chromium.org>

-- 
Kees Cook



More information about the linux-arm-kernel mailing list