Details
Details
- Reviewers
trasz - Group Reviewers
Linux Emulation - Commits
- rS283396: Implement rt_sigqueueinfo() system call.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
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. |
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? |
sys/compat/linux/linux_signal.c | ||
---|---|---|
760 ↗ | (On Diff #4407) | Linux allows SI_ here. So, I plan to convert this later. |
Comment Actions
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.