-
Notifications
You must be signed in to change notification settings - Fork 50
aarch64: implement signal delivery #1217
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
Conversation
if i may add, for the sake of simplicity, the fpstate is completely ignored in
the signal context. This is left fot the readers as practice. (这都是作者的良苦
用心)
also with the current task/context structs (and their compositions) it's hacky
to plug in architectural extensions such as aarch64 SIMD (SME and SVE). they are
ignored as well.
|
This is the result of the test directly on the machine: Is this what to be expected? |
Yes. in the test I have no sanity check whether the vdso |
How can this behavior be reproduced? |
see my example, replace the sigaction stuffs with one |
Thanks and sorry for the noise, I am a totally noob on the subject. |
fixed. The problem is with UContext Default constructor. (it has infinite recursion) I don't know exactly why but patterns like this should be avoided.
|
Oh, yes I see. |
Signed-off-by: Tianhao Wang <[email protected]>
fec1ad2
to
aedae1a
Compare
aedae1a
to
1fe2ef5
Compare
we need a convient method to get the userspace addr of the loaded vdso page. For example, vdso is required for aarch64 to set up the return trampoline for sigreturn. This is a mockup and may need refactoring. Signed-off-by: Tianhao Wang <[email protected]>
Yeah, that's different than x86. Co-authored-by: ch1337 <[email protected]> Signed-off-by: Tianhao Wang <[email protected]>
1fe2ef5
to
c1e702a
Compare
It seems a page fault with an inappropriate address. |
Can you also apply #1220 and test again? Also do a make clean first. |
Same error, is it because I didn't cherry-pick codes in #1212 or other prs? can you push a branch of your codes that can run the ubuntu bash? |
@CharlyYu sorry for the late reply. https://github.com/shrik3/Quark/tree/armdev_dev_base -> for you only please take a look at the commit log and throw away my local changes (prefixed with local) that you don't want. #1220 is not necessary for ubuntu bash to run. Also note that the quark is broken on the newest ubuntu container image (both on main and us). Try using something older. Also you could try Note on my local commits: there are PAN related code that are only relevant to our testing machine. Compilation could fail in your env. |
On trying Redis I get the following error: Reproduce: |
this: https://go.googlesource.com/go/+/go1.15.3/src/runtime/signal_unix.go#378 please grep sys_rt_sigaction in the log. What's sigaction (the restorer specifically)? Also FWIW I don't want to look into go runtime perks in the scope of this PR. Could you take this to an issue to keep it tracked? |
On Fri May 10, 2024 at 11:15 AM CEST, Tianhao Wang wrote:
> On trying Redis I get the following error: `bad g in signal handler` which for me is pretty cryptic. The only reference I found online is on [Go runtime](https://go.googlesource.com/go/+/go1.15.3/src/runtime/signal_unix.go#919). AFAIK Redis is supported on main branch (cannot tested myself though).
>
> Reproduce: `docker run --rm -it -p 6379:6379 --runtime=quark_dlocal --name redis_test redis`
this: https://go.googlesource.com/go/+/go1.15.3/src/runtime/signal_unix.go#378
please grep sys_rt_sigaction in the log. What's sigaction (the restorer specifically)?
Alright, I will open a new issue for this.
|
NOTE: For aarch64 vdso is required for sigreturn to work. WIP/TODOs: - save/restore FP state - restart syscalls (and set orig_x0) when necessary - handle multiple signal frames Signed-off-by: Tianhao Wang <[email protected]>
c1e702a
to
ced4444
Compare
[updated!] There are some todos, see commit messages. Anyways for the scope of this PR I'll stop here.
we have the basic stuffs running without issues now. try container

ubuntu bash