]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
linux: Add fsopen
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 31 Jan 2022 12:45:12 +0000 (09:45 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 24 Jun 2022 19:03:15 +0000 (16:03 -0300)
It was added on Linux 5.2 (24dcb3d90a1f67fe08c68a004af37df059d74005)
to start the process of preparing to create a superblock that will
then be mountable, using an fd as a context handle.

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
39 files changed:
NEWS
sysdeps/unix/sysv/linux/Makefile
sysdeps/unix/sysv/linux/Versions
sysdeps/unix/sysv/linux/aarch64/libc.abilist
sysdeps/unix/sysv/linux/alpha/libc.abilist
sysdeps/unix/sysv/linux/arc/libc.abilist
sysdeps/unix/sysv/linux/arm/be/libc.abilist
sysdeps/unix/sysv/linux/arm/le/libc.abilist
sysdeps/unix/sysv/linux/csky/libc.abilist
sysdeps/unix/sysv/linux/hppa/libc.abilist
sysdeps/unix/sysv/linux/i386/libc.abilist
sysdeps/unix/sysv/linux/ia64/libc.abilist
sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
sysdeps/unix/sysv/linux/nios2/libc.abilist
sysdeps/unix/sysv/linux/or1k/libc.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
sysdeps/unix/sysv/linux/sh/be/libc.abilist
sysdeps/unix/sysv/linux/sh/le/libc.abilist
sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
sysdeps/unix/sysv/linux/sys/mount.h
sysdeps/unix/sysv/linux/syscalls.list
sysdeps/unix/sysv/linux/tst-mount-consts.py [new file with mode: 0755]
sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist

diff --git a/NEWS b/NEWS
index ea2ab48f9dcd993333fccacc65b9a56cf3fa260b..de3f525e923a4436fe945e64d0781d9bdf69f330 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -41,6 +41,11 @@ Major new features:
   have adverse impact.  It is incompatible with EDNS0 usage and DNSSEC
   validation by applications.
 
+* On Linux, the fsopen function has been added.  It is 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.
+
 Deprecated and removed features, and other changes affecting compatibility:
 
 * Support for prelink will be removed in the next release; this includes
index 9e691fa103bf9490e47c527ddd2cbf7f46439226..7ffcf7ed83891dc910f133ee8a704d5b498ec980 100644 (file)
@@ -256,6 +256,14 @@ $(objpfx)tst-pidfd-consts.out: ../sysdeps/unix/sysv/linux/tst-pidfd-consts.py
          < /dev/null > $@ 2>&1; $(evaluate-test)
 $(objpfx)tst-pidfd-consts.out: $(sysdeps-linux-python-deps)
 
+tests-special += $(objpfx)tst-mount-consts.out
+$(objpfx)tst-mount-consts.out: ../sysdeps/unix/sysv/linux/tst-mount-consts.py
+       $(sysdeps-linux-python) \
+         ../sysdeps/unix/sysv/linux/tst-mount-consts.py \
+           $(sysdeps-linux-python-cc) \
+         < /dev/null > $@ 2>&1; $(evaluate-test)
+$(objpfx)tst-mount-consts.out: $(sysdeps-linux-python-deps)
+
 tst-rseq-disable-ENV = GLIBC_TUNABLES=glibc.pthread.rseq=0
 
 endif # $(subdir) == misc
index 66a995d3dc98c23697e62046a5a3abd6fcf72aa0..9ff750ac0927efac2451f79f9e5e32ae47f508ad 100644 (file)
@@ -300,6 +300,7 @@ libc {
     epoll_pwait2;
   }
   GLIBC_2.36 {
+    fsopen;
     pidfd_open;
     pidfd_getfd;
     pidfd_send_signal;
index 027a1cf531180c20a98b42470e3d6993e16a7aa4..dedb69abdafc019be79da6b79f3b2fb238d99185 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 703fcf5debeb0ae17d071dc3c2198c2bff0c5336..67c7c4319029a7541b613725629ccb7e1c213716 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 28c52dcbac6b4d0725e8a6c13ee84d7d91199c81..6b478b94619d921ec3fb05cb32838c52eae6e86d 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index c3adade8145708b7350c4152163ebf5c4571b67c..45af999b8975d6ab587d0c90a5e4e5265a1d862d 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 33a90a248e54358da4728d08fcfe3cade6574429..5abdfbd677535e002985c2e032d50f52222703d4 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 23a00cfc0bd2e024baf103ed296b05d0ff580ba3..1b560da21fa9de1a218e5dbf9a6b89d32297cb98 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 93e10682087bd7fa5518e575b4d224ce3ae8a2e8..09397be92964b53fa9bb37b6c9e9485fdb17cdaf 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 356b05cae4d8eea670e1002593de8875d7870c8d..a3b95efa368989144fd691b7464beabb5e36f641 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 58e51aae4b359acaa6970a02a57b7273b1b63f8d..840aa669e5b7416f4e34f959d1cec0c6591fc86e 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index ea4a19cbc2de9eafbd4198bac49938f121366038..89014298003f8183a6e2706d252e448d78cad43e 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 217717859c24329a34394e84e3643cbbc4e29cf1..5d3ccb254f907ba14c29cf78e7c28fbb2ced8945 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 0e373d5c89855dad26f0ae787472b8b55af79e06..651d7e65f814bd28719def072310402655d1abd1 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 569d3e55566ccffd73d1bf54eef117a6664793bf..c507fbd83becc47e8d44960a4d71fe5da8cd05b6 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 7ccc7f93eb53f0c6fe2d2be4060a96bf36855f6a..eef92ef698311a03b9cbabfbffe7707cd86ea56f 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index d197f0bd5d2cf8730ddaa4dbd9728a857c464785..92634e2910e2c690d773739974fd03718971cee1 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 4a8e857e5351f103f9c15c505249c998bf0a98a8..5a6a1b8bcdf4d0e000c4b63aa00f4e0b6d4f8145 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index e0a170c030c7f15104f4677310d47898f04a6b91..0fdf5ff93bb3f80d2facc08f8b4ab3bcef933824 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 6f809245c9e9a7a6ec66ac1e418fe2d2f692887d..e2198633606ac2f09894abb11bc9c74fd7e2ebcc 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 1fc9e27c274d7cab2278e2ab19322fb0d970a8cb..8fef5e2ab84ac909f0d7e7fca1c31a70a3c99319 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 01ba1dd9ec736f50fd01fc33c7e85f5758dec5ba..d8a5c77db162b5594934ffaa5745b91d02c40fcb 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 263231a396c5146c2c87cf2da11a4196016cce9c..18cb35378d20e48e1207944da21c90ab574d9a0e 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 2c3c3af8fb8f30060f5b1efade7b079c447643dd..e144bb4167db6506b657fa1a8ffc670ad0618392 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 4138874b386c0ab7d2f7ed81cd116ac97e759a33..1f283236cdd7f1c748173386e990bebed3fecbb2 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 5feae3245fe0ff2a871432dbfaa4a2e2a9f393aa..f76f47d01793805931a4f52a877dc4ba71e5fb9f 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 3e6a4ae5ec5e68364d24f6f6289549f9c5b95303..93517ae3d6e1fa3f2a1c4d6846b8a1a8efbb86d3 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 93c7b79b51e0bde0ddefbf2c41f8dd5d1e3dea87..4d2c9ed035e4cce2fdc4dd8460ae7fdea5421994 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index b663fabeba124917366695810748cf66e642f499..71bb7af685db4d55a0392ea51dd41d27bd3c7848 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index abebf7794439cead55b3979a67659f1179d7a74a..a0408600106f69b75e24bcc41b3a58f7f9f7bbbe 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index afd8a428959bf1b3be09f6256ef4601a5abff600..10b7fa356047101b773da67fbc0b733922250677 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 56feda817d715199dfa3aa678e8cd6d565236547..e859089b640ef0331b9913b62633f4c6c25d3d63 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 00cc5b24d17cb1da6f51065b9da45dc5d2bb58bf..4347e399d6ebbc14e1aa8b44eb7c5300ea875520 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index 174b5c77632a3c1490531674e7c00919eb5d3ab4..56da283d3f7662041b6558e248e7aaf69f7eb715 100644 (file)
@@ -134,6 +134,10 @@ enum
 };
 
 
+/* fsopen flags.  */
+#define FSOPEN_CLOEXEC          0x00000001
+
+
 __BEGIN_DECLS
 
 /* Mount a filesystem.  */
@@ -147,6 +151,10 @@ extern int umount (const char *__special_file) __THROW;
 /* Unmount a filesystem.  Force unmounting if FLAGS is set to MNT_FORCE.  */
 extern int umount2 (const char *__special_file, int __flags) __THROW;
 
+/* Open the filesystem referenced by FS_NAME so it can be configured for
+   mouting.  */
+extern int fsopen (const char *__fs_name, unsigned int __flags) __THROW;
+
 __END_DECLS
 
 #endif /* _SYS_MOUNT_H */
index b12a0d56faccc664b79000d25d743ac9c8b547ec..a2919f433db1a171c9a15c569ad6a1275af38a4c 100644 (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
+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
 getpid          -       getpid          Ei:     __getpid        getpid
 getegid                -       getegid         Ei:     __getegid       getegid
diff --git a/sysdeps/unix/sysv/linux/tst-mount-consts.py b/sysdeps/unix/sysv/linux/tst-mount-consts.py
new file mode 100755 (executable)
index 0000000..33c6689
--- /dev/null
@@ -0,0 +1,56 @@
+#!/usr/bin/python3
+# Test that glibc's sys/mount.h constants match the kernel's.
+# Copyright (C) 2022 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+#
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <https://www.gnu.org/licenses/>.
+
+import argparse
+import sys
+
+import glibcextract
+import glibcsyscalls
+
+
+def main():
+    """The main entry point."""
+    parser = argparse.ArgumentParser(
+        description="Test that glibc's sys/mount.h constants "
+        "match the kernel's.")
+    parser.add_argument('--cc', metavar='CC',
+                        help='C compiler (including options) to use')
+    args = parser.parse_args()
+
+    linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
+    # Constants in glibc were updated to match Linux v5.16.  When glibc
+    # constants are updated this value should be updated to match the
+    # released kernel version from which the constants were taken.
+    linux_version_glibc = (5, 16)
+    def check(cte, exclude=None):
+        return glibcextract.compare_macro_consts(
+                '#include <sys/mount.h>\n',
+                '#include <asm/fcntl.h>\n'
+                '#include <linux/mount.h>\n',
+                args.cc,
+                cte,
+                exclude,
+                linux_version_glibc > linux_version_headers,
+                linux_version_headers > linux_version_glibc)
+
+    status = check('FSOPEN_.*')
+    sys.exit(status)
+
+if __name__ == '__main__':
+    main()
index 4e729bdf56cdc78a98eba1976d912620f27bb769..65e5d2150dfdfb08c7eba78f734ae7ca940ad65a 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
index b5d7b9f1ed2cf7cca1c9900081aff30d724d7b22..4c6371b3c4b4cfe052e95ae9996a94c455578043 100644 (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 fsopen F
 GLIBC_2.36 pidfd_getfd F
 GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F