diff options
author | Will Deacon | 2018-07-30 17:43:39 +0100 |
---|---|---|
committer | Will Deacon | 2018-07-30 17:43:39 +0100 |
commit | efd112353bf7c0f9d50f928b449ea9da0ee9554b (patch) | |
tree | 6fc4a370843a96e0babaaa99a0a8cc349d2185e5 /arch/arm64 | |
parent | ba70ffa7d20d771ae47a1597799da84980aafe15 (diff) |
arm64: svc: Ensure hardirq tracing is updated before return
We always run userspace with interrupts enabled, but with the recent
conversion of the syscall entry/exit code to C, we don't inform the
hardirq tracing code that interrupts are about to become enabled by
virtue of restoring the EL0 SPSR.
This patch ensures that trace_hardirqs_on() is called on the syscall
return path when we return to the assembly code with interrupts still
disabled.
Fixes: f37099b6992a ("arm64: convert syscall trace logic to C")
Reported-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/kernel/syscall.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm64/kernel/syscall.c b/arch/arm64/kernel/syscall.c index be00c85794db..032d22312881 100644 --- a/arch/arm64/kernel/syscall.c +++ b/arch/arm64/kernel/syscall.c @@ -91,8 +91,15 @@ static void el0_svc_common(struct pt_regs *regs, int scno, int sc_nr, if (!has_syscall_work(flags) && !IS_ENABLED(CONFIG_DEBUG_RSEQ)) { local_daif_mask(); flags = current_thread_info()->flags; - if (!has_syscall_work(flags)) + if (!has_syscall_work(flags)) { + /* + * We're off to userspace, where interrupts are + * always enabled after we restore the flags from + * the SPSR. + */ + trace_hardirqs_on(); return; + } local_daif_restore(DAIF_PROCCTX); } |