Page MenuHomeFreeBSD

linux: Fix declaration of rt_sigreturn()
ClosedPublic

Authored by trasz on Jul 20 2021, 7:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 9:54 AM
Unknown Object (File)
Nov 20 2024, 5:34 PM
Unknown Object (File)
Nov 3 2024, 7:45 AM
Unknown Object (File)
Nov 3 2024, 7:44 AM
Unknown Object (File)
Nov 3 2024, 7:44 AM
Unknown Object (File)
Nov 3 2024, 7:26 AM
Unknown Object (File)
Oct 24 2024, 4:29 AM
Unknown Object (File)
Oct 21 2024, 12:16 AM
Subscribers

Details

Summary

On Linux, this syscall doesn't take any arguments; instead,
it assumes the context was put on the stack.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

trasz requested review of this revision.Jul 20 2021, 7:45 PM

The change is trivial, but I'd like to make sure I got this right; I have a patch that implements signal delivery on arm64, but it's still somewhat buggy. I'm not sure where the argument got here in the first place.

The Linux implementation can be found here: https://elixir.bootlin.com/linux/latest/source/arch/arm64/kernel/signal.c

I'm not sure where the argument got here in the first place.

I assume it's here copied from amd64

I think you should start by adapting arm64 sendsig and sigreturn, and trampoline

This comment was removed by trasz.

as sigreturn called only from trampolines so it decl depends on how trampoline call it

I think you should start by adapting arm64 sendsig and sigreturn, and trampoline

That’s precisely what I’ve done, except that I stole the trampoline from Linux. It’s three instructions, and I’d rather not diverge here, to avoid complicating matters for native Linux debuggers or unwinders.

I think you should start by adapting arm64 sendsig and sigreturn, and trampoline

That’s precisely what I’ve done, except that I stole the trampoline from Linux. It’s three instructions, and I’d rather not diverge here, to avoid complicating matters for native Linux debuggers or unwinders.

ah, I read comments of Linux arm64 sigreturn about unwinding))
so, you are on a right direction, as arm64 unwinders depends on the sigreturn instruction sequence.

This revision is now accepted and ready to land.Jul 20 2021, 9:29 PM