HomeFreeBSD

sysctl: only take mem lock if oldlen is > 4 * PAGE_SIZE

Description

sysctl: only take mem lock if oldlen is > 4 * PAGE_SIZE

The previous limit of just one page is hit by ps.

The entire mechanism should be reworked, if not whacked. It seems the intent
is to reduce kernel dos-ability - some handlers wire the amount of memory
passed here. Handlers should probably stop wiring in the first place or in
the worst case indicate they are doing so so that the check is done only if
necessary. It should also probably be a counter, not a lock.

MFC after: 1 week

Details

Provenance
mjgAuthored on
Parents
rS324735: execve: avoid one proc lock/unlock trip unless PTRACE_EXEC is set
Branches
Unknown
Tags
Unknown