Page MenuHomeFreeBSD

Implement rt_sigqueueinfo() system call.
ClosedPublic

Authored by dchagin on Oct 31 2014, 6:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 26, 4:10 PM
Unknown Object (File)
Apr 30 2024, 3:07 PM
Unknown Object (File)
Apr 29 2024, 5:27 PM
Unknown Object (File)
Apr 28 2024, 12:00 PM
Unknown Object (File)
Apr 26 2024, 1:50 PM
Unknown Object (File)
Feb 16 2024, 2:32 AM
Unknown Object (File)
Jan 28 2024, 11:36 PM
Unknown Object (File)
Jan 19 2024, 12:23 AM
Subscribers

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

dchagin retitled this revision from to Implement rt_sigqueueinfo() system call..

Looks fine to me

sys/compat/linux/linux_signal.c
718–719

Should we log and/or disallow this case?

sys/compat/linux/linux_signal.c
718–719

No, RT signals. LINUX_SIG_VALID (707-708) validate user supplied sigcode.

constify l_siginfo_t, merge with D1044 changes.

trasz added inline comments.
sys/compat/linux/linux_signal.c
725

I think you're missing a lot of access checks here. See sys/kern/kern_sig:sys_kill(); in particular the IN_CAPABILITY_MODE() and p_cansignal().

sys/compat/linux/linux_signal.c
725

Erm, ignore the IN_CAPABILITY_MODE(), but p_cansignal() should still be used, no?

Yes, you are right. fixed, thanks!

sys/compat/linux/linux_signal.c
690

Linux allows SI_ here. So, I plan to convert this later.

trasz added a reviewer: trasz.

I'd consider refactoring the code, to break this code into separate function:

linux_copyin_siginfo(...) {

error = copyin(args->info, &linfo, sizeof(linfo));
if (error != 0)
        return (error);

 ksiginfo_init(&ksi);
  lsiginfo_to_ksiginfo(&linfo, &ksi, sig);

}

... and then do something similar in a lot of other cases when you have this "copyin and convert", or "convert and copyout" pattern. Still, probably better leave this for another time.

This revision is now accepted and ready to land.Mar 31 2015, 3:34 PM
This revision was automatically updated to reflect the committed changes.