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)
Thu, Dec 19, 9:37 PM
Unknown Object (File)
Wed, Dec 18, 4:10 AM
Unknown Object (File)
Wed, Dec 18, 3:22 AM
Unknown Object (File)
Wed, Dec 11, 9:47 PM
Unknown Object (File)
Wed, Dec 11, 8:41 PM
Unknown Object (File)
Wed, Nov 27, 5:35 PM
Unknown Object (File)
Nov 19 2024, 7:12 AM
Unknown Object (File)
Nov 19 2024, 12:35 AM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
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
788–789

Should we log and/or disallow this case?

sys/compat/linux/linux_signal.c
788–789

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

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

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

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.