Commit b94ae8ad authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull seccomp updates from Kees Cook:
 "Mostly this is implementing the new flag SECCOMP_USER_NOTIF_FLAG_CONTINUE,
  but there are cleanups as well.

   - implement SECCOMP_USER_NOTIF_FLAG_CONTINUE (Christian Brauner)

   - fixes to selftests (Christian Brauner)

   - remove secure_computing() argument (Christian Brauner)"

* tag 'seccomp-v5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  seccomp: rework define for SECCOMP_USER_NOTIF_FLAG_CONTINUE
  seccomp: fix SECCOMP_USER_NOTIF_FLAG_CONTINUE test
  seccomp: simplify secure_computing()
  seccomp: test SECCOMP_USER_NOTIF_FLAG_CONTINUE
  seccomp: add SECCOMP_USER_NOTIF_FLAG_CONTINUE
  seccomp: avoid overflow in implicit constant conversion
parents 3b805ca1 23b2c96f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -923,7 +923,7 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno)

	/* Do seccomp after ptrace; syscall may have changed. */
#ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER
	if (secure_computing(NULL) == -1)
	if (secure_computing() == -1)
		return -1;
#else
	/* XXX: remove this once OABI gets fixed */
+1 −1
Original line number Diff line number Diff line
@@ -1816,7 +1816,7 @@ int syscall_trace_enter(struct pt_regs *regs)
	}

	/* Do the secure computing after ptrace; failures should be fast. */
	if (secure_computing(NULL) == -1)
	if (secure_computing() == -1)
		return -1;

	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
+1 −1
Original line number Diff line number Diff line
@@ -342,7 +342,7 @@ long do_syscall_trace_enter(struct pt_regs *regs)
	}

	/* Do the secure computing check after ptrace. */
	if (secure_computing(NULL) == -1)
	if (secure_computing() == -1)
		return -1;

#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
+1 −1
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ __visible void do_syscall_trace_enter(struct pt_regs *regs)
	 * If this fails we might have return value in a0 from seccomp
	 * (via SECCOMP_RET_ERRNO/TRACE).
	 */
	if (secure_computing(NULL) == -1) {
	if (secure_computing() == -1) {
		syscall_set_nr(current, regs, -1);
		return;
	}
+1 −1
Original line number Diff line number Diff line
@@ -856,7 +856,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
	}

	/* Do the secure computing check after ptrace. */
	if (secure_computing(NULL)) {
	if (secure_computing()) {
		/* seccomp failures shouldn't expose any additional code. */
		return -1;
	}
Loading