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

The fsopen() 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 | 3 +++
 src/linux/mount.c   | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/include/sys/mount.h b/include/sys/mount.h
index ec7027a3c967..4bda07c09462 100644
--- a/include/sys/mount.h
+++ b/include/sys/mount.h
@@ -76,12 +76,15 @@ extern "C" {
 #define MOVE_MOUNT_SET_GROUP    0x00000100
 #define MOVE_MOUNT_BENEATH      0x00000200
 
+#define FSOPEN_CLOEXEC          0x00000001
+
 int mount(const char *, const char *, const char *, unsigned long, const void *);
 int umount(const char *);
 int umount2(const char *, int);
 
 int open_tree(int, const char *, unsigned int);
 int move_mount(int, const char *, int, const char *, unsigned int);
+int fsopen(const char *, unsigned int);
 
 #ifdef __cplusplus
 }
diff --git a/src/linux/mount.c b/src/linux/mount.c
index b91d9e8c8d22..ed7f962a019f 100644
--- a/src/linux/mount.c
+++ b/src/linux/mount.c
@@ -25,3 +25,8 @@ int move_mount(int from_dirfd, const char *from_path, int to_dirfd, const char *
 {
 	return syscall(SYS_move_mount, from_dirfd, from_path, to_dirfd, to_path, flags);
 }
+
+int fsopen(const char *fsname, unsigned int flags)
+{
+	return syscall(SYS_fsopen, fsname, 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.