]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/overlayfs: verify device and inode numbers in /proc/pid/maps
authorAndrei Vagin <avagin@google.com>
Thu, 14 Dec 2023 06:44:39 +0000 (22:44 -0800)
committerChristian Brauner <brauner@kernel.org>
Thu, 21 Dec 2023 12:17:54 +0000 (13:17 +0100)
commitb5a78c7127f2007cfc7ad322b6ce0aa4bf347138
tree4a9b00320febf3916dab075595411d5fe35c15f6
parent3efdc78fdc21ab82694707eb234ab93f28d13ba8
selftests/overlayfs: verify device and inode numbers in /proc/pid/maps

When mapping a file on overlayfs, the file stored in ->vm_file is a
backing file whose f_inode is on the underlying filesystem. We need to
verify that /proc/pid/maps contains numbers of the overlayfs file, but
not its backing file.

Cc: Amir Goldstein <amir73il@gmail.com>
Cc: Alexander Mikhalitsyn <alexander@mihalicyn.com>
Signed-off-by: Andrei Vagin <avagin@google.com>
Link: https://lore.kernel.org/r/20231214064439.1023011-2-avagin@google.com
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
tools/testing/selftests/Makefile
tools/testing/selftests/filesystems/overlayfs/.gitignore [new file with mode: 0644]
tools/testing/selftests/filesystems/overlayfs/Makefile [new file with mode: 0644]
tools/testing/selftests/filesystems/overlayfs/dev_in_maps.c [new file with mode: 0644]
tools/testing/selftests/filesystems/overlayfs/log.h [new file with mode: 0644]