Page MenuHomeFreeBSD

Implement prlimit64() system call.
ClosedPublic

Authored by dchagin on Oct 31 2014, 6:48 AM.
Tags
None
Referenced Files
F82833607: D1050.id4413.diff
Thu, May 2, 11:54 PM
Unknown Object (File)
Mar 3 2024, 8:16 AM
Unknown Object (File)
Feb 11 2024, 9:32 AM
Unknown Object (File)
Jan 28 2024, 5:04 PM
Unknown Object (File)
Jan 3 2024, 10:45 PM
Unknown Object (File)
Dec 19 2023, 11:42 PM
Unknown Object (File)
Dec 13 2023, 5:35 PM
Unknown Object (File)
Nov 22 2023, 7:13 AM
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 prlimit64() system call..
emaste added a reviewer: emaste.
This revision is now accepted and ready to land.Oct 31 2014, 1:42 PM
dchagin edited edge metadata.

style(9)

This revision now requires review to proceed.Mar 24 2015, 5:51 PM
trasz added inline comments.
sys/amd64/linux32/syscalls.master
559 ↗(On Diff #4375)

const? Also, FreeBSD rlim_t is int64, while Linux 'struct rlimit64' seems to have uint64 there.

Same thing below.

dchagin edited edge metadata.

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()

I'm wrong, we do not conversion for new limits, but we should convert RLIM_INFINITY.

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?

trasz added a reviewer: trasz.

I'd prefer explicit conversion - even if it's just memcpy in one of the directions - but it's ok for now.

This revision is now accepted and ready to land.Mar 27 2015, 11:58 AM
trasz requested changes to this revision.Mar 27 2015, 12:02 PM
trasz edited edge metadata.

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.

This revision now requires changes to proceed.Mar 27 2015, 12:02 PM
dchagin edited edge metadata.

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!

dchagin edited edge metadata.

typo fixed.

sys/compat/linux/linux_misc.c
2084 ↗(On Diff #4491)

Does it still do the same thing for PID 0?

This revision was automatically updated to reflect the committed changes.