From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.178 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796199236; b=S+5pLQJGFXoU/Wb+626b/l9Ki7qLN72qO/Ga9lRhfoQWMAENaj+WVXQwxTWWE9oJSQFM J8xkNM401cZc+HS6ctOS2djrpcrXM698ouGk2aiaQHFIVSs30BG9iJEESZULm7UqEALMI pNeLN/3XdxQ5EcL0UGoYPmviIbKhnXqoO3SaxCISBhUaGRd8K+Hz6dMDdnXWW/ChFHSHJ YQdv2itPQN4L5jdC1hvoXgItmJfRStgG40PrCJK5TiNzTzyACAuQwuY7aYNW6hT12BauV zMwno/AO0iLr/P4hbb7q1soE0eoAwiWZDCrU0Qt2hRicxrdU5j2HKTBdCxgrbY3oaRA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796199236; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=/bUXWF/Eq9CiLDv4ZoWik36VIHsWYJNVsaEA5xG2PmI=; b=S75M3rmuSAorRvMVw1VK5KjKlqL0n+Q66bro5ghGiZglw7UrHBIORietIF5bJ61LswwC y2ET8RFWyRhwb89Ysj+LL7mIRUTXI7qZzGvXa1tq4Wvlvhk4E9GRL4XVkcuylPi+R7CDc T450NZRzoqAadEEMKUsfZzfUvPSM54pgfDb/MLWM8NcvmkwLPlUQNU4XiQGVmM8k7vjCu kWAhUJJduQUjVkAMuWe143qFG50GnONkp4ahcp0ni6S7pVjTuKRCETxX1S9D63iI23FgD IidkBhlHgyT/u52P1JuFyHYVIsugD1wsK8PdSjXRj8B72K9PNt8eouQvKNrI3F2VZkw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=wfj5hH0r; arc=none smtp.remote-ip=209.85.215.178 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C89B606A325 for ; Wed, 2 Dec 2026 08:13:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5C89B606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=wfj5hH0r Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-cdadf7e248aso5825588a12.3 for ; Wed, 02 Dec 2026 00:13:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796199235; x=1796804035; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=/bUXWF/Eq9CiLDv4ZoWik36VIHsWYJNVsaEA5xG2PmI=; b=wfj5hH0rICcLV81Pu51at03kzqEzoHPBvWPpH5dJnOgLT2gB4Y91SFpdJLaTEh5L2P zwxW9wLKGb7x443rstIRupJeVlV3aEGztCOc7Y/eSkzgZCL+IAnTeXroeV2rTmcYT9gw 3Wie8qTidPnBlAdD7lWgjXYoNjc8+YkG3WW5wGRVL9cPIaR3XXWj/JmoGRPpxdsKyBvT 8HBgxjN4k7bCDRtJFNsxURP45whGyeKoCbK6oNbACVgWZ/I9V3DbUkyOO4fGZfgSQoGE qePOEBr10LM+GCAnB8bg/SPwGDRlhe1RWGgaFkYHAWSodZd4VH4s+9l6PHuO3pnSzmhK mKOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796199235; x=1796804035; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=/bUXWF/Eq9CiLDv4ZoWik36VIHsWYJNVsaEA5xG2PmI=; b=tEcLxTSMTDsHk/zYeQWiSMDb46DUSMh4CJ7WzXLHsfsZmy1Ve0efMYRh+vaPvefxmn A0y6YswjFJl1ZHZoHQoq8TcXYmUg2MFaMW8gnc8Czvzxo+9gK8ZBekK1h/eXjEqGe+qo 9D8jCiP3bbziz6m6d4qq0TMpi2khwLj8cKGmZMIs5jiFLNY0qVEZaHZTxXnNulY/9uQo ve3wV+MHGboVkmfdIrVOEiYFYDPBE5zbF3ZO4X1VaBHNYil7ZEGLKTFJGsAxZFqIPCr1 pN6pfADBnkIW/zzfMaOTm8VZtbcAfhujeCocKPGt2pXczoiBtN6KaFtN00NYz6BZflWq 4BgQ== X-Forwarded-Encrypted: i=1; AL+hErEhmcasqYSCvi/6ndOHmmTRD8o9agCp5vJckPzVQojwCP0M//LVZoAxmKim0AZHj0DaS+75i0JSpqk=@vger.kernel.org X-Gm-Message-State: APuU4Z/o+glZupKtZ7qTlorAN4MW2V9P8lH82hcNj3HklojXA7w/1y5O 2cnPRneHFDkcoMKCc7xPm2se7Qbdnqov1ANO1k67FfY13U5iLhFdkJp4 X-Gm-Gg: AZFdTZe0shdo+2OkAdSTfTG+MwjW4qJH5yYy/FgQ3Q1r9WYVmuerI8JWcGy0M/h4OhU C02e01QNCixgLEj4kP681cp4bcRKdaXSwBGnF0qXdDnwq+B9r1RbdTYB/sUDs3lHsvfT/s1XUF5 wcjmgE6Df2Qc/Non1ObY1gUC6bu6oh4CaXqC9XWciZfCh4E5pP9S0jxV++hslsTnZyxRaXLVEsY u9ixTRfltcwwyQtf8/acsAW8aUPIWxMIQIlvtpGohYme6gAxzG/ApnT1Ua0pyFBs2siUlHm6xw7 YWrkDYZMJLDbcEmVTJQI+07RDZKcet8+uX5eVit/jKJBcMK7vUbtswFedKdrDEuI8GRbuEXBerw cXJCvJ/fDLf470rtvW2Ml7KSPzDMUMODM98mKX+lgco+SursN87tV+pV1EE7MHKxrtWAC1EgJXF 3Jlvh1YQmtHmd8GYbppOX2VV7KQt4Cji9V0gGWqCMtynVBKqh5LImYHXNKLAQY7Ss+ELoZ0Bm1B EvibTmzaIPEExeJ+AmhOXRTdfrGf2yDV72lMU77OYh28RPNWnzJWivhnyCKK743T7/vSvlloReB ZIv8P/x3RnDugS6vN97ln4dIZONpqePcKHXpN4oDoJFclBccRj1/dVTR2z2pWyPOasrxSojvaox COHPQHvlY7+pbeWbenm6LcAbggwKE/fXFBBRiGuXhZ7PzwWLCMLVJ4XtylKued0bIOE2FP7Jf1V kpVR8Nr99ab6JBiUjdeVhgzxVPSTN/cyxRELs= X-Received: by 2002:a17:90b:2416:b0:3b4:c66c:ba01 with SMTP id 98e67ed59e1d1-3b4c66ce8f8mr20376204a91.50.1796199235330; Wed, 02 Dec 2026 00:13:55 -0800 (PST) Received: from localhost.localdomain (c-67-170-60-64.hsd1.wa.comcast.net. [67.170.60.64]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5210be133sm29956405a91.11.2026.12.02.00.13.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 00:13:54 -0800 (PST) From: Gabriel Changamire To: Kees Cook Cc: Andy Lutomirski , Will Drewry , Shuah Khan , Jonathan Corbet , Randy Dunlap , linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Gabriel Changamire Subject: [PATCH 0/2] seccomp: document and test Seccomp_filters in /proc/PID/status Date: Wed, 2 Dec 2026 08:13:41 +0000 Message-ID: <20261202081343.9325-1-gaberashawn@gmail.com> X-Mailer: git-send-email 2.47.3 X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Since v5.9, /proc/PID/status has reported the number of seccomp filters attached to a task in a Seccomp_filters line. The field is missing from Documentation/filesystems/proc.rst, and the seccomp selftests never read /proc/PID/status, so neither the mode nor the filter count shown there is tested. Patch 1 documents the field. Patch 2 adds selftests covering the filter count as filters are attached, its inheritance across fork(), and its propagation to sibling threads with SECCOMP_FILTER_FLAG_TSYNC. Kees, if it is convenient for you to take both through the seccomp tree, that keeps them together; otherwise patch 1 can go through the documentation tree on its own. Testing: the new tests pass on a 6.12 kernel both from a process with no seccomp filter and from inside a container whose runtime already applies one, which is why the counts are checked against a baseline. I also changed each expected value to a wrong one to confirm that every test fails as it should. proc.rst parses with no new docutils warnings. Gabriel Changamire (2): docs: proc: document Seccomp_filters in /proc/PID/status selftests/seccomp: test filter reporting in /proc/PID/status Documentation/filesystems/proc.rst | 2 + tools/testing/selftests/seccomp/seccomp_bpf.c | 178 ++++++++++++++++++ 2 files changed, 180 insertions(+) -- 2.47.3