]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Wrap the mount_setattr syscall 442
authorMartin Cermak <mcermak@redhat.com>
Fri, 19 Sep 2025 15:25:30 +0000 (17:25 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 19 Sep 2025 21:51:17 +0000 (23:51 +0200)
commit0aecd4fe70e1522314866c48b6de20b6ea2f08a3
treecb0f7b15f1dac5552d1cbd6ccaf860478a598191
parent3e30bd17b037f4f402a020f8674b1ae576c5cfcc
Wrap the mount_setattr syscall 442

int syscall(SYS_mount_setattr, int dirfd, const char *pathname,
           unsigned int flags, struct mount_attr *attr, size_t size);

The mount_setattr() system call changes the mount properties of a
mount or an entire mount tree.  If pathname is a relative pathname,
then it is interpreted relative to the directory referred to by the
file descriptor dirfd.  If dirfd is the special value AT_FDCWD, then
pathname is interpreted relative to the current working directory of
the calling process.  If pathname is the empty string and
AT_EMPTY_PATH is specified in flags, then the mount properties of the
mount identified by dirfd are changed

Declare a mount_setattr wrapper in priv_syswrap-linux.h and hook it
for {amd64,arm,arm64,mips64,ppc32,ppc64,riscv64,s390x,x86}-linux
using LINX_ with PRE handler in syswrap-linux.c

Part of this update also is a fix of the sys_move_mount wrapper.
Specifically there was a typo mount_moce vs. move_mount, and also
there was a problem in handling VKI_AT_FDCWD special fd value in the
check for to_fd and to_pathname.

https://bugs.kde.org/show_bug.cgi?id=509566
14 files changed:
NEWS
coregrind/m_syswrap/priv_syswrap-linux.h
coregrind/m_syswrap/syswrap-amd64-linux.c
coregrind/m_syswrap/syswrap-arm-linux.c
coregrind/m_syswrap/syswrap-arm64-linux.c
coregrind/m_syswrap/syswrap-linux.c
coregrind/m_syswrap/syswrap-mips32-linux.c
coregrind/m_syswrap/syswrap-mips64-linux.c
coregrind/m_syswrap/syswrap-ppc32-linux.c
coregrind/m_syswrap/syswrap-ppc64-linux.c
coregrind/m_syswrap/syswrap-riscv64-linux.c
coregrind/m_syswrap/syswrap-s390x-linux.c
coregrind/m_syswrap/syswrap-x86-linux.c
include/vki/vki-scnums-shared-linux.h