-
Notifications
You must be signed in to change notification settings - Fork 194
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
RFC: Add pagesize to __ifunc_arg_t #265
Comments
Thanks for creating the issue. I expect the place to document this would be in https://github.com/ARM-software/abi-aa/blob/main/sysvabi64/sysvabi64.rst#941gnu-c-library-ifunc-interface I think @nsz-arm would likely be the best person to discuss this and the implementation choices. Although it may be best to do that on the glibc/bionic mailing lists as I see this as a GNU/Linux platform decision that I'd certainly be happy to document the outcome if Some thoughts, I'm mostly a linker person so I've not got too much expertise in this area:
|
Another idea would be to put a pointer to the auxval array there, that would let people extract pagesize but also other information they might need. |
we will have to extend ifunc arg with hwcap3 soon so it is a good time to discuss extensions. i think pagesize is ok to add, pointer to auxv may be. for the record, the constraints are that an ifunc resolver
if auxv is user modifiable (according to interface contracts, not according to page protection) then a libc would need to make a copy to pass it to ifunc resolvers (unbounded memory) even then it would be fine to pass an unspecified subset to resolvers in auxv format, however it is ugly to parse auxv in a resolver when all you need is hwcap flags. it's hard to find out the pagesize so that's a valid request (i believe one could do it with a raw mprotect syscall, with some handwaving, but i would not recommend using raw syscalls). |
Hey!
I am working on HWASan where we have some initialization logic in ifunc resolvers. For non-4K page size systems, it would be nice to know the page size (because we call
mmap
via our own implementation of syscall).__ifunc_arg_t
solves this forHWCAP
(andHWCAP2
), so it seems natural to also add the page size. I would be happy to do the change in glibc and Android Bionic.What do you think?
The text was updated successfully, but these errors were encountered: