Gilles Duboscq: 1
map_flags::X should mean that code execution is allowed
2 files changed, 2 insertions(+), 2 deletions(-)
Hi Drew,
Yes, i have tested that `make check` still works as much as before
those changes.
On aarch64, all tests pass except
task::pagefault................. Abort: helios/endpoint.ha:84:22:
assertion failed
At least for me this fails on master as well. I have not checked what
this is about.
Note that i also tested that with this patch, the X flag handling in
x86_64's arch_flags [1] can also be uncommented and it works.
Before this patch, uncommenting that would cause a fault. I wasn't
sure why this had been commented out so i left it alone. I can also
update my patch to uncomment it if you'd like.
Overall, i think this is a case of double negations: the patch i sent
doesn't break anything because it flips the logic in both phdr_load
and aarch64's map_flags (currently the sole active user).
I noticed that in a RISC-V port that i am playing with. I had
implemented map_flags::X as meaning "allow execution when set" and i
was getting strange faults. That's how i noticed that the code in
phdr_load is inverted.
Gilles
[1]: https://git.sr.ht/~sircmpwn/helios/tree/master/item/objects/+x86_64/arch_vspace.ha#L185-187
I also checked mercury and after this patch, it also needs the same
inversion in its loader [1].
Gilles
[1]: https://git.sr.ht/~sircmpwn/mercury/tree/master/item/cmd/sysinit/loader.ha#L135
Mercury has yet to be generally ported to aarch64, fwiw, but ack.