Commit 4286d192 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -304,7 +304,7 @@ do { \
		__p = uaccess_mask_ptr(__p);				\
		__raw_get_user((x), __p, (err));			\
	} else {							\
		(x) = 0; (err) = -EFAULT;				\
		(x) = (__force __typeof__(x))0; (err) = -EFAULT;	\
	}								\
} while (0)

+4 −3
Original line number Diff line number Diff line
@@ -1829,10 +1829,11 @@ static void tracehook_report_syscall(struct pt_regs *regs,

int syscall_trace_enter(struct pt_regs *regs)
{
	if (test_thread_flag(TIF_SYSCALL_TRACE) ||
		test_thread_flag(TIF_SYSCALL_EMU)) {
	unsigned long flags = READ_ONCE(current_thread_info()->flags);

	if (flags & (_TIF_SYSCALL_EMU | _TIF_SYSCALL_TRACE)) {
		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;
	}