Hello,
It seems that app with OPENBSD_WXNEED header
can't be launhed on fs, mounted with out of wxallowed.

Call (I assume execve) returns "Permission denied"
for such binaries.

Is it correct?

So, to use WX pages I need:
1) link it with -z wxneeded (I will get "Not supported" from mmap otherwise)
2) use wxallowed fs (or I will get "Permission denied")

Right?

May I suggest to make this fact more clear in docs?

mount(8) says:
"  wxallowed  Processes that ask for memory to be made writeable
                        plus executable using the mmap(2) and mprotect(2)"

But it is not becuase it uses mmap or any other func.
It is because it has  OPENBSD_WXNEED  header,
because it is linked with -z wxneeded
(either manually or by setting  USE_WXNEEDED in ports)

ld(1) could also be updated saying that
"wxneeded-enabled apps can't be launched on FS with out of wxallowed".

"bsd.ports.mk" or ports(7) could also document
USE_WXNEEDED variable in such manner.


I can prepare patches if you agree.

Ilya.

Reply via email to