unprivileged mlock(2)

Andrey Zonov zont at FreeBSD.org
Fri Nov 2 14:23:52 UTC 2012


Hi,

I'm ready to commit these four patches [1].  I'm going to do this
tomorrow if there won't be any objections.

I want to make clear changes in login.conf about memorylocked limits.
When the system is starting up, init(8) uses daemon login class to run
/etc/rc.  Some daemons such as amd(8) and watchdogd(8) use mlockall(2)
and may deny that call because of limits, that is why I set memorylocked
limit to 64Mb for daemon class.

But the problem will be still there if you are using `sudo' or `su -m'
to restart services.  In that case your login class (and limits) would
be applied and memorylocked limit may cause failure of mlockall(2) call
(like vmemoryuse limit may fail malloc(3)).

[1] http://people.freebsd.org/~zont/patches/mlock/

-- 
Andrey Zonov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 535 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20121102/95b0d3bb/attachment.sig>


More information about the freebsd-arch mailing list