Skip to content

Commit

Permalink
Merge tag 'core_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/tip/tip

Pull syscall tracing fix from Borislav Petkov:
 "Fix the seccomp syscall rewriting so that trace and audit see the
  rewritten syscall number, from Kees Cook"

* tag 'core_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  core/entry: Report syscall correctly for trace and audit
  • Loading branch information
torvalds committed Sep 20, 2020
2 parents 1f8ee7e + b6ec413 commit e2bff39
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kernel/entry/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ static long syscall_trace_enter(struct pt_regs *regs, long syscall,
return ret;
}

/* Either of the above might have changed the syscall number */
syscall = syscall_get_nr(current, regs);

if (unlikely(ti_work & _TIF_SYSCALL_TRACEPOINT))
trace_sys_enter(regs, syscall);

syscall_enter_audit(regs, syscall);

/* The above might have changed the syscall number */
return ret ? : syscall_get_nr(current, regs);
return ret ? : syscall;
}

static __always_inline long
Expand Down

0 comments on commit e2bff39

Please sign in to comment.