From owner-cvs-all@FreeBSD.ORG Sun Jul 4 17:03:43 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91F8016A4CE; Sun, 4 Jul 2004 17:03:43 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA09B43D49; Sun, 4 Jul 2004 17:03:40 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from samsco.org (junior-wifi.samsco.home [192.168.0.11]) (authenticated bits=0) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id i64H88Zd086418; Sun, 4 Jul 2004 11:08:08 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <40E8385C.5000708@samsco.org> Date: Sun, 04 Jul 2004 11:03:24 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040304 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brian Fundakowski Feldman References: <200407041559.i64FxPpj048980@repoman.freebsd.org> <20040704160339.GA997@green.homeunix.org> In-Reply-To: <20040704160339.GA997@green.homeunix.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/vm uma_core.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2004 17:03:43 -0000 Brian Fundakowski Feldman wrote: > On Sun, Jul 04, 2004 at 03:59:25PM +0000, Brian Feldman wrote: > >>green 2004-07-04 15:59:25 UTC >> >> FreeBSD src repository >> >> Modified files: >> sys/vm uma_core.c >> Log: >> Reextend the M_WAITOK-disabling-hack to all three of the mbuf-related >> zones, and do it by direct comparison of uma_zone_t instead of strcmp. >> >> The mbuf subsystem used to provide M_TRYWAIT/M_DONTWAIT semantics, but >> this is mostly no longer the case. M_WAITOK has taken over the spot >> M_TRYWAIT used to have, and for mbuf things, still may return NULL if >> the code path is incorrectly holding a mutex going into mbuf allocation >> functions. >> >> The M_WAITOK/M_NOWAIT semantics are absolute; though it may deadlock >> the system to try to malloc or uma_zalloc something with a mutex held >> and M_WAITOK specified, it is absolutely required to not return NULL >> and will result in instability and/or security breaches otherwise. >> There is still room to add the WITNESS_WARN() to all cases so that >> we are notified of the possibility of deadlocks, but it cannot change >> the value of the "badness" variable and allow allocation to actually >> fail except for the specialized cases which used to be M_TRYWAIT. > > > Any subsequent desire to change the semantics of malloc(9) or > uma_zalloc(9) in the M_WAITOK case, such as this, absolutely must be > taken up with the Security Officer. > I'd like you to take this argument OUT of the cvs repository _NOW_ and resolve it with the MBUMA and (optionally) UMA maintainers. This behaviour is totally unacceptable regardless of the technical merits. Scott