linux: Add pidfd_getfd

This was added on Linux 5.6 (8649c322f75c96e7ced2fec201e123b2b073bf09)
as a way to retrieve a file descriptors for another process though
pidfd (created either with CLONE_PIDFD or pidfd_getfd).  The
functionality is similar to recvmmsg SCM_RIGHTS.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
Adhemerval Zanella 2022-01-28 16:59:42 -03:00
parent 97f5d19c45
commit 32dd8c251a
38 changed files with 47 additions and 3 deletions

6
NEWS
View File

@ -16,9 +16,9 @@ Major new features:
-z pack-relative-relocs option, which is supported for some targets
in recent binutils versions. Lazy binding doesn't apply to DT_RELR.
* On Linux, the pidfd_open function has been added. The pidfd functionality
provides access to a process while avoiding the issue of PID reuse on
tranditional Unix systems.
* On Linux, the pidfd_open and pidfd_getfd functions have been added.
The pidfd functionality provides access to a process while avoiding
the issue of PID reuse on tranditional Unix systems.
Deprecated and removed features, and other changes affecting compatibility:

View File

@ -0,0 +1 @@
GLIBC_2.36 pidfd_getfd F

View File

@ -301,6 +301,7 @@ libc {
}
GLIBC_2.36 {
pidfd_open;
pidfd_getfd;
}
GLIBC_PRIVATE {
# functions used in other libraries

View File

@ -2616,4 +2616,5 @@ 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 pidfd_getfd F
GLIBC_2.36 pidfd_open 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 _IO_fprintf F
GLIBC_2.4 _IO_printf F

View File

@ -2377,4 +2377,5 @@ 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 pidfd_getfd F
GLIBC_2.36 pidfd_open 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 _Exit F
GLIBC_2.4 _IO_2_1_stderr_ D 0xa0

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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 _Exit F
GLIBC_2.4 _IO_2_1_stderr_ D 0xa0

View File

@ -2652,4 +2652,5 @@ 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 pidfd_getfd F
GLIBC_2.36 pidfd_open 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 __confstr_chk F
GLIBC_2.4 __fgets_chk 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 __confstr_chk F
GLIBC_2.4 __fgets_chk 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 __confstr_chk F
GLIBC_2.4 __fgets_chk 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 _Exit F
GLIBC_2.4 _IO_2_1_stderr_ D 0x98

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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 __confstr_chk F
GLIBC_2.4 __fgets_chk F

View File

@ -2701,4 +2701,5 @@ 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F

View File

@ -2698,4 +2698,5 @@ 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 pidfd_getfd F
GLIBC_2.36 pidfd_open 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 __confstr_chk F
GLIBC_2.4 __fgets_chk 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 __confstr_chk F
GLIBC_2.4 __fgets_chk 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 __confstr_chk F
GLIBC_2.4 __fgets_chk 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 __confstr_chk F
GLIBC_2.4 __fgets_chk F

View File

@ -2740,4 +2740,5 @@ 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F

View File

@ -2123,4 +2123,5 @@ GLIBC_2.35 wprintf F
GLIBC_2.35 write F
GLIBC_2.35 writev F
GLIBC_2.35 wscanf F
GLIBC_2.36 pidfd_getfd F
GLIBC_2.36 pidfd_open 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 _IO_fprintf F
GLIBC_2.4 _IO_printf 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 _IO_fprintf F
GLIBC_2.4 _IO_printf 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 _IO_fprintf F
GLIBC_2.4 _IO_printf F

View File

@ -2812,4 +2812,5 @@ 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F

View File

@ -2379,4 +2379,5 @@ 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F

View File

@ -2579,4 +2579,5 @@ 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 pidfd_getfd F
GLIBC_2.36 pidfd_open 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 _IO_fprintf F
GLIBC_2.4 _IO_printf 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 _IO_fprintf F
GLIBC_2.4 _IO_printf 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 __confstr_chk F
GLIBC_2.4 __fgets_chk 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 __confstr_chk F
GLIBC_2.4 __fgets_chk 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 _IO_fprintf F
GLIBC_2.4 _IO_printf 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 __confstr_chk F
GLIBC_2.4 __fgets_chk F

View File

@ -30,4 +30,12 @@
as 0. */
extern int pidfd_open (__pid_t __pid, unsigned int __flags) __THROW;
/* Duplicates an existing file descriptor TARGETFD in the process referred
by the PIDFD file descriptor PIDFD.
The FLAGS argument is reserved for future use, it must be specified
as 0. */
extern int pidfd_getfd (int __pidfd, int __targetfd,
unsigned int __flags) __THROW;
#endif /* _PIDFD_H */

View File

@ -40,6 +40,7 @@ munlockall - munlockall i: munlockall
nfsservctl EXTRA nfsservctl i:ipp __compat_nfsservctl nfsservctl@GLIBC_2.0:GLIBC_2.28
pipe2 - pipe2 i:fi __pipe2 pipe2
pidfd_open EXTRA pidfd_open i:iU pidfd_open
pidfd_getfd EXTRA pidfd_getfd i:iiU pidfd_getfd
pivot_root EXTRA pivot_root i:ss pivot_root
query_module EXTRA query_module i:sipip __compat_query_module query_module@GLIBC_2.0:GLIBC_2.23
quotactl EXTRA quotactl i:isip quotactl

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 pidfd_getfd F
GLIBC_2.36 pidfd_open F
GLIBC_2.4 __confstr_chk F
GLIBC_2.4 __fgets_chk F

View File

@ -2631,4 +2631,5 @@ 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 pidfd_getfd F
GLIBC_2.36 pidfd_open F