Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Implement memory protection APIs (RW/RX/RO) #119

Open
roblabla opened this issue Feb 26, 2018 · 9 comments
Open

Implement memory protection APIs (RW/RX/RO) #119

roblabla opened this issue Feb 26, 2018 · 9 comments

Comments

@roblabla
Copy link
Member

Add a JIT API to libtransistor. It'd be really awesome to implement the mprotect API, such that emulators using that syscall can work as-is without modifications.

@iOS4all

This comment has been minimized.

@misson20000 misson20000 added this to the 2.0.0-rc1 milestone May 3, 2018
@misson20000 misson20000 removed this from the 2.0.0-rc1 milestone May 31, 2018
@allanxp4
Copy link

allanxp4 commented Jun 4, 2018

JIT as in a Just In Time compiler?
Do you mean an API like libgccgit does?

@roblabla
Copy link
Member Author

roblabla commented Jun 5, 2018

By JIT, we really mean memory protection APIs. AKA the ability to make a memory region go from RW to RX and back.

@allanxp4
Copy link

allanxp4 commented Jun 5, 2018

May I suggest renaming the issue? Very few people know that as "JIT" (and I still don't know what that means), but as memory protection, DEP, NX, etc. Even searching for JIT on osdev doesn't return anything related to memory protection. (not bashing your work, just trying to get more people to contribute :) )

By the way, i'm getting familiar with the library and the inner workings of the horizon, looks like, a really nice microkernel. done a few tests on the switch, probably gonna try implemting memory protection later once I really get how things work. Maybe documeting a few things in the way.

@mailwl
Copy link

mailwl commented Jun 5, 2018

it has the same mean on iPhone - Safari, or even WebKit uses it for JavaScript JIT, i think, HOS uses it for JS too (in WebKit) - impossible to sign code remotely, which auto generated on the fly

@allanxp4
Copy link

allanxp4 commented Jun 5, 2018

Yes, but you use it for JIT, it isn't a JIT API, it is a memory protection API. You use it to make pages executable in order to make the code generated by your JIT engine executable, but it isn't a JIT in itself.
Most people will come here thinking in implementing a libgccjit or a DynASM, not an mprotect.

@mailwl
Copy link

mailwl commented Jun 5, 2018

JIT memory - RWX+disable codesign check. it's all

@roblabla roblabla changed the title Implement JIT support Implement memory protection APIs (RW/RX/RO) Jun 5, 2018
@roblabla
Copy link
Member Author

roblabla commented Jun 5, 2018

@allanxp4 you're absolutely right. Mostly called it JIT API because that's what libnx called it, but it's a pretty misleading name :).

@leo60228
Copy link

Need this for something I'm working on. Not sure how to work around this.

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

No branches or pull requests

6 participants