selftests/mount_setattr: add smoke tests for open_tree_attr(2) bug
authorAleksa Sarai <cyphar@cyphar.com>
Thu, 7 Aug 2025 17:55:06 +0000 (03:55 +1000)
committerChristian Brauner <brauner@kernel.org>
Mon, 11 Aug 2025 12:51:49 +0000 (14:51 +0200)
commit81e4b9cf365df4cde30157a85cc9f3d673946118
tree755a3ce9768cde84023478b8434d3c3d8636f0bb
parent9308366f062129d52e0ee3f7a019f7dd41db33df
selftests/mount_setattr: add smoke tests for open_tree_attr(2) bug

There appear to be no other open_tree_attr(2) tests at the moment, but
as a minimal solution just add some additional checks in the existing
MOUNT_ATTR_IDMAP tests to make sure that open_tree_attr(2) cannot be
used to bypass the tested restrictions that apply to mount_setattr(2).

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Link: https://lore.kernel.org/20250808-open_tree_attr-bugfix-idmap-v1-2-0ec7bc05646c@cyphar.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
tools/testing/selftests/mount_setattr/mount_setattr_test.c