From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B87953DA7D6 for ; Wed, 15 Apr 2026 16:08:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776269337; cv=none; b=A32GOAxhj5un5hwUIYtPBnW7RV8eKWePnCO0bJUrMbScfkWAwVaB+YTTe+4eHWWUJfpvMA0Ck9TVtbrGIaGbPdlv63HdnGwwxRAz2xsBHuUJQP48osj3/D1ep4sT08lAwF5K+tUv24q8KGeZO6kSQWKbyMOZWen3lnTwccdJVak= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776269337; c=relaxed/simple; bh=KvkrUqrEXEj801FFFopjdjlGJ3eF0viNvvtrxTQTaMo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ecFMuiJxMOlmqMWkx/sQiOIN7xvrMH0aT1uGXMaoGU+HsSZh+cWvK5e/bQvZVBzTJMKhKxCVFOu7RS3dJtPCKv+RKSAqb0trLSz47+7w14tOfBXbYP7SmKEq+2hqjU6uxGKecLYcjAUQnz3PPImM3qzU1u8RiZWikhOobeH8dyA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=YIZPKCsX; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YIZPKCsX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776269334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=a9hWD6oshDy2jTTI5rnCGieqhGIrpO7xF8mMLv1lp6E=; b=YIZPKCsXot3j3ptRF5sqhKRtEdnM3PlweWFtjvZTys74mSQnMVMHswIPDcAYuVMGEe6ItZ ERlwI/wvEJNLuQuufZpnxHLfRPPtasg26RetXQ+8HbfbtF93gS49pTSCg1x0UCztfI05Zd Inx3VQANg4BcRxZSnlc71nm+PfbqM0c= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-166-7sJ8m8W6NE6E2_GPElhDeg-1; Wed, 15 Apr 2026 12:08:49 -0400 X-MC-Unique: 7sJ8m8W6NE6E2_GPElhDeg-1 X-Mimecast-MFC-AGG-ID: 7sJ8m8W6NE6E2_GPElhDeg_1776269327 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 45D90180034D; Wed, 15 Apr 2026 16:08:47 +0000 (UTC) Received: from fedora (unknown [10.44.48.62]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id DA6461800446; Wed, 15 Apr 2026 16:08:43 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Wed, 15 Apr 2026 18:08:46 +0200 (CEST) Date: Wed, 15 Apr 2026 18:08:42 +0200 From: Oleg Nesterov To: Kees Cook Cc: Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Will Drewry , Kusaram Devineni , Max Ver , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 2/2] seccomp: defer syscall_rollback() to get_signal() Message-ID: References: <202604141026.4BEA64A4@keescook> <202604150848.0DA98133@keescook> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202604150848.0DA98133@keescook> X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 On 04/15, Kees Cook wrote: > > On Tue, Apr 14, 2026 at 07:41:39PM +0200, Oleg Nesterov wrote: > > Yes sure. but do you agree with this RFC approach? > > I like it so far; I'm going to run the rr regression tests to > double-check. Thanks! But see my reply to 0/2 ... I'll write another email later. And I just noticed that I forgot to check info->si_signo == SIGSYS in check_force_sig_seccomp(). So if you are going to run the test, please apply the fix below... Oleg. diff --git a/kernel/signal.c b/kernel/signal.c index b93e37517d6d..49d73e4991b2 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -2809,7 +2816,7 @@ static inline void check_force_sig_seccomp(kernel_siginfo_t *info) * seccomp siginfo is already lost anyway. */ if (IS_ENABLED(CONFIG_SECCOMP_FILTER)) { - if (info->si_code == SYS_SECCOMP) + if (info->si_signo == SIGSYS && info->si_code == SYS_SECCOMP) syscall_rollback(current, current_pt_regs()); } }