From owner-freebsd-current@FreeBSD.ORG Mon Dec 23 19:43:50 2013 Return-Path: Delivered-To: freebsd-current@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 ESMTPS id 6F755414; Mon, 23 Dec 2013 19:43:50 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48422190A; Mon, 23 Dec 2013 19:43:50 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 73589B964; Mon, 23 Dec 2013 14:43:46 -0500 (EST) From: John Baldwin To: freebsd-current@freebsd.org, sbruno@freebsd.org Subject: Re: kasserts behind invariants Date: Mon, 23 Dec 2013 11:36:09 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1386971425.37172.9.camel@powernoodle.corp.yahoo.com> In-Reply-To: <1386971425.37172.9.camel@powernoodle.corp.yahoo.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201312231136.09487.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 23 Dec 2013 14:43:46 -0500 (EST) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 19:43:50 -0000 On Friday, December 13, 2013 4:50:25 pm Sean Bruno wrote: > I guess this may have been argued before, but I don't see why we would > want to hide specific things like: sys/kern/subr_lock.c > > /* Check for double-init and zero object. */ > KASSERT(!lock_initalized(lock), ("lock \"%s\" %p already initialized", > name, lock)); > > If I hadn't completely missed the fact that I had INVARIANTS activated, > I'd never have found out why this vendor driver was being so completely > stupid and crashing my machine. > > If I find things like this that I want old KASSERT behavior on (panic if > true) and I don't want to run INVARIANTS, is that possible? KASSERT has never been enabled sans INVARIANTS. -- John Baldwin