From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EDC45606A329 for ; Mon, 30 Nov 2026 06:49:46 +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=C8QbQvXg Received: by kanga.kvack.org (Postfix) id 20D286B05B2; Mon, 30 Nov 2026 01:49:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1BDE56B05B3; Mon, 30 Nov 2026 01:49:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0ACB16B05B4; Mon, 30 Nov 2026 01:49:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E32626B05B2 for ; Mon, 30 Nov 2026 01:49:45 -0500 (EST) Received: from smtpin22.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 4AA6AC099A for ; Mon, 30 Nov 2026 06:49:45 +0000 (UTC) X-FDA: 85490859930.22.9DA13E4 Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by imf19.hostedemail.com (Postfix) with ESMTP id 97B6F1A000D for ; Mon, 30 Nov 2026 06:49:43 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=C8QbQvXg; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf19.hostedemail.com: domain of jarkko@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=jarkko@kernel.org ARC-Seal: i=1; a=rsa-sha256; d=hostedemail.com; s=arc-20220608; cv=none; t=1796021383; b=6SXqfIr3horccmZWuxDd3K1vYQXsDHD3N+ZdeAQ37KkrM9Fd+gfm3CLwqVeecxvK+jEg/B 1L7sKRooP2I9NRxhTUglYxt0+P3b8jJJVcSHFt8kzygTFS2fKP35whOkhQV5uy4FlXMvIM P3tUM7OOkQOuFji/E5y8uNyciTwU1iM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1796021383; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=me6cUwZMahzLVUZtAVBh+ekQk73FxSCx517SFoyRBAw=; b=hJ2wxFyxAHbCCFRPdrWEVZve2JgIEWOoKq+WI5KRKqtv9umZZwaVGygxotbwD+KNfem/zf tfoWMJKCiEJgFlbNA5sSEq7M4HA0uFVnLSZvVb7K8YzGFM12u87/PeNSh1EoSGYPzd2DrG CwMIgTed7yMuCHdjVapDUhvX+0ARmxw= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=C8QbQvXg; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf19.hostedemail.com: domain of jarkko@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=jarkko@kernel.org Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with UTF8SMTP id 72F3D42A36; Mon, 30 Nov 2026 06:49:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with UTF8SMTPSA id 2F53B1F00897; Mon, 30 Nov 2026 06:49:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796021381; bh=me6cUwZMahzLVUZtAVBh+ekQk73FxSCx517SFoyRBAw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=C8QbQvXggG+3nAhSgt9Bx3SGoY9HbAbrccaURiZ3zj6rrLUUhBl7T4X7z7/sjgnpq Ql6u7F7To46IH3U7rsyC9jH2cLFcoVvbMSnEnYdoKj1x3fXaPIpGSMxQR9RcF3G3Om ruyw3bjo6ZReA/h1pKFdUW7lfaPkBp28oQorEsp8rnV2TFGwEZmf2NKnVkl2r2yhIC k8Ttf3hmaXm1YCs5u/jYFA3Pg32bJuZUEwigowP4Z+0Vesz0oLW1f5JZRTyoaWXXHD 15YLig/yCPTzIs0rIwEXWrN/k/4fITQUnVAgPmYEIOhsLp9NhimFx8y9Fe/bHwuBm2 3Sm9qkGVi18qw== Date: Mon, 30 Nov 2026 08:49:38 +0200 From: Jarkko Sakkinen To: fsdevel@vger.kernel.org Cc: bpf@vger.kernel.org, containers@lists.linux.dev, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, Aleksa Sarai , Alexander Mikhalitsyn , Alexander Viro , Andy Lutomirski , Arnd Bergmann , Christian Brauner , David Howells , Eric Biggers , Georgia Garcia , Giuseppe Scrivano , Hugh Dickins , James Morris , Jan Kara , Jeff Layton , John Johansen , Jonathan Corbet , Josef Bacik , Kees Cook , KP Singh , Lennart Poettering , Matt Bobrowski , =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , Neal Gompa , Oleg Nesterov , Paul Moore , Pavel Tikhomirov , Serge Hallyn , Shuah Khan , Stephen Smalley , Zygmunt Krynicki Subject: Re: [RFC PATCH v8 28/29] selftests/userland: Add userland test suite Message-ID: References: <20261128235808.2369970-1-jarkko@kernel.org> <20261128235808.2369970-29-jarkko@kernel.org> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 97B6F1A000D X-Rspam-User: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Stat-Signature: 3gdkafnc4aruy74tdmwbu5oa47r1zwky X-HE-Tag: 1796021383-41370 X-HE-Meta: U2FsdGVkX1+bueevYGivayCiXRuoN0hwwgdan8Hy6z3I/UwnWYTPMzLoX6H1Anhy8Pe8EEPR0U7baXUWOoHKNsJ3vDbbshLoeIzvikpcYVdXmzj5PttEUg45E9bKU1AvJJHoBK14IYcm3PgzcJPoHxitdpbWhpmUdK8PmH5dY2ZtYG23LzEtTwNpIIA+NTCnRtLupuk/Ig0R8l3DzcHpBnCQoo7m4ysUp0Ca6W2xLv3uqV6C33Q5A3gWFGKSAu6mMBv3/gmlDv1VBFdRAkB5XLGHtcYz6eQxZQvDcN/gktrEoWUvYlpn2gNttm40Jm57acojboCta/zWcJXP3YKGNLqZtChxbDzXtc6EE6gIjclws+2nPj77FkZL8hNCZxLGxIl0zgM/e4fdWmaRdlMQCOS1BNqbr14POc7FL7yrJ7oF9ak6vKUcUOXOn71QUWm7YDPYRuu9TVvvyCMPEd6si4iSDR1jsEbeOiSh/kQMuvMJy6iK8kJlD1pDCi6cjAw0iYKGoMI4wFwEeweugv2MJpBfg0r2u2/qxCYKylgQZwcGMc62ol5OeboYhHrXtwgraxy3TKQyG21cl6/G105nQvBRdNackR7meBmj/w4pMo9kTPKRMiZKMxbbhWZ83xtXnDiWLyVwlCdX5+L+3UCf7bJ0ExNJ3Jq1z+HQF5Q+nNn/Ot1yFctyb1JrYGY4aSceIIcGBody1xx3c9RxDVdHTt8K2HOPsrmWQYb323zuqygGdtMmK3ljiCFdwwbx2Qhtnxymvb2bX6qhDBEMtIIDQTD/IWl8xR6pD2T8kkSLwJkqqfuFMxLHvEEJa4q+8/aIgLb5jMq699ve6EtXVoIcW3/HHOyG1lUF20veT1zZGvEREgnFXl22K1K4UPzuOk2hKO0HWN6V14dLswUt2EEbdOhWmYrbimgbB887u2ovMDwHMGapKF1WJFDkKf6ud8ftVS1lRE77/NkCZJoep8u 1lmH7w3a cx7WV/hoSNJaYreZAzdG7R8U6xWO2bLw8WtbG+hnYOjpDLP1zqDknsRRNCZW8+/TCsUXDFla/Z4X64Lty31P65k0KfEmQhx762eLwE4/iWq6jJcovF8yiIw/wkBl0sY4AmOVNW448/TBX/fjrGfku8gUGRkkcBPd3orv+8VX8pC7HfoXU1aNxESC1FPESxI5EF4/zHpUv7cOnShcntESU1wig1iL6W7nVGm6KKTJPWAOXgVirne2L0FEmIO2USbSh/Nb0Etd8+u5S21hbUJij/7VOgKqoBEJDFDb8bELsCB+glmwtvY3UEmzAUMD+k8D6F8J32h1sYRpZztPFXCT+FPdokmKVuf+6GG8yFZLrVVGureeA1AawLOckKl2u9nYk7WdKJjkSwja6xwlXsxiWahjNXxXyQjAEUqLWP9ntF8M9511LUTlsNMAeiyCyXm6Ho/+UoZVjhHfGnosfTBMHW8aa+VxtawjhOgkKlAo2Q/bFvAt9C+bC4NfcZC1uTPa3foG9BnA5mxcQHog8j2Lb8Tf3h27DR+pY8kjXDfwsvOb7sDQ83DBPqPbNcw== Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Mon, Nov 30, 2026 at 04:39:42AM +0200, Jarkko Sakkinen wrote: > On Mon, Nov 30, 2026 at 03:34:23AM +0200, Jarkko Sakkinen wrote: > > On Sun, Nov 29, 2026 at 01:58:07AM +0200, Jarkko Sakkinen wrote: > > > Verify the userland_open() control object, namespace sharing, > > > mount-namespace configuration, waitid(P_USERLAND), pidfd_send_signal(), > > > and userns_set_idmap() uAPI and security invariants across privileged, > > > unprivileged, SCM_RIGHTS delegation, and edge-case scenarios. > > > > > > Signed-off-by: Jarkko Sakkinen > > > > > > At https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd-test.git/: > > > > $ make > > make help Show this help > > make list List available defconfigs > > make download Prime the download cache > > make sdk Build and cache SDK toolchains > > make configure Force configuration > > make savedefconfig Save minimal defconfig > > make linux-update-defconfig Save minimal kernel defconfig > > make build Incrementally build (FORCE=1 to run again) > > make userland Build with userland trees (FORCE=1 to run again) > > make ssh Open an SSH session to > > make burn Write existing image to DEVICE (does not build) > > make clean Remove build artifacts > > make clean-sdk Remove cached SDK toolchains > > make lint Run linters > > > > "userland" target builds a a hybrid ISO containing a bootc/composefs > > based OS build, and having Userland-patched Linux, SystemD, Bubblewrap > > and Podman. My kernel testing suite has developed into a Silverblue'ish > > environment because I needed something like that for testing lockdown > > hibernate patches. > > > > Here's virsh hosted "tpmdd_amd64.iso" built with "make userland > > BOARD=tpmdd_amd64" running the kselftest: > > > > TAP version 13 > > 1..1 > > kselftest: Running tests in userland > > # timeout set to 45 > > # selftests: userland: test_smoke.sh > > # TAP version 13 > > # 1..17 > > # ok 1 UserlandUapiTest.test_cell_broadcast_kill > > # ok 2 UserlandUapiTest.test_cell_lifecycle_exec_and_hot_mount > > # ok 3 UserlandUapiTest.test_clone_flags_and_pidns_ancestry > > # ok 3 UserlandUapiTest.test_clone_flags_and_pidns_ancestry > > # ok 3 UserlandUapiTest.test_clone_flags_and_pidns_ancestry > > # ok 3 UserlandUapiTest.test_clone_flags_and_pidns_ancestry > > # ok 3 UserlandUapiTest.test_clone_flags_and_pidns_ancestry > > # ok 4 UserlandUapiTest.test_concurrent_bootstrap > > # ok 5 UserlandUapiTest.test_create_flags > > # ok 6 UserlandUapiTest.test_get_nsfd > > # # UserlandUapiTest.test_landlock_namespace_use: Landlock not enabled > > # ok 7 UserlandUapiTest.test_landlock_namespace_use # SKIP > > # ok 8 UserlandUapiTest.test_mount_and_fsconfig_validation > > # ok 9 UserlandUapiTest.test_pivot_root_and_standalone_mntns_hot_mount > > # ok 10 UserlandUapiTest.test_proc_submount_and_nested_namespaces > > # ok 11 UserlandUapiTest.test_send_signal_and_kill_on_close > > # ok 12 UserlandUapiTest.test_setns_owner_vs_foreign > > # ok 13 UserlandUapiTest.test_share_nsfd > > # ok 14 UserlandUapiTest.test_unprivileged_without_entering_userns > > # ok 15 UserlandUapiTest.test_userns_set_idmap > > # ok 16 UserlandUapiTest.test_userns_set_idmap_delegation > > # ok 17 UserlandUapiTest.test_wait_poll_and_clone_dead > > # # 1 skipped test(s) detected. Consider enabling relevant config options to improve coverage. > > # # Totals: pass:16 fail:0 xfail:0 xpass:0 skip:1 error:0 > > ok 1 selftests: userland: test_smoke.sh > > # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0 > > > > Yes, I should "CONFIG_LANDLOCK=y". It's the next thing on the list. > > > > Generally I plan to make it model based stochastic test with seed > > printed at start so that failures can be replayed. > > > > I've used model based testing lately very successfully in my Landstrip > > stateless parametric agent sandbox (compatible with Anthtropic's policy > > format): https://github.com/landstrip/landstrip > > > > It feels like right way to go so that the syscall interface can be > > actually stressed. > > It's also "crypto-ready" architecture. I.e. given that entities are > inspired by confidential computing workloads, there's a clean staging > phase, and that provides integration points for having cryptograhic > measurement, if that is ever wanted. Obviously, that would be still > non-trivial problem but architecture is doing best effort on helping > to resolve it. This could be useful actually in lockdown-hibernate. It could have more zeroing host OS state mode as long as boostrap can decrypt the container after powering up back from S4. Unconsidered idea, and partly off-topic but had to write this down as lockdown-hibernate is active review process. I.e., possibly in addition to PCR 5 trampoline, it should have "container mode". Br, Jarkko