From patchwork Mon Jun 26 08:48:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= X-Patchwork-Id: 13292518 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D538AEB64D7 for ; Mon, 26 Jun 2023 08:52:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231426AbjFZIv5 (ORCPT ); Mon, 26 Jun 2023 04:51:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230051AbjFZIvl (ORCPT ); Mon, 26 Jun 2023 04:51:41 -0400 Received: from smtp-190f.mail.infomaniak.ch (smtp-190f.mail.infomaniak.ch [IPv6:2001:1600:3:17::190f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 519CB3584 for ; Mon, 26 Jun 2023 01:49:32 -0700 (PDT) Received: from smtp-3-0001.mail.infomaniak.ch (unknown [10.4.36.108]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4QqM2M0mHtzMpqsT; Mon, 26 Jun 2023 08:48:43 +0000 (UTC) Received: from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4QqM2L1jyXzMpvVT; Mon, 26 Jun 2023 10:48:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1687769323; bh=aEhUEFjlWBzIziOJJuCpxbJR2jQcCyx7meGNZnSvhvk=; h=From:To:Cc:Subject:Date:From; b=MZ7Nlj8eZb95HPTOedrkSDfhjlo2sRy4yuyIQMydvoqcfNvedTf3b8bIzBMun4lJ1 VtzLHyotWl8rHCLzSE9oT2lbpGtyjenJjAWryvZQttYBXTRLb4HfLl836g8K0x4cVH LFdChgyxRi3Zi+H5y11/TQQRLq5/N2C+qhfgJqf8= From: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= To: Linus Torvalds Cc: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= , Anton Ivanov , =?utf-8?q?G=C3=BCnther_Noac?= =?utf-8?q?k?= , Johannes Berg , Konstantin Meskhidze , Richard Weinberger , Thomas Gleixner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-um@lists.infradead.org Subject: [GIT PULL] Landlock updates for v6.5 Date: Mon, 26 Jun 2023 10:48:30 +0200 Message-ID: <20230626084830.717289-1-mic@digikod.net> MIME-Version: 1.0 X-Infomaniak-Routing: alpha Precedence: bulk List-ID: Hi Linus, This PR adds support for Landlock to UML. In fact, this fixes the way hostfs manages inodes according to the underlying filesystem [1]. They are now properly handled as for other filesystems, which enables to support Landlock (and probably other features). This PR also extends Landlock's tests with 6 pseudo filesystems, including hostfs. This PR can lead to a trivial merge conflict with tip [2] where one of Thomas's commit adds ARCH_HAS_CPU_FINALIZE_INIT and one of mine removes ARCH_EPHEMERAL_INODES in arch/um/Kconfig. Please pull these changes for v6.5-rc1 . These commits merged cleanly with v6.4, and have been successfully tested in the latest linux-next releases for a few weeks. [1] https://lore.kernel.org/all/20230612191430.339153-1-mic@digikod.net/ [2] https://lore.kernel.org/all/b57481af-5824-72f7-d20f-cfd78fcde519@digikod.net/ Regards, Mickaël --- The following changes since commit 858fd168a95c5b9669aac8db6c14a9aeab446375: Linux 6.4-rc6 (2023-06-11 14:35:30 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git tags/landlock-6.5-rc1 for you to fetch changes up to 35ca4239929737bdc021ee923f97ebe7aff8fcc4: selftests/landlock: Add hostfs tests (2023-06-12 21:26:23 +0200) ---------------------------------------------------------------- Landlock updates for v6.5-rc1 ---------------------------------------------------------------- Mickaël Salaün (6): hostfs: Fix ephemeral inodes selftests/landlock: Don't create useless file layouts selftests/landlock: Add supports_filesystem() helper selftests/landlock: Make mounts configurable selftests/landlock: Add tests for pseudo filesystems selftests/landlock: Add hostfs tests arch/Kconfig | 7 - arch/um/Kconfig | 1 - fs/hostfs/hostfs.h | 1 + fs/hostfs/hostfs_kern.c | 213 ++++++++-------- fs/hostfs/hostfs_user.c | 1 + security/landlock/Kconfig | 2 +- tools/testing/selftests/landlock/config | 9 +- tools/testing/selftests/landlock/config.um | 1 + tools/testing/selftests/landlock/fs_test.c | 387 +++++++++++++++++++++++++++-- 9 files changed, 478 insertions(+), 144 deletions(-) create mode 100644 tools/testing/selftests/landlock/config.um