compel: introduce statmount

We will be using statmount to add support for files on "unmounted"
mounts. "unmounted" mounts refer to a mount that has been unmounted
using umount2(mnt, MNT_DETACH) but we still have access to files on that
mount.

Signed-off-by: Bhavik Sachdev <b.sachdev1904@gmail.com>
This commit is contained in:
Bhavik Sachdev 2025-06-10 21:41:09 +05:30
parent a5d3a58356
commit f71837d5dc
9 changed files with 10 additions and 0 deletions

View file

@ -124,3 +124,4 @@ openat2 437 437 (int dirfd, char *pathname, struct open_how *how, size_t size
pidfd_getfd 438 438 (int pidfd, int targetfd, unsigned int flags)
rseq 293 398 (void *rseq, uint32_t rseq_len, int flags, uint32_t sig)
membarrier 283 389 (int cmd, unsigned int flags, int cpu_id)
statmount 457 457 (struct mnt_id_req *req, struct statmount *smbuf, size_t bufsize, unsigned long flags)

View file

@ -113,6 +113,7 @@ __NR_pidfd_open 434 sys_pidfd_open (pid_t pid, unsigned int flags)
__NR_clone3 435 sys_clone3 (struct clone_args *uargs, size_t size)
__NR_openat2 437 sys_openat2 (int dirfd, char *pathname, struct open_how *how, size_t size)
__NR_pidfd_getfd 438 sys_pidfd_getfd (int pidfd, int targetfd, unsigned int flags)
__NR_statmount 457 sys_statmount (struct mnt_id_req *req, struct statmount *smbuf, size_t bufsize, unsigned long flags)
#__NR_dup2 ! sys_dup2 (int oldfd, int newfd)
#__NR_rmdir ! sys_rmdir (const char *name)
#__NR_unlink ! sys_unlink (char *pathname)

View file

@ -121,3 +121,4 @@ __NR_openat2 5437 sys_openat2 (int dirfd, char *pathname, struct open_how *h
__NR_pidfd_getfd 5438 sys_pidfd_getfd (int pidfd, int targetfd, unsigned int flags)
__NR_rseq 5327 sys_rseq (void *rseq, uint32_t rseq_len, int flags, uint32_t sig)
__NR_membarrier 5318 sys_membarrier (int cmd, unsigned int flags, int cpu_id)
__NR_statmount 5457 sys_statmount (struct mnt_id_req *req, struct statmount *smbuf, size_t bufsize, unsigned long flags)

View file

@ -120,3 +120,4 @@ __NR_openat2 437 sys_openat2 (int dirfd, char *pathname, struct open_how *how
__NR_pidfd_getfd 438 sys_pidfd_getfd (int pidfd, int targetfd, unsigned int flags)
__NR_rseq 387 sys_rseq (void *rseq, uint32_t rseq_len, int flags, uint32_t sig)
__NR_membarrier 365 sys_membarrier (int cmd, unsigned int flags, int cpu_id)
__NR_statmount 457 sys_statmount (struct mnt_id_req *req, struct statmount *smbuf, size_t bufsize, unsigned long flags)

View file

@ -123,3 +123,4 @@ move_mount 429 429 (int from_dfd, const char *from_pathname, int to_d
open_tree 428 428 (int dirfd, const char *pathname, unsigned int flags)
openat2 437 437 (int dirfd, char *pathname, struct open_how *how, size_t size)
membarrier 283 283 (int cmd, unsigned int flags, int cpu_id)
statmount 457 457 (struct mnt_id_req *req, struct statmount *smbuf, size_t bufsize, unsigned long flags)

View file

@ -120,3 +120,4 @@ __NR_openat2 437 sys_openat2 (int dirfd, char *pathname, struct open_how *how
__NR_pidfd_getfd 438 sys_pidfd_getfd (int pidfd, int targetfd, unsigned int flags)
__NR_rseq 383 sys_rseq (void *rseq, uint32_t rseq_len, int flags, uint32_t sig)
__NR_membarrier 356 sys_membarrier (int cmd, unsigned int flags, int cpu_id)
__NR_statmount 457 sys_statmount (struct mnt_id_req *req, struct statmount *smbuf, size_t bufsize, unsigned long flags)

View file

@ -108,3 +108,4 @@ __NR_openat2 437 sys_openat2 (int dirfd, char *pathname, struct open_how *how
__NR_pidfd_getfd 438 sys_pidfd_getfd (int pidfd, int targetfd, unsigned int flags)
__NR_rseq 386 sys_rseq (void *rseq, uint32_t rseq_len, int flags, uint32_t sig)
__NR_membarrier 375 sys_membarrier (int cmd, unsigned int flags, int cpu_id)
__NR_statmount 457 sys_statmount (struct mnt_id_req *req, struct statmount *smbuf, size_t bufsize, unsigned long flags)

View file

@ -120,3 +120,4 @@ __NR_pidfd_getfd 438 sys_pidfd_getfd (int pidfd, int targetfd, unsigned int f
__NR_rseq 334 sys_rseq (void *rseq, uint32_t rseq_len, int flags, uint32_t sig)
__NR_membarrier 324 sys_membarrier (int cmd, unsigned int flags, int cpu_id)
__NR_map_shadow_stack 453 sys_map_shadow_stack (unsigned long addr, unsigned long size, unsigned int flags)
__NR_statmount 457 sys_statmount (struct mnt_id_req *req, struct statmount *smbuf, size_t bufsize, unsigned long flags)

View file

@ -41,6 +41,8 @@ struct iocb;
struct pollfd;
struct clone_args;
struct open_how;
struct mnt_id_req;
struct statmount;
typedef unsigned long aio_context_t;