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-5-luis@igalia.com>
Date: Fri, 29 May 2026 18:11:01 +0100
From: Luis Henriques <luis@...lia.com>
To: musl@...ts.openwall.com
Cc: Luis Henriques <luis@...lia.com>
Subject: [RFC PATCH 4/6] add fsconfig() linux syscall wrapper

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

diff --git a/include/sys/mount.h b/include/sys/mount.h
index 4bda07c09462..3a7dee0e04ad 100644
--- a/include/sys/mount.h
+++ b/include/sys/mount.h
@@ -78,6 +78,18 @@ extern "C" {
 
 #define FSOPEN_CLOEXEC          0x00000001
 
+enum fsconfig_command {
+	FSCONFIG_SET_FLAG	= 0,
+	FSCONFIG_SET_STRING	= 1,
+	FSCONFIG_SET_BINARY	= 2,
+	FSCONFIG_SET_PATH	= 3,
+	FSCONFIG_SET_PATH_EMPTY	= 4,
+	FSCONFIG_SET_FD		= 5,
+	FSCONFIG_CMD_CREATE	= 6,
+	FSCONFIG_CMD_RECONFIGURE = 7,
+	FSCONFIG_CMD_CREATE_EXCL = 8,
+};
+
 int mount(const char *, const char *, const char *, unsigned long, const void *);
 int umount(const char *);
 int umount2(const char *, int);
@@ -85,6 +97,7 @@ 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);
+int fsconfig(int, unsigned int, const char *, const void *, int);
 
 #ifdef __cplusplus
 }
diff --git a/src/linux/mount.c b/src/linux/mount.c
index ed7f962a019f..5be2c8cb8c58 100644
--- a/src/linux/mount.c
+++ b/src/linux/mount.c
@@ -30,3 +30,8 @@ int fsopen(const char *fsname, unsigned int flags)
 {
 	return syscall(SYS_fsopen, fsname, flags);
 }
+
+int fsconfig(int fd, unsigned int cmd, const char *key, const void * value, int aux)
+{
+	return syscall(SYS_fsconfig, fd, cmd, key, value, aux);
+}

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.