Page MenuHomeFreeBSD

linux: implement signal delivery on arm64
ClosedPublic

Authored by trasz on Jul 21 2021, 12:38 PM.
Tags
None
Referenced Files
F106446966: D31258.id92572.diff
Mon, Dec 30, 10:16 PM
F106440754: D31258.id92625.diff
Mon, Dec 30, 7:30 PM
Unknown Object (File)
Sun, Dec 29, 4:56 AM
Unknown Object (File)
Sat, Dec 14, 11:35 AM
Unknown Object (File)
Wed, Dec 4, 6:06 AM
Unknown Object (File)
Nov 30 2024, 8:16 AM
Unknown Object (File)
Nov 26 2024, 1:54 PM
Unknown Object (File)
Nov 25 2024, 9:38 PM

Details

Summary

Note that this still uses FreeBSD-style sigframe;
this will be addressed later.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40599
Build 37488: arc lint + arc unit

Event Timeline

trasz created this revision.
dchagin added inline comments.
sys/arm64/linux/linux_locore.asm
48

so does thread cancelation works? according to Linux arch/arm64/kernel/vdso/sugreturn.s comments it should not,
as 'gdb, libgcc and libunwind rely on being able to identify the sigreturn instruction sequence to unwind from signal handler'
also see comment about misterious nop instruction. really weird piece of Linux

sys/arm64/linux/linux_sysvec.c
500

on all other Linuxulators I do not use sv_sigcode_base,
but I see that we can do some here, e.g. sv_sigcode is not used anymore so we do not need to initialize it and so..
I propose to do it as everywhere in Linuxulator, then make the same changes everywhere so that there is no need to test separately. ugh..

Fix trampoline, don't use sv_sigcode_base.

sys/arm64/linux/linux_locore.asm
48

Turns out I can fail even at copy/pasting :-D

Should be fixed now.

sys/arm64/linux/linux_sysvec.c
500

Tbh we could just drop both sv_sigcode_base and sv_sigcode; we don't need them, do we?

Note that this still uses FreeBSD-style sigframe;
this will be addressed later.

does Linux userspace depends on a sigframe? AFAIK, sigframe used by linux_rt_sigreturn to restore mcontext,
you need Linux siginfo as it passed to the catcher, If I remember it right

sys/arm64/linux/linux_sysvec.c
500

yes, Linuxulator does not uses it, but sysctl_kern_proc_sigtramp() uses, I think what we can fix here

sys/arm64/linux/linux_sysvec.c
446

signo should be converted to the Linux signo

476

siginfo too, by siginfo_to_lsiginfo()

Translate the signal number and siginfo.

if it works I have no objection)

This revision is now accepted and ready to land.Jul 26 2021, 7:35 AM
This revision was automatically updated to reflect the committed changes.