From owner-svn-src-all@freebsd.org Sat May 26 21:07:52 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 10566EF64DE; Sat, 26 May 2018 21:07:52 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2BC908119C; Sat, 26 May 2018 21:07:50 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id MgPdfcC8DSzNNMgPef70CY; Sat, 26 May 2018 15:07:44 -0600 X-Authority-Analysis: v=2.3 cv=KuxjJ1eN c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=VUJBJC2UJ8kA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=hA4b-PTsxkxz0TBfH-0A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 0F6CB1C2C; Sat, 26 May 2018 14:07:41 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w4QL7dkk041582; Sat, 26 May 2018 14:07:39 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w4QL7d4F041579; Sat, 26 May 2018 14:07:39 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201805262107.w4QL7d4F041579@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Gleb Smirnoff cc: Mateusz Guzik , "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 In-Reply-To: Message from Gleb Smirnoff of "Wed, 23 May 2018 21:47:46 -0700." <20180524044746.GX71675@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 26 May 2018 14:07:38 -0700 X-CMAE-Envelope: MS4wfN1Up08bPyp4FPcfwNW1vDO8qEo1eKtO4uZsaHV1gaHcVDhxDoivCDFYL3pq8GXNgD6SMVeyR0xtabciRphAUThVtYH3l6E98kyM6hUzHlphD/hNeAe/ XEq9YgnOgFOkLVQgo/kemNIzquATTkvXlBEpgEFwPRFlavv5pHiitq81kFV47amqhWwszDt7EdTJL4ceGxwiNUixy5qxaupL8bPCv6fU7riz1QQUOIT8Y2N9 O6V8NxKyQfFrfeB7a18M+u3L14YNSLDDEOACQSBb0PSlkIRGfwP/U+MAwMUL0DUQCjFRh/N5M8P8rSVDPfaZRplVwxGsjsVPGw10Hfe0pKIBs5QjcPBX+pki rS60c7sI2Phk6Fl68aTUGBo4M3iqbw== 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: Sat, 26 May 2018 21:07:52 -0000 In message <20180524044746.GX71675@FreeBSD.org>, Gleb Smirnoff writes: > 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? +1. I think phab might help. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.