Follow @Openwall on Twitter for new release announcements and other news
[<prev] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260529171103.12343-7-luis@igalia.com>
Date: Fri, 29 May 2026 18:11:03 +0100
From: Luis Henriques <luis@...lia.com>
To: musl@...ts.openwall.com
Cc: Luis Henriques <luis@...lia.com>
Subject: [RFC PATCH 6/6] add fspick() linux syscall wrapper

The fspick() syscall is part of the "new" mount API which was merged into
the linux kernel 5.2.

Signed-off-by: Luis Henriques <luis@...lia.com>
---
 include/sys/mount.h | 6 ++++++
 src/linux/mount.c   | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/include/sys/mount.h b/include/sys/mount.h
index 06efcff4a66b..6d25d17ea7a6 100644
--- a/include/sys/mount.h
+++ b/include/sys/mount.h
@@ -104,6 +104,11 @@ enum fsconfig_command {
 #define MOUNT_ATTR_IDMAP        0x00100000
 #define MOUNT_ATTR_NOSYMFOLLOW  0x00200000
 
+#define FSPICK_CLOEXEC          0x00000001
+#define FSPICK_SYMLINK_NOFOLLOW 0x00000002
+#define FSPICK_NO_AUTOMOUNT     0x00000004
+#define FSPICK_EMPTY_PATH       0x00000008
+
 int mount(const char *, const char *, const char *, unsigned long, const void *);
 int umount(const char *);
 int umount2(const char *, int);
@@ -113,6 +118,7 @@ int move_mount(int, const char *, int, const char *, unsigned int);
 int fsopen(const char *, unsigned int);
 int fsconfig(int, unsigned int, const char *, const void *, int);
 int fsmount(int, unsigned int, unsigned int);
+int fspick(int, const char *, unsigned int);
 
 #ifdef __cplusplus
 }
diff --git a/src/linux/mount.c b/src/linux/mount.c
index 91ea4bb6be37..c77ac2f63f8f 100644
--- a/src/linux/mount.c
+++ b/src/linux/mount.c
@@ -40,3 +40,8 @@ int fsmount(int fsfd, unsigned int flags, unsigned int attr_flags)
 {
 	return syscall(SYS_fsmount, fsfd, flags, attr_flags);
 }
+
+int fspick(int dirfd, const char *path, unsigned int flags)
+{
+	return syscall(SYS_fspick, dirfd, path, flags);
+}

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.