Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08f2c5a5 authored by Sami Tolvanen's avatar Sami Tolvanen Committed by Alistair Delva
Browse files

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: I088faf94b64ac3068ac798dd8e5029cb2ab92903
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
parent a8ef2a29
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ 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)
static void __nocfi __apply_alternatives(void *alt_region, bool is_module)
{
	struct alt_instr *alt;
	struct alt_region *region = alt_region;