Landlock support for UML
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest6 patches 1 replyIn review
- v15 patches 10 repliesSuperseded
Changes in v2 from the cover letter
https://lore.kernel.org/r/[email protected]
- Remove Cc stable@ (suggested by Richard).
- Add Acked-by: Richard Weinberger to the first patch.
- Split the test patch into two patches: one for the common pseudo-filesystems, and another patch dedicated to hostfs.
- Remove CONFIG_SECURITY_PATH because it is useless for merge_config.sh
- Move CONFIG_HOSTFS to a new config.um file.
- Fix commit message spelling and test warnings.
- Improve prepare_layout_opt() with remove_path() call to avoid cascading errors when some tested filesystems are not supported.
- Remove cgroup-v1 tests because this filesystem cannot really be mounted several times.
- Add test coverage with and without kernel debug code, according to GCC 12 and GCC 13.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | hostfs: Fix ephemeral inodesarch/ arch/ fs/ +3 more | +109 | 0 replies | |
| 2/6 | selftests/landlock: Don't create useless file layoutstools/ | +20 | 0 replies | |
| 3/6 | selftests/landlock: Add supports_filesystem() helpertools/ | +23 | 0 replies | |
| 4/6 | selftests/landlock: Make mounts configurabletools/ | +40 | 0 replies | |
| 5/6 | selftests/landlock: Add tests for pseudo filesystemstools/ tools/ | +259 | 0 replies | |
| 6/6 | selftests/landlock: Add hostfs teststools/ tools/ | +28 | 0 replies |
Reviews trailers per patch
1 of 6 patches has a Reviewed-by or Acked-by.
| Patch | Richard Weinberger |
|---|---|
| 1/6 | A-b |
| 2/6 | |
| 3/6 | |
| 4/6 | |
| 5/6 | |
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/6] Landlock support for UML
Hi,
Commit cb2c7d1a1776 ("landlock: Support filesystem access-control") introduced a new ARCH_EPHEMERAL_INODES configuration, only enabled for User-Mode Linux. The reason was that UML's hostfs managed inodes in an ephemeral way: from the kernel point of view, the same inode struct could be created several times while being used by user space because the kernel didn't hold references to inodes. Because Landlock (and probably other subsystems) ties properties (i.e. access rights) to inode objects, it wasn't possible to create rules that match inodes and then allow specific accesses.
This patch series fixes the way UML manages inodes according to the underlying filesystem. They are now properly handles as for other filesystems, which enables to support Landlock (and probably other features).
Changes since v1:
https://lore.kernel.org/r/[email protected]
- Remove Cc stable@ (suggested by Richard).
- Add Acked-by: Richard Weinberger to the first patch.
- Split the test patch into two patches: one for the common pseudo-filesystems, and another patch dedicated to hostfs.
- Remove CONFIG_SECURITY_PATH because it is useless for merge_config.sh
- Move CONFIG_HOSTFS to a new config.um file.
- Fix commit message spelling and test warnings.
- Improve prepare_layout_opt() with remove_path() call to avoid cascading errors when some tested filesystems are not supported.
- Remove cgroup-v1 tests because this filesystem cannot really be mounted several times.
- Add test coverage with and without kernel debug code, according to GCC 12 and GCC 13.
Regards,
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
base-commit: 858fd168a95c5b9669aac8db6c14a9aeab446375
Signature · 1 line
2.41.0