Details
- Reviewers
emaste trasz - Group Reviewers
Linux Emulation - Commits
- rS283401: Implement prlimit64() system call.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
sys/amd64/linux32/syscalls.master | ||
---|---|---|
559 | const? Also, FreeBSD rlim_t is int64, while Linux 'struct rlimit64' seems to have uint64 there. Same thing below. |
Add a note about rlim signedness.
About const - I would prefer to not use 'const' in masters,
thereto clang complains to discard qualifers in copyout()
Erm, what exactly does the clang say? I mean, in copyout(9) declaration there is a "const" for the kernel pointer, so it shouldn't complain about it?
I'd prefer explicit conversion - even if it's just memcpy in one of the directions - but it's ok for now.
Erm, wait. You're missing access check before kern_proc_setrlimit(). I _think_ it should be PGET_CANDEBUG (as opposed to PGET_CANSEE for retrieving limits); that's what sysctl_kern_proc_rlimit() uses.
Yes, yoa are right! I was thinking why kern_proc_setrlimit()
does not check access. ie, sys_setrlimit.
fixed by copiyng code fro, sysctl code, thnak you very match!
sys/compat/linux/linux_misc.c | ||
---|---|---|
2084 | Does it still do the same thing for PID 0? |