From owner-freebsd-security@FreeBSD.ORG Fri Sep 13 16:46:51 2013 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EB7DBDFA for ; Fri, 13 Sep 2013 16:46:51 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C3E992E07 for ; Fri, 13 Sep 2013 16:46:51 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id r8DGklfZ018402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Sep 2013 09:46:48 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id r8DGklo4018401; Fri, 13 Sep 2013 09:46:47 -0700 (PDT) (envelope-from jmg) Date: Fri, 13 Sep 2013 09:46:47 -0700 From: John-Mark Gurney To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Subject: Re: FreeBSD Transient Memory problem? Message-ID: <20130913164647.GR68682@funkthat.com> Mail-Followup-To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , My Email , "freebsd-security@freebsd.org" References: <20130912053559.GF68682@funkthat.com> <979901F9-5F25-4DF1-95A8-32473C55B25F@gmail.com> <20130912183206.GK68682@funkthat.com> <86d2od589t.fsf@nine.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86d2od589t.fsf@nine.des.no> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Fri, 13 Sep 2013 09:46:48 -0700 (PDT) Cc: My Email , "freebsd-security@freebsd.org" X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2013 16:46:52 -0000 Dag-Erling Smrgrav wrote this message on Fri, Sep 13, 2013 at 12:24 +0200: > John-Mark Gurney writes: > > for kernel malloc, look at sys/kern_malloc.c.. It doesn't look like > > there is a knob to turn on kernel malloc filling, but it wouldn't be > > hard... > > You want to do it in UMA, not in malloc() / free(). The reason I didn't suggest UMA is that UMA already has functions that do the cleaning when destroying an object... You can't just zero UMA objects on free w/o calling fini, otherwise you might leak resources.. Plus, it would be a lot of work to fix all the UMA consumers to make sure that their uminit/fini fuctions do the proper cleaning necessary... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."