[illumos-Developer] Review: 668 libnvpair could use an allocator that zeros memory on free

Jason King jason.brian.king at gmail.com
Thu Feb 10 21:09:32 PST 2011


On Thu, Feb 10, 2011 at 10:18 PM, Garrett D'Amore <garrett at nexenta.com> wrote:
> Looks ok to me.  Did we decide that we didn't want to lock pages used by
> this allocation to prevent them from being swapped to disk?  (It seemed
> like a good idea to me at the time.)

It requires elevated privs to lock memory.  I wonder if it might be
more appropriate as a separate allocator (as you can see, they're
simple enough to implement) such as nv_alloc_locked, so non-privileged
applications can still use it (if only to prevent information leakage
via address space reuse by malloc(3c)).

>
>        - Garrett
>
> On Thu, 2011-02-10 at 21:44 -0600, Jason King wrote:
>> Webrev at http://cr.illumos.org/view/njgj7cyj/
>>
>> I'm running nightly against the lastest snapshot of illumos-gate, but
>> earlier nightly's built without issue a few weeks ago (so just a
>> sanity check).
>>
>> I've attached the test case I used to verify the changes.
>> _______________________________________________
>> Developer mailing list
>> Developer at lists.illumos.org
>> http://lists.illumos.org/m/listinfo/developer
>
>
>



More information about the Developer mailing list