Thread (96 messages) 96 messages, 13 authors, 6h ago

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

From: Oleg Nesterov <oleg@redhat.com>
Date: 2026-07-08 16:04:51
Also in: linux-alpha, linux-arch, linux-doc, linux-m68k, linux-mips, linux-riscv, linux-s390, linux-sh, linux-um, lkml, loongarch, sparclinux

On 07/08, Thomas Gleixner wrote:
On Wed, Jul 08 2026 at 09:43, Jinjie Ruan wrote:
quoted
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;
Or simply

	return __seccomp_filter(this_syscall, true);

and remove "return true" below ?

Either way, I personally like this change, I was always confused by these -1's.

Acked-by: Oleg Nesterov <oleg@redhat.com>

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help