Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Sep 2012 23:17:33 +0400
From:      Andrey Zonov <zont@FreeBSD.org>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: [patch] unprivileged mlock(2)
Message-ID:  <504653CD.2000707@FreeBSD.org>
In-Reply-To: <50463026.8000506@FreeBSD.org>
References:  <503DD433.2030108@FreeBSD.org> <201208290906.q7T96C9j032802@gw.catspoiler.org> <20120829092318.GW33100@deviant.kiev.zoral.com.ua> <503F2D24.8050103@FreeBSD.org> <50463026.8000506@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On 9/4/12 8:45 PM, Andriy Gapon wrote:
> on 30/08/2012 12:06 Andrey Zonov said the following:
>> Hi,
>>
>> So, I've got the first version of the patch (attached) which fixes
>> memory locked limit checking and accounting.
> 
> Andrey,
> 
> your mlock.patch looks good to me, but I haven't verified pieces under RACCT.
> Please try to get a review from a person who is knee-deep in the VM code like alc
> or your mentor.
> 

Thanks for review!

> The code should also be sent for vetoing to security@.  Not sure if you would get
> a review there, but absence of nays would be good.
> 
> When the code is ready to be committed, please remember about
> memorylocked=unlimited in the default entry of the default login.conf.  A big
> warning about it will have to be posted (in UPDATING and current@/stable@ at the
> very least).
> 

After that amd(8), geli(8) and watchdogd(8) will be broken, because they
call mlockall(2).  ntpd(8) won't, it already raises its RLIMIT_MEMLOCK.
 I will prepare patches for raising limits if there is no other solution.

> Thank you very much for doing this work.
> 
> P.S.  It would probably make sense to provide some HTTP home for this patch as well.
> 

Updated patch is here [1].

[1] http://people.freebsd.org/~zont/mlock1.patch

-- 
Andrey Zonov


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

iQEcBAEBAgAGBQJQRlPQAAoJEBWLemxX/CvTczAH/3wO0/IVDWfWfcqIJYr1i2J1
z745vwut6TjF6czsSCmMHCIf9nvj0wOGr/YbLl8YYHLZy6aWSD+En1O65ZemsLYX
Dt0jopdVDGXJSSh2QPbcYGfaOJfmCAteRPRVEfV75QoavsT3ZVETXD/Sz8Mjl1Dp
o/qqnw91irVVoEQA7c6dxzvnYWOEQ4TiGZlPa57qjvRSXBuWq/9P8jEHVjNW9xJ+
2KanYCRH8iNUCigN94aqvcA19l/cKRQc+P4i0LpDKPibUlqoH7gnyOeR3WYFXOW+
SaBsApEaaULwcqFRz4L0LZTvAT9ctUL9oO1kt/OnbGc6H71aHypuuMWsgE5EGpo=
=vU6j
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?504653CD.2000707>