From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0DD5DC43602 for ; Wed, 8 Jul 2026 09:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qxs2nFhQMbnjBkeF/rlhxru/wqyGgYneVR4zs74+sR8=; b=V1RN8PKCumkrp2 MpmjDni0mnSE8q1TdWa9fxf3X7p7SR+G/Dkaf/JITxqNDl7/Rwofb/MML08km0PbCP+s1KQlef+6S npCsPrv+HzUU7ZOtOG6L6oIo0/UgKMpYOSZZ2CTdXmCeWitf/pb/LC8rd+q+rtvs2ZuAKpdPRbFdD W/wJ71vPBb5KawPDKrvlqkXZEI66HNLaEtu3AUvSEcaa3U4qNu6GOSQ7aacUbeVLYdHDf0nbxa4It RJxzc0uXJ/W4K6xCuzxrzLkgjnvPOQwGc8nYmezGr/X8W/g6pmU3zKOzitVW7qG0JIi2ko+KGokHt p5M35bxhyJRH3DAFl1xw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1whONB-0000000Giu2-00P0; Wed, 08 Jul 2026 09:15:17 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1whON8-0000000GitZ-1Ak3; Wed, 08 Jul 2026 09:15:14 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id DC95A40128; Wed, 8 Jul 2026 09:15:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D697D1F00A3A; Wed, 8 Jul 2026 09:15:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783502113; bh=QXKIkU3dsIb83LaNl9YeImi7A85K1dyuGPQma33N644=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=DFMxLuEi7KbiLxKOKr7+5tYyHQCk3JpHfb6tuRzE2WRkuMx1mPUf9jIugzEHb8/5x LO8Xyowg5mKltHMmbDOr+gi5tZvNMk+K5CLlhuwiVeBNQv3EKRcMCXRbA9wKg3qjXN yktK4sMH/4XosacPFHJ3cmJotsn19Buu9FUV++AMzk2yr3c1ztSf7A6xr+F2FPufYH 7C4ovIQAnZoRC6G/Qa1C+7b0RWd5ohzlBHkaLFo1vS55Av8D6fJzCv3nFP2MI70JYw B1ItdudtjTbPFz/5q4TbBg2sVxB0g3L5dtrLprFMkBcrpN5g+UQIf8TbjYMP31tAm2 nw7+qD9T59MIw== From: Thomas Gleixner To: Jinjie Ruan , LKML Cc: Peter Zijlstra , Mark Rutland , Kees Cook , Andy Lutomirski , Oleg Nesterov , Richard Henderson , Russell King , Catalin Marinas , Guo Ren , Geert Uytterhoeven , Thomas Bogendoerfer , Helge Deller , Yoshinori Sato , Richard Weinberger , Chris Zankel , linux-arm-kernel@lists.infradead.org, linux-alpha@vger.kernel.org, linux-csky@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org, linux-um@lists.infradead.org, Michael Ellerman , Shrikanth Hegde , linuxppc-dev@lists.ozlabs.org, Huacai Chen , loongarch@lists.linux.dev, Paul Walmsley , Palmer Dabbelt , linux-riscv@lists.infradead.org, Sven Schnelle , linux-s390@vger.kernel.org, x86@kernel.org, Arnd Bergmann , Vineet Gupta , Will Deacon , Brian Cain , Michal Simek , Dinh Nguyen , "David S. Miller" , Andreas Larsson , linux-snps-arc@lists.infradead.org, linux-hexagon@vger.kernel.org, linux-openrisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, Michal =?utf-8?Q?Such=C3=A1nek?= , Jonathan Corbet , linux-doc@vger.kernel.org Subject: Re: [patch 11/18] seccomp, treewide: Rename and convert __secure_computing() to return boolean In-Reply-To: <2e6ed364-ce8f-4b4b-8675-acd07f140f4f@huawei.com> References: <20260707181957.433213175@kernel.org> <20260707190254.230735780@kernel.org> <2e6ed364-ce8f-4b4b-8675-acd07f140f4f@huawei.com> Date: Wed, 08 Jul 2026 11:15:10 +0200 Message-ID: <871pddsuzl.ffs@fw13> MIME-Version: 1.0 X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Wed, Jul 08 2026 at 09:43, Jinjie Ruan wrote: > 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. >> 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. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv