Skip to content

Use kernel-provided __NR_getrandom syscall number - #155762

Open
jjhelmus wants to merge 1 commit into
python:mainfrom
jjhelmus:getrandom_use_NR
Open

Use kernel-provided __NR_getrandom syscall number#155762
jjhelmus wants to merge 1 commit into
python:mainfrom
jjhelmus:getrandom_use_NR

Conversation

@jjhelmus

Copy link
Copy Markdown
Contributor

Replace libc's SYS_getrandom with the kernel-provided __NR_getrandom in configure checks, os.getrandom(), and interpreter entropy handling.

This aligns with other syscall usage in the POSIX module.

This makes os.getrandom() available when building against an older glibc that was itself built with kernel headers lacking the syscall, provided the current kernel headers define __NR_getrandom. This type of build is done in python-build-standalone, astral-sh/python-build-standalone#1188.

Replace libc's SYS_getrandom with the kernel-provided __NR_getrandom
in configure checks, os.getrandom(), and interpreter entropy handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant