From owner-svn-src-all@freebsd.org Thu May 24 04:47:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BFE6EFCCAA; Thu, 24 May 2018 04:47:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DD48473500; Thu, 24 May 2018 04:47:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id w4O4lk1G086998 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 May 2018 21:47:47 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id w4O4lkvI086997; Wed, 23 May 2018 21:47:46 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 23 May 2018 21:47:46 -0700 From: Gleb Smirnoff To: Mateusz Guzik Cc: "Jonathan T. Looney" , Matthew Macy , John Baldwin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334104 - in head/sys: netinet sys Message-ID: <20180524044746.GX71675@FreeBSD.org> References: <201805231700.w4NH05hs047395@repo.freebsd.org> <2281830.zrSQodBeDb@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 04:47:49 -0000 On Thu, May 24, 2018 at 06:44:20AM +0200, Mateusz Guzik wrote: M> I fundamentally disagree with this part. M> M> If a known value of a given field is needed for assertion purposes, you M> can add (possibly conditional) code setting this specific value. It M> probably should not be zero if it can be helped. M> M> Conditional zeroing of the *whole* struct depending on invariants will M> *hide* uninitialized memory read bugs - production kernel will have M> whatever it happens to find, while *debug* kernel will guarantee to M> have all the values zeroed. In fact the flag actively combats redzoning. M> if the resulting allocation is zeroed, poisoning is actively neutered. M> But only if debug is enabled. M> M> That said, I find the change harmful. +1 on fundamentally disagree with M_ZERO_INVARIANTS. It makes the INVARIANTS-enabled kernels to crash _later_ than production kernels, since instead of uma_junk it places clean zeroes. May be changes like that deserve more than a 30 minute time frame for review? -- Gleb Smirnoff