mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
ANDROID: arm64: add __nocfi to __apply_alternatives
__apply_alternatives makes indirect calls to functions whose address is taken in assembly code using the alternative_cb macro. With CFI enabled using non-canonical jump tables, the compiler isn't able to replace the function reference with the jump table reference, which trips CFI. Bug: 145210207 Change-Id: I2361b601d987cd25f88aa0b9f37b400ff566febc Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
parent
b1debb369c
commit
4c81c26cdc
|
|
@ -132,8 +132,8 @@ static void clean_dcache_range_nopatch(u64 start, u64 end)
|
|||
} while (cur += d_size, cur < end);
|
||||
}
|
||||
|
||||
static void __apply_alternatives(void *alt_region, bool is_module,
|
||||
unsigned long *feature_mask)
|
||||
static void __nocfi __apply_alternatives(void *alt_region, bool is_module,
|
||||
unsigned long *feature_mask)
|
||||
{
|
||||
struct alt_instr *alt;
|
||||
struct alt_region *region = alt_region;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user