Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On 32-bit x86, add more strategies for the syscall mechanism. #979

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

sunfishcode
Copy link
Member

By default, rustix uses libc to read aux records, to get the sysinfo information needed to locate the vsyscall function. If that's disabled, add more fallback paths:

Add a way to use PR_GET_AUXV even when "alloc" is not available, by using a statically-sized buffer and being prepared to proceed to the next fallback if the buffer isn't big enough.

And, if PR_GET_AUXV and /proc/self/auxv both fail, fall back to using int 0x80.

By default, rustix uses `libc` to read aux records, to get the sysinfo
information needed to locate the vsyscall function. If that's disabled,
add more fallback paths:

Add a way to use `PR_GET_AUXV` even when "alloc" is not available, by
using a statically-sized buffer and being prepared to proceed to the
next fallback if the buffer isn't big enough.

And, if `PR_GET_AUXV` and /proc/self/auxv both fail, fall back to using
`int 0x80`.
@sunfishcode sunfishcode force-pushed the sunfishcode/int-0x80-fallback branch from 0994568 to 7f6e76a Compare January 5, 2024 01:35
@sunfishcode sunfishcode merged commit 3652dc0 into main Jan 11, 2024
44 checks passed
@sunfishcode sunfishcode deleted the sunfishcode/int-0x80-fallback branch January 11, 2024 15:09
@sunfishcode
Copy link
Member Author

This is released in rustix 0.38.29.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant