Subject: Re: troubleshoot hash(3) database issues
To: Jeremy C.Reed <reed@reedmedia.net>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-userlevel
Date: 08/30/2007 16:04:57
On Aug 30, 2007, at 5:29 AM, Jeremy C. Reed wrote:
> And OpenBSD does:
>
> if (do_free) {
> - if (bp->page)
> + if (bp->page) {
> + (void)memset(bp->page, 0, hashp-
> >BSIZE);
> free(bp->page);
> + }
>
> But I don't understand value of that.
I seem to remember that, many years ago, they decided it was a good
idea to memset any pages used by a db before freeing them back to the
OS because they could contain sensitive data.
(Of course, the same could be said of any page of any process, so
NetBSD never picked up that change since it has no actual value.)
-- thorpej