linux: Add fsconfig

It was added on Linux 5.2 (ecdab150fddb42fe6a739335257949220033b782)
as a way to a configure filesystem creation context and trigger
actions upon it, to be used in conjunction with fsopen, fspick and
fsmount.

The fsconfig_command commands are currently only defined as an enum,
so they can't be checked on tst-mount-consts.py with current test
support.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
Adhemerval Zanella 2022-06-24 16:59:15 -03:00
parent 05844d18f7
commit 7eae6a91e9
38 changed files with 67 additions and 4 deletions

8
NEWS
View File

@ -41,10 +41,10 @@ Major new features:
have adverse impact. It is incompatible with EDNS0 usage and DNSSEC
validation by applications.
* On Linux, the fsopen, fsmount, and move_mount functions have been added.
They are part of the new Linux kernel mount APIs that allow applications
to more flexibly configure and operate on filesystem mounts. The new
mount APIs are specifically designed to work with namespaces.
* On Linux, the fsopen, fsmount, move_mount, and fsconfig functions have
been added. They are part of the new Linux kernel mount APIs that allow
applications to more flexibly configure and operate on filesystem mounts.
The new mount APIs are specifically designed to work with namespaces.
* localedef now accepts locale definition files encoded in UTF-8.
Previously, input bytes not within the ASCII range resulted in

View File

@ -300,6 +300,7 @@ libc {
epoll_pwait2;
}
GLIBC_2.36 {
fsconfig;
fsmount;
fsopen;
move_mount;

View File

@ -2616,6 +2616,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2713,6 +2713,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2377,6 +2377,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -496,6 +496,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -493,6 +493,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2652,6 +2652,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2601,6 +2601,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2785,6 +2785,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2551,6 +2551,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -497,6 +497,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2728,6 +2728,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2701,6 +2701,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2698,6 +2698,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2693,6 +2693,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2691,6 +2691,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2699,6 +2699,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2602,6 +2602,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2740,6 +2740,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2123,6 +2123,7 @@ GLIBC_2.35 wprintf F
GLIBC_2.35 write F
GLIBC_2.35 writev F
GLIBC_2.35 wscanf F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2755,6 +2755,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2788,6 +2788,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2510,6 +2510,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2812,6 +2812,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2379,6 +2379,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2579,6 +2579,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2753,6 +2753,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2547,6 +2547,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2608,6 +2608,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2605,6 +2605,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2748,6 +2748,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2574,6 +2574,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -163,6 +163,27 @@ enum
#define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 /* Empty to path permitted */
#define MOVE_MOUNT_SET_GROUP 0x00000100 /* Set sharing group instead */
/* The type of fsconfig call made. */
enum fsconfig_command
{
FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
#define FSCONFIG_SET_FLAG FSCONFIG_SET_FLAG
FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
#define FSCONFIG_SET_STRING FSCONFIG_SET_STRING
FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
#define FSCONFIG_SET_BINARY FSCONFIG_SET_BINARY
FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
#define FSCONFIG_SET_PATH FSCONFIG_SET_PATH
FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
#define FSCONFIG_SET_PATH_EMPTY FSCONFIG_SET_PATH_EMPTY
FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
#define FSCONFIG_SET_FD FSCONFIG_SET_FD
FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
#define FSCONFIG_CMD_CREATE FSCONFIG_CMD_CREATE
FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
#define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE
};
__BEGIN_DECLS
@ -193,6 +214,11 @@ extern int move_mount (int __from_dfd, const char *__from_pathname,
int __to_dfd, const char *__to_pathname,
unsigned int flags) __THROW;
/* Set parameters and trigger CMD action on the FD context. KEY, VALUE,
and AUX are used depending ng of the CMD. */
extern int fsconfig (int __fd, unsigned int __cmd, const char *__key,
const void *__value, int __aux) __THROW;
__END_DECLS
#endif /* _SYS_MOUNT_H */

View File

@ -12,6 +12,7 @@ epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl
eventfd EXTRA eventfd2 i:ii eventfd
execve - execve i:spp __execve execve
flock - flock i:ii __flock flock
fsconfig EXTRA fsconfig i:iUsNi fsconfig
fsmount EXTRA fsmount i:iUU fsmount
fsopen EXTRA fsopen i:sU fsopen
get_kernel_syms EXTRA get_kernel_syms i:p __compat_get_kernel_syms get_kernel_syms@GLIBC_2.0:GLIBC_2.23

View File

@ -49,6 +49,8 @@ def main():
linux_version_glibc > linux_version_headers,
linux_version_headers > linux_version_glibc)
# Skip testing FS_CONFIG commands since they are only enums in the kernel
# header.
status = max(
check('FSOPEN_.*'),
check('FSMOUNT_.*'),

View File

@ -2525,6 +2525,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F

View File

@ -2631,6 +2631,7 @@ GLIBC_2.35 __memcmpeq F
GLIBC_2.35 _dl_find_object F
GLIBC_2.35 epoll_pwait2 F
GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
GLIBC_2.36 fsconfig F
GLIBC_2.36 fsmount F
GLIBC_2.36 fsopen F
GLIBC_2.36 move_mount F