Hi Mato See inlines below
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On June 21, 2018 6:05 PM, Martin Lucina <[email protected]> wrote: > > > Hi Adam, > > On Wednesday, 20.06.2018 at 22:07, Adam Steen wrote: > > > Hi All > > > > As some of you know I have been working to get MirageOS/Solo5 working on > > > > OpenBSD. > > > > As of Friday of last week, I though i had at least achieved this, but > > > > after running an end to end test with released version the of > > > > Mirage-Skeleton Hello World Tutorial, I now find this causes as " > > > > mprotect W^X violation" on OpenBSD. > > That's err, odd. Do you get a "Warning: phdr[N] requests WRITE and EXEC > > permissions" when running ukvm-bin? Yes. > > I know Solo5 does not issue any mprotect requests with WRITE and EXEC > > > > permissions, but something in MirageOS does. I have be testing building > > > > the Hello World example for a while now without any problems of this > > > > nature, i am not sure where to start look at what changed. > > > > I can permit W^X memory on OpenBSD with a change to the Solo5 configure > > > > script and a file system setting, but this has now missed the boat for > > > > this release and would prefer not to do this. > > That would be just papering over the problem. Your right, it should be sorted correctly. > As for fixes, it'll be while > > yet before the post 0.3.0 renaming and restructuring gets done, I can > > easily cut a point release before then for trivial fixes (no ABI changes). I will have to see what i can track down. > > > Any tips on where i should look? > > When you write "causes a mprotect W^X violation", how does that actually > > manifest itself at run-time? Does ukvm-bin get killed? Or some other way? ukvm-bin gets killed by the kernel. "ukvm-bin: hello.ukvm: Warning: phdr[0] requests WRITE and EXEC permissions" "ukvm-bin: hello.ukbm: Not Supported" and in dmesg "ukvm-bin(65577): mprotect W^X violation" > I've looked at the build products (on Linux) for both the Solo5 standalone > > tests and the mirage-skeleton tutorial/hello unikernel with "readelf -l", > > and I don't see any phdrs asking for W and X protections at the same time, > > so my guess would be something in the OpenBSD build is acting up (again). > > -mato Looks like I will have to dig a little deeper, I do recall something like this happening soon after i got things working on a custom kernel. I am awol again next week, but will try to nail down exactly what caused the issue. Thanks for the confirmation about linux and a starting point with "readelf -l" Adam
