Commit 4286d192 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - Bring the PTRACE_SYSEMU semantics in line with the man page.

 - Annotate variable assignment in get_user() with the type to avoid
   sparse warnings.

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: Add get_user() type annotation on the !access_ok() path
  arm64: Fix PTRACE_SYSEMU semantics
parents f5ca7a71 8cfb347a
...@@ -304,7 +304,7 @@ do { \ ...@@ -304,7 +304,7 @@ do { \
__p = uaccess_mask_ptr(__p); \ __p = uaccess_mask_ptr(__p); \
__raw_get_user((x), __p, (err)); \ __raw_get_user((x), __p, (err)); \
} else { \ } else { \
(x) = 0; (err) = -EFAULT; \ (x) = (__force __typeof__(x))0; (err) = -EFAULT; \
} \ } \
} while (0) } while (0)
......
...@@ -1829,10 +1829,11 @@ static void tracehook_report_syscall(struct pt_regs *regs, ...@@ -1829,10 +1829,11 @@ static void tracehook_report_syscall(struct pt_regs *regs,
int syscall_trace_enter(struct pt_regs *regs) int syscall_trace_enter(struct pt_regs *regs)
{ {
if (test_thread_flag(TIF_SYSCALL_TRACE) || unsigned long flags = READ_ONCE(current_thread_info()->flags);
test_thread_flag(TIF_SYSCALL_EMU)) {
if (flags & (_TIF_SYSCALL_EMU | _TIF_SYSCALL_TRACE)) {
tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER); tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER);
if (!in_syscall(regs) || test_thread_flag(TIF_SYSCALL_EMU)) if (!in_syscall(regs) || (flags & _TIF_SYSCALL_EMU))
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment