Files
android_kernel_xiaomi_sm8450/include/linux/init.h
Sami Tolvanen 7bc9b9d25b ANDROID: cfi: add __cficanonical and fix PREL32 relocations
With non-canonical CFI, the compiler rewrites function references to
point to the CFI jump table for indirect call checking. This won't
happen when the address is taken in assembly, and will result in a CFI
failure if we jump to the address later in C code.

This change adds the __cficanonical attribute, which tells the
compiler to switch to a canonical jump table for the function. With
canonical CFI, the compiler appends a .cfi postfix to the function
name, and points the original symbol to the jump table. This allows
addresses taken in assembly code to be used for indirect calls without
tripping CFI checks.

Bug: 145210207
Change-Id: Iaca9d1d95f59d7169168d89bc10bf71420487a67
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2021-01-14 16:29:15 +00:00

11 KiB