Re: [RFC] proposed libc interface and man page for listmount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 5, 2023 at 11:28 AM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
> Attaching the proposed man page for listing mounts (based on the new
> listmount() syscall).
>
> The raw interface is:
>
>        syscall(__NR_listmount, const struct mnt_id_req __user *, req,
>                   u64 __user *, buf, size_t, bufsize, unsigned int, flags);
>
> The proposed libc API is.
>
>        struct listmount *listmount_start(uint64_t mnt_id, unsigned int flags);
>        uint64_t listmount_next(struct listmount *lm);
>        void listmount_end(struct listmount *lm);
>
> I'm on the opinion that no wrapper is needed for the raw syscall, just
> like there isn't one for getdents(2).
>
> Comments?

One use case I've been thinking of involves inspecting the mount list
between syscall(__NR_clone3) and _exit(), so it has to be async-signal-
safe. It would be nice if there were a libc wrapper that accepted a user-
provided buffer and was async-signal-safe, so that I wouldn't have to add
yet another syscall wrapper and redefine the kernel types just for this
use case. (I can't trust the libc not to make its own funny versions of the
types' layouts for its own ends.)

Thank you,
Matthew House




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux