]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs: test xattr changes for RO btrfs property v2022.09.25
authorGoldwyn Rodrigues <rgoldwyn@suse.de>
Thu, 22 Sep 2022 09:56:39 +0000 (10:56 +0100)
committerZorro Lang <zlang@kernel.org>
Fri, 23 Sep 2022 14:47:19 +0000 (22:47 +0800)
commite5555e75ba199d153f4dfb81496a891263ec9bdd
tree594700f695b0eef586bb01706efc0d26fe57c094
parent42cc53859ca1198c97a2ca88d4b6589592cfa50c
btrfs: test xattr changes for RO btrfs property

Test creation, modification and deletion of xattr for a BTRFS filesystem
which has the read-only property set to true.

Re-test the same after read-only property is set to false.

This tests the bug for "security.*" modifications which escape
xattr_permission(), because security parameters are usually let through
in xattr_permission, without checking
inode_permission()->btrfs_permission().

This resulted in being able to change a security xattr on a RO subvolume
until it got fixed by kernel commit b51111271b03 ("btrfs: check if root
is readonly while setting security xattr").

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/275 [new file with mode: 0755]
tests/btrfs/275.out [new file with mode: 0644]