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)
Tue, Apr 30, 3:07 PM
Unknown Object (File)
Mon, Apr 29, 5:27 PM
Unknown Object (File)
Sun, Apr 28, 12:00 PM
Unknown Object (File)
Fri, Apr 26, 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
Unknown Object (File)
Jan 18 2024, 1:12 PM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #2177)

Should we log and/or disallow this case?

sys/compat/linux/linux_signal.c
718–719 ↗(On Diff #2177)

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
795 ↗(On Diff #4374)

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
795 ↗(On Diff #4374)

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
760 ↗(On Diff #4407)

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.