Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 Nov 2012 18:23:45 +0400
From:      Andrey Zonov <zont@FreeBSD.org>
To:        freebsd-arch@FreeBSD.org
Subject:   unprivileged mlock(2)
Message-ID:  <5093D771.5040606@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig62197D7EF708088F7AB36448
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

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/

--=20
Andrey Zonov


--------------enig62197D7EF708088F7AB36448
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQEcBAEBAgAGBQJQk9dzAAoJEBWLemxX/CvTw3MH/jxGuPqX7sRZmaTkzNF4IgAl
jSS3HvxwWxCOO+q3xHjdpfLeWLgl917fBdMLlI7a+ztCY6YRzfK6Oxdg4ntIULyb
EpKmXXPSoWsK5aV1JrXFb9DktHDNgnBFDlufa5Pe7U7RixfpwrpWxQ11l8oceRL6
hR8xj/F0BH4lz1xR7/qQPkM54kx9SUvGN7QQydZQv9sUBsUom+VJWK7fdltrHXaR
Va2AAVANqfjFloP3K7T04pL9IbHk4SCue0Ru+ruvtVTrF8DDmM4YN+8Ez0kiU0Cr
SztmfioErIDt+OEw1WTGN4W9o7ERfHxEnPlESKJZ7DAKR5O8gzGzR+nOdTkxQEg=
=YVZS
-----END PGP SIGNATURE-----

--------------enig62197D7EF708088F7AB36448--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5093D771.5040606>