Thread (87 messages) 87 messages, 12 authors, 2h ago

Re: [patch 11/18] seccomp, treewide: Rename and convert __secure_computing() to return boolean

From: Thomas Gleixner <tglx@kernel.org>
Date: 2026-07-08 09:15:13
Also in: linux-alpha, linux-arch, linux-doc, linux-m68k, linux-mips, linux-riscv, linux-s390, linux-sh, linux-um, lkml, loongarch, sparclinux

On Wed, Jul 08 2026 at 09:43, Jinjie Ruan wrote:
quoted hunk ↗ jump to hunk
On 7/8/2026 3:06 AM, Thomas Gleixner wrote:
As Ada pointed out, the description of secure_computing in arch/Kconfig
need to be updated, a possible suggestion:
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -636,8 +636,8 @@ config HAVE_ARCH_SECCOMP_FILTER
          - syscall_rollback()
          - syscall_set_return_value()
          - SIGSYS siginfo_t support
-         - secure_computing is called from a ptrace_event()-safe context
-         - secure_computing return value is checked and a return value
of -1
+         - seccomp_permits_syscall is called from a ptrace_event()-safe
context
+         - seccomp_permits_syscall return value is checked and if false
Makes sense.
quoted
 		if (__seccomp_filter(this_syscall, true))
-			return -1;
+			return false;
The return value of __seccomp_filter is checked in the wrong way, check
-1 should be replaced with check false, maybe:

-               if (__seccomp_filter(this_syscall, true))
-                       return -1;
+               if (!__seccomp_filter(this_syscall, true))
+                       return false;
Ooops.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help