4 ms·
You can make syscalls with inline assembly (SVC 0x80).
by sjtgraham 8y ago
You can make syscalls with inline assembly (SVC 0x80).
- eridius 8y agoNot on macOS. macOS does not guarantee syscall compatibility between OS versions. The only supported mechanism for invoking syscalls is via libc.
- sjtgraham 8y agoYou can do it, it’s how libsystem does it. A lot of AppStore apps use it for jailbreak testing too, e.g. testing sandbox integrity, or to call ptrace with PT_DENY_ATTACH. Apple lets these apps pass review and onto the AppStore. Do you know how often, if ever, Apple ever changes the syscall table other than to add to it?
- eridius 8y agolibSystem is provided by Apple. The fact that libSystem does it does not mean you can do it without libSystem, as libSystem is the one and only supported way to do this. > Do you know how often, if ever, Apple ever changes the syscall table other than to add to it? I don't know, but I'm pretty sure the answer is something other than "never".