You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-153400: Add syscall fallbacks for copy_file_range/memfd_create
glibc only grew copy_file_range() and memfd_create() in 2.27, and we compile
the os functions out when the libc we build against doesn't have them. That
loses them for good in a redistributable built against an older glibc, such
as the python-build-standalone builds targeting glibc 2.17, even when the
kernel it runs on implements the syscalls.
Keep calling the libc wrappers when they are available, so we don't lose
their symbol versioning and _FORTIFY_SOURCE checks, and issue the syscall
directly when they aren't. If the syscall number is missing as well, the
functions are still left out. pidfd_open() and pidfd_getfd() already use raw
syscalls, so nothing changes for them.
Include <sys/syscall.h> whenever it exists rather than only when the
getrandom() syscall was detected, since __NR_* is now needed for more than
getrandom().
Signed-off-by: Daan De Meyer <daan@amutable.com>
0 commit comments