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

From
Kees Cook <kees@kernel.org>
Date
2026-07-09 16:22:06
Also in
linux-alpha, linux-arch, linux-doc, linux-m68k, linux-mips, linux-riscv, linux-s390, linux-sh, linux-um, lkml, loongarch, sparclinux
Reply to
Thomas Gleixner, 2026-07-07
On Tue, Jul 07, 2026 at 09:06:40PM +0200, Thomas Gleixner wrote:
From: Jinjie Ruan <redacted>

The return value of __secure_computing() currently uses 0 to indicate
that a system call should be allowed, and -1 to indicate that it should
be blocked/killed. This 0/-1 pattern is non-intuitive for a security
check function and makes the control flow at the call sites less readable.
Conceptually, I'm good with this. Just make sure that the
tools/testing/selftests/seccomp/seccomp_bpf tests still passes. :)

-- 
Kees Cook
Thread (125 messages) 125 messages, 17 authors, last reply 18d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help