From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795901461; b=GADXtlPnl+x22vxYOw8FL0IK2JXMg2kXqzXaPo+Z5Yo4BCfGAXAgaoiefTFybtXi/sjz GWbZJK3XO8nKBStwogvDqvUIITwPH54N01EshA3IT5JKcy1q8F6br+MN+EoDirlgRcvz/ 3Ckf/qDgjGAVyVP8Fj3sgU/fRYoB2fV4XtW63vyMcvoK1ydj4qOgl76WDNkxjAcjR6Wfz wUitL57GtZ41jZzK0nfXrGe8tp29uK0HAIA8drUnRdcavEccyBrlrBPPLr6NgKNDRh29p 8nqwuliVPM5r1hhrFKIH/p508TWztE85BMZTBDUy1QyRGrecCG/iAt5EIKKAye409kQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795901461; h=Received:DKIM-Signature:Received:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Endpoint-Received:X-Original-From:Reply-To; bh=nVaj7s9JBAu4UAaOolXoZkPvlbQw4leiCQIzllNm+No=; b=uhlCzH5QAbVFaGIfXZDWkE6ldwc/vhYWJ7Iy7zIaClacV9UsgDihDEleGGQcD+2a5Fr6 ObPxvn4mS7uZgShtpuxsF4qnStOnyhhzyDYwXuTOxFapFpHVmKbsnebvUN2ilMNUO7pXJ X+7VybiVaWpDg9Xj29r69UboIAnRNTQyuaq6FMgVIKeBsR3D6R6fB/3P2mVn5vqur5OgP LC23qoVanSUhKVZGAjUzaju4FApoN1cj8n1pij40nZpnqXflPihPK1bQKMl67g6q2ynPI qoVO8Br2MYbv55y56QR3TExG7R5qRQuTf5F1oQS3SiPYQ2iTltrqV5alHFHRIU86KNA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OEprHi2D; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 347E3606A321; Sat, 28 Nov 2026 21:31:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OEprHi2D Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795901460; b=GwuLIHDN+/qRgXeaCcWk7nU6ouFSSiRdmZZfyBCRWuokeyqfguzqKDpUf/HJ4TEUC39/ runFYgQkxcApC0/nIwyLNBnyefWsXHySJZRv0QQ1hw4U5dTMm5k5rcv+KGFjMyvXO6vsz AKMAciIASlYE3Onp2NMWaBMd3cjAaNEzb835JfmDuXnG7LOrMRA05OhHkmg21xxIiPyub AQKY5zAPSIHa7HA7vDa3WQSijFgr/ow0QAvNG6IHXP5+E2aosRtYfxDx7LkuM8cWCwllC 6rr5eKTjoD8jFkJbXGTlu+l9AP1/ofbZb8MM/eeGv500oLDDhAQZ+fmCCQfGODDdsfQ== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795901460; h=DKIM-Signature:Received:From:Subject:Date:Message-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To: Cc:X-Mailer:X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To; bh=nVaj7s9JBAu4UAaOolXoZkPvlbQw4leiCQIzllNm+No=; b=k21UC5JH7CsQch5jc+N0/vc2y6bEciq4ocswHZE2OjM0ICGEFJvscFfyEaiTemhzO1zc MbSho7OqDUUj7sLZBnkZYxiXUrYJaz9vj0wcOnPCWYqGb5fF/l9ZQy71u6onB/iSv1ZnA OdURxY//LCkzStqCyazGe39CR5cBfEoPphg8bjS4rBf0o0GGUtsza1ePmQMz4P+dIadWq UT3NQ7NixW9JoeSq0BHsBoEXf1VNYLQ5yy1796mGxDNU2jmV5Tx/9gGQc70jU07Z+6nWB pI+AatxDqJcVPF188o1AAe5VvEoWvSEU3x05N9B69hZO2Zfc+AK1dEgxU0r8xMXP1jg== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id ECBDA1F00898; Sat, 28 Nov 2026 21:30:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795901460; bh=nVaj7s9JBAu4UAaOolXoZkPvlbQw4leiCQIzllNm+No=; h=From:Subject:Date:To:Cc:Reply-To; b=OEprHi2DYQxTiI5PFTiyPgyVfcSJkrafoNi2poc2GkJPbbygP6g7Unkq/dU6ixXEv tXvikMb6cqPlW8ve1ZONsMssEpewgANp0dFg0kFG44dp9Y+LGnrSFlvf/+WOkuWMeB tNsMswXOTY/kxGe3G0FojxR/+47h45ac2xp0xfVC5Wp+HOXClixmKbWmHnkOQkCtxE f+HyvGYKm78znEv5nz7oh4czZUjw0dfAarCWWrgQbnI/p0oAs3tbhdjHigfJzzsfGQ uM9dTvB9l2+2yOmCRx/n7xMVglO7aBEg64KCHYYPRoEgk/a1sUKKwXT8ue7wAgkNYY HQx8wnW0UI5wA== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 4E8C34E261; Sat, 28 Nov 2026 21:30:59 +0000 (UTC) From: Christopher Lusk via B4 Relay Subject: [PATCH 0/2] landlock: Document and test TSYNC on sibling threads Date: Sat, 28 Nov 2026 16:30:54 -0500 Message-Id: <20261128-b4-tsync-v1-0-31f0c0cef500@northecho.dev> X-Mailing-List: linux-security-module@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAA/x3MTQqAIBAG0KsM3zohRTK9SrToZ6rZWGhEId096 B3gFWROwhmBChJfkmWPCKQrwrQNcWUlMwLB1KbR2rRqtOrMT5yUn4331jqr2aEiHIkXuf+q69/ 3A0rwAJhaAAAA X-Change-ID: 20261128-b4-tsync-9d29944741e7 To: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= Cc: =?utf-8?q?G=C3=BCnther_Noack?= , Jonathan Corbet , Shuah Khan , Randy Dunlap , linux-security-module@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Christopher Lusk X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795901459; l=1318; i=clusk@northecho.dev; s=20261128; h=from:subject:message-id; bh=SkKPMTzEiBGsxyZSyac6IkchkBHVxpNYWbS3vSjiqHQ=; b=E96v5IA+9SndHQVn92upNhjYHuu4AEcuk3lGpIMM2CNOSATnKKUjj6l5HcgaxvjKEaQ2fVMfN Jgd+5ZtjenIAAcoaZjr7j3elbt7gOhfSSpBavpjI5QKtxrO64608ANI X-Developer-Key: i=clusk@northecho.dev; a=ed25519; pk=ZM3GLuxrIQN40dt+s1cLwHjpuFeiMfiEYnQ/qyYhVGo= X-Endpoint-Received: by B4 Relay for clusk@northecho.dev/20261128 with auth_id=1681 X-Original-From: Christopher Lusk Reply-To: clusk@northecho.dev The inheritance section of the userspace API guide still says that a thread's rules are not applied to its sibling threads. Patch 1 mentions LANDLOCK_RESTRICT_SELF_TSYNC there, and that a process forked or a program executed by a sibling before it is restricted is not affected. Patch 2 checks that the siblings are actually restricted, including one that switched UID with the raw setresuid(2). The existing tests only check the return value and no_new_privs. Based on the Landlock next branch. tsync_test passes 14/14 there and on v7.4-rc4; without TSYNC, both new variants fail. I did not build the HTML documentation. Found and drafted with LLM assistance, in QEMU experiments; I reviewed, tested and edited the patches. Signed-off-by: Christopher Lusk --- Christopher Lusk (2): landlock: Document TSYNC in the inheritance section selftests/landlock: Check that TSYNC restricts sibling threads Documentation/userspace-api/landlock.rst | 4 +- tools/testing/selftests/landlock/tsync_test.c | 129 ++++++++++++++++++++++++++ 2 files changed, 132 insertions(+), 1 deletion(-) --- base-commit: bb872036147b78498276986ac54634fbc609efa3 change-id: 20261128-b4-tsync-9d29944741e7 Best regards, -- Christopher Lusk