Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aarch64: implement system call assembly instruction svc #1156

Closed
wkozaczuk opened this issue Jun 27, 2021 · 1 comment
Closed

aarch64: implement system call assembly instruction svc #1156

wkozaczuk opened this issue Jun 27, 2021 · 1 comment
Labels

Comments

@wkozaczuk
Copy link
Collaborator

This would be equivalent to what we do on x86_64 to implement the SYSCALL instruction handler. The equivalent on ARM is SVC. There is a good article describing how system call handling is implemented in Linux - https://eastrivervillage.com/Anatomy-of-Linux-system-call-in-ARM64/index.html.
Please note we would also want to implement a dedicated syscall stack to properly support Golang executables.

@wkozaczuk
Copy link
Collaborator Author

The golang-pie-example crashes like so:

OSv v0.55.0-292-g6dec325e
eth0: 192.168.122.15
Booted up in 90.43 ms
Cmdline: /hello.so
unexpected synchronous exception, EC: 0x0015
[registers]
PC: 0x00001000000cd7e4 <???+841700>
X00: 0x0000000000000000 X01: 0x0000000000002000 X02: 0x00002000006feee8
X03: 0x0000000000002350 X04: 0xffffa000412e3e30 X05: 0x0000000010000000
X06: 0x0000000000000000 X07: 0x0000000000000003 X08: 0x000000000000007b
X09: 0x000000000d35ec75 X10: 0x0000000000000006 X11: 0x000000006e43a319
X12: 0x000000006e43a319 X13: 0x000000006e43a319 X14: 0x0000000000000000
X15: 0x0000000000000000 X16: 0x0000200000700ee8 X17: 0x00000000402d3eb4
X18: 0x0000000000000000 X19: 0xffffa000412e3810 X20: 0x0000200000700a48
X21: 0x00000000406f8000 X22: 0x0000000000000001 X23: 0xffffa000412e3810
X24: 0xffffa000412e3800 X25: 0x0000200000100d50 X26: 0x00002000007009a0
X27: 0x0000200000700ec0 X28: 0x00001000001be3a0 X29: 0x00002000006feeb8
X30: 0x0000100000099adc SP:  0x00002000006feec0 ESR: 0x0000000056000000
PSTATE: 0x0000000020000345
Aborted

[backtrace]
0x000000004020b8d0 <???+1075886288>
0x000010000009a23c <???+631356>
0xa9bf67f8a9bf6ff6 <???+-1447071754>

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

No branches or pull requests

1 participant