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)
Mar 8 2024, 12:06 AM
Unknown Object (File)
Feb 13 2024, 1:01 AM
Unknown Object (File)
Jan 16 2024, 12:39 PM
Unknown Object (File)
Jan 14 2024, 4:41 AM
Unknown Object (File)
Dec 22 2023, 9:15 PM
Unknown Object (File)
Dec 17 2023, 11:11 PM
Unknown Object (File)
Nov 23 2023, 5:06 AM
Unknown Object (File)
Oct 11 2023, 7:28 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