From nobody Tue Feb 10 12:40:13 2026 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) (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 6E07C272813 for ; Tue, 2 Dec 2025 11:52:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.188.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764676344; cv=none; b=Kwk8C4nz6msRj//qCi1EdVyKZ//A33mTKuR4oznlM1TRzDd++ZPS/vNr7IJ4FMNbkw7Qic/A7i0TWxJ/PxBvRwcNcf9l/HxPJRfTk8R7bKunWe2leOafTvfoSc9UpiCph7A8E+qdODzY06GYgnQij++BpSKjM7IFY57s8Aqdq2U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764676344; c=relaxed/simple; bh=218J8Ai33ogJQYM35mkLVEHPgWBEcnfqrZ9vAzahBCk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=oehoNNUh0rcxFVulU/3Q3gNceLkFRRBzUJRrRFsqSeM87ro/LKGwuNMZmf7Afslm88hbmosKayLGQYc9aW/IAJe6nmYpEYag5bXQ+kO0zfmrJ2JxEXErZdC6x2GagC+FMWF1NeEILFrEaM+t7WD2tJAB2mXUcGXjk6UMSSENkLg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=canonical.com; spf=pass smtp.mailfrom=canonical.com; dkim=pass (4096-bit key) header.d=canonical.com header.i=@canonical.com header.b=k5gXNB+i; arc=none smtp.client-ip=185.125.188.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=canonical.com header.i=@canonical.com header.b="k5gXNB+i" Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (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 smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id A4A19400DF for ; Tue, 2 Dec 2025 11:52:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20251003; t=1764676334; bh=aLk77fq6anWET1IsmWMe+oGxx8Dt6nc1++cRTQJu+8I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=k5gXNB+iY1tjVh27YMrHo+xSN+WP+rlWvcGugSQyaRog8YNjJZfc8qS1F5oQR0fbz di4jm6kwokdU5GzuIxts7mN5G5pupBl0Rya2Txe+mGW20z99R17wimdvdrUmHZnpFj Otv0j2eBAvSrU/QSa5J533kx6LPP0ldiyRtMCdhS4yrTd/57LcTIHIDtPgkykMh/y+ 7V60brSP8/81BOVRPba0dAuqKKZlf+VT7mt0loxEZQIEFU3D4KRRwDjijOJ3JCed0F iIlp8ecY4iy3grzFssk9IHgxTYd6uDAtc2g1BCMgaswCZMmSkHiNi9epKJFW5PUk0+ k0yhbnK0+BbHsBj9hlARLHQnUXmsF7mTCOXDxTjsdgCwW8aHbZ3y5nLHgUYRcmB7wp m65t4BFyw8j7Fm6lDVidrDa7LQfQrHDNm4lNiD960Mmx1AWD59Ll6rOmN2AcPrkqMZ cvxjQ0X+lnkY3yqT/LBg5j0Yh6kn614NrNBmio7R5h1tubGtuOLw5dGK9m2SibNRKX faDfNPtnbx8CAuiZk5EXrWobn/ohET2q/g43MzIRxs4WXYvFzytGNYLFTslnAGsr/z ee71QCdSS4584U0OVNPHrj794OrMXq1XHXEf5pIJh4cbQwUB6vkfkb3yIHdIlcrl5m ZvAVOhlLNcK7LK6htvRg9cnU= Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-640ace5f40dso5965868a12.3 for ; Tue, 02 Dec 2025 03:52:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764676333; x=1765281133; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=aLk77fq6anWET1IsmWMe+oGxx8Dt6nc1++cRTQJu+8I=; b=qnUiVB7DABUh/KgyhA6O1hkANe/dHj1yhG973O1GEBjpjafPGaRNBL9jiNNIpE0G1R 6QNpQ0WPzKgPVo4yCCVim8eTdT1ei/tlxbxtmo+W26/4ENcFMMU+3AmcCwmEPyZlq88P XjVzATI+1wli/Nh8VvnJGBDvQSr+jjDqA+VZEIyTu+L2uJEE3ziXL4l01htWFQM9NjAb sRtV2D9VcwSjCBaRs005EKkUvsoF+LBeFbglZRkJTN8QFE8u0nvqThyoOGIR1thVs0IO xnVcrudp/XVMMJVzvKkshC1zLv21z9GZ/+SQMR2z98dmRH6raRCwZ77nn2iU7bJmEWGx 5cQA== X-Forwarded-Encrypted: i=1; AJvYcCUJ5ta7SacbGpjwAnFV63Qjnu39Lud4LCWasUkCWweU5tq49fTrh25dZmfON4ldW9K9HmH2FH8rH5Yk9XU=@vger.kernel.org X-Gm-Message-State: AOJu0YzhAv4rWzwIUEF5tKqqvtwtd1QkKG5rrMC/5jKo9IYH7OAeGgFy XdbUJUjWMuWGFdDaapLc3a3EKVhQvqbt/sd6J1F6aI66dUq3giIwFPkiZP100OI6yuyp86VLtOr vYofzPfxrQuVlPtUU9kEywsyEyss5BJghy8tV5EDVjtsHCyYa00sHJEA5tyRJTeRW17B6FRzMCm SxYmlrYg== X-Gm-Gg: ASbGncvJ6FCJOXOAp1gb2XnPihyReMhZNnIx8d/G/7v100VzsV6TZ7n4a6cGX7wFhQR /KG34onIM0AXcESYb8nvhjjBuIV2VN8OJHHfGU3kkYwR3iQoFMNVft6b7J6BkMLa32w/WloQ+qo 1whvrc8W/JJUr226JThO3Aq61YjsJDzworE7gSI6QFuNvYUOr4t3B5DHJvMYvMv+OOJbd+eBcwZ C7Ty7RlNUiobNjINrgaPWe3PhgjVx9TfzeQwPetxWEeYEoKSeJP5sxppCtPGyF4xx3R+TniSJAb 5pk7Evph74H6dQraV+pY3z8mESrQ7cQHke2zX9qFHZABr06SaUG6FzYvl1pLElYLXAWi8GFCXyE Ur2M+qoki+6hEG3FIINJ8zDQfkBfsCoSIO3wX2lHatimGjWw+EyMchHGxlkIJdkTyMxu7tJlfok iypG/mYw6UDvDEsQmOP4WnFpI= X-Received: by 2002:a05:6402:13cb:b0:640:c454:e8 with SMTP id 4fb4d7f45d1cf-645eb2b7f7emr28796257a12.30.1764676333177; Tue, 02 Dec 2025 03:52:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFZ9expo3B5tPaNh1xUnvEAvjM2nvZtx4TmKzoeDj2gQnT861O1Mrm/FdJgtOAf3NtE994gSg== X-Received: by 2002:a05:6402:13cb:b0:640:c454:e8 with SMTP id 4fb4d7f45d1cf-645eb2b7f7emr28796244a12.30.1764676332812; Tue, 02 Dec 2025 03:52:12 -0800 (PST) Received: from amikhalitsyn.lan (p200300cf5702200011ee99ed0f378a51.dip0.t-ipconnect.de. [2003:cf:5702:2000:11ee:99ed:f37:8a51]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-647510519efsm15206765a12.29.2025.12.02.03.52.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Dec 2025 03:52:12 -0800 (PST) From: Alexander Mikhalitsyn To: kees@kernel.org Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Lutomirski , Will Drewry , Jonathan Corbet , Shuah Khan , Aleksa Sarai , Tycho Andersen , Andrei Vagin , Christian Brauner , =?UTF-8?q?St=C3=A9phane=20Graber?= , Tycho Andersen , Alexander Mikhalitsyn Subject: [PATCH v2 1/6] seccomp: remove unused argument from seccomp_do_user_notification Date: Tue, 2 Dec 2025 12:51:53 +0100 Message-ID: <20251202115200.110646-2-aleksandr.mikhalitsyn@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251202115200.110646-1-aleksandr.mikhalitsyn@canonical.com> References: <20251202115200.110646-1-aleksandr.mikhalitsyn@canonical.com> 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="utf-8" Content-Transfer-Encoding: quoted-printable Remove unused this_syscall argument from seccomp_do_user_notification() and add kdoc for it. Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Kees Cook Cc: Andy Lutomirski Cc: Will Drewry Cc: Jonathan Corbet Cc: Shuah Khan Cc: Aleksa Sarai Cc: Tycho Andersen Cc: Andrei Vagin Cc: Christian Brauner Cc: St=C3=A9phane Graber Reviewed-by: Tycho Andersen (AMD) Signed-off-by: Alexander Mikhalitsyn --- kernel/seccomp.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/kernel/seccomp.c b/kernel/seccomp.c index 3bbfba30a777..f944ea5a2716 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@ -1142,8 +1142,18 @@ static bool should_sleep_killable(struct seccomp_fil= ter *match, return match->wait_killable_recv && n->state >=3D SECCOMP_NOTIFY_SENT; } =20 -static int seccomp_do_user_notification(int this_syscall, - struct seccomp_filter *match, +/** + * seccomp_do_user_notification - sends seccomp notification to the usersp= ace + * listener and waits for a reply. + * @match: seccomp filter we are notifying + * @sd: seccomp data (syscall_nr, args, etc) to be passed to the userspace= listener + * + * Returns + * - -1 on success if userspace provided a reply for the syscall, + * - -1 on interrupted wait, + * - 0 on success if userspace requested to continue the syscall + */ +static int seccomp_do_user_notification(struct seccomp_filter *match, const struct seccomp_data *sd) { int err; @@ -1317,7 +1327,7 @@ static int __seccomp_filter(int this_syscall, const b= ool recheck_after_trace) return 0; =20 case SECCOMP_RET_USER_NOTIF: - if (seccomp_do_user_notification(this_syscall, match, &sd)) + if (seccomp_do_user_notification(match, &sd)) goto skip; =20 return 0; --=20 2.43.0