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

Commit 09ae6b7b authored by Sami Tolvanen's avatar Sami Tolvanen
Browse files

ANDROID: x86: disable CFI for do_syscall_*



x86 doesn't use syscall wrappers in 4.14, which means do_syscall_*
function end up making an indirect call using a mismatching function
pointer. Disable CFI to work around the type mismatch.

Bug: 145297900
Change-Id: I91dd2bd94f9b5174c03cc3d3a1007061f7fe332e
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
parent 9355c9b8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ __visible inline void syscall_return_slowpath(struct pt_regs *regs)
}

#ifdef CONFIG_X86_64
__visible void do_syscall_64(struct pt_regs *regs)
__nocfi __visible void do_syscall_64(struct pt_regs *regs)
{
	struct thread_info *ti = current_thread_info();
	unsigned long nr = regs->orig_ax;
@@ -305,7 +305,7 @@ __visible void do_syscall_64(struct pt_regs *regs)
 * extremely hot in workloads that use it, and it's usually called from
 * do_fast_syscall_32, so forcibly inline it to improve performance.
 */
static __always_inline void do_syscall_32_irqs_on(struct pt_regs *regs)
static __nocfi __always_inline void do_syscall_32_irqs_on(struct pt_regs *regs)
{
	struct thread_info *ti = current_thread_info();
	unsigned int nr = (unsigned int)regs->orig_ax;