From owner-svn-src-all@freebsd.org Tue Jul 5 08:30:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6655B204BF; Tue, 5 Jul 2016 08:30:28 +0000 (UTC) (envelope-from dc552@hermes.cam.ac.uk) Received: from ppsw-31.csi.cam.ac.uk (ppsw-31.csi.cam.ac.uk [131.111.8.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98AAE1D56; Tue, 5 Jul 2016 08:30:28 +0000 (UTC) (envelope-from dc552@hermes.cam.ac.uk) X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from cpc91230-cmbg18-2-0-cust661.5-4.cable.virginm.net ([82.1.230.150]:55858 helo=[192.168.0.7]) by ppsw-31.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:465) with esmtpsa (PLAIN:dc552) (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1bKLkO-000Ruv-LL (Exim 4.86_36-e07b163) (return-path ); Tue, 05 Jul 2016 09:30:24 +0100 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r302252 - head/sys/kern From: David Chisnall In-Reply-To: Date: Tue, 5 Jul 2016 09:30:24 +0100 Cc: Ed Schouten , Benjamin Kaduk , Bruce Evans , Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <453A6F3B-6488-4ACC-AD82-60E4AE7A150A@cl.cam.ac.uk> References: <201606281643.u5SGhNsi061606@repo.freebsd.org> <20160629175917.O968@besplex.bde.org> <20160629145443.GG38613@kib.kiev.ua> <20160629153233.GI38613@kib.kiev.ua> <20160630040123.F791@besplex.bde.org> <20160629211953.GK38613@kib.kiev.ua> <20160701005401.Q1084@besplex.bde.org> <20160630180106.GU38613@kib.kiev.ua> <20160701031549.GV38613@kib.kiev.ua> <20160701185743.Q1600@besplex.bde.org> <20160701142516.GW38613@kib.kiev.ua> <20160702153817.O1458@besplex.bde.org> To: Adrian Chadd X-Mailer: Apple Mail (2.3124) Sender: "Dr D. Chisnall" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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: Tue, 05 Jul 2016 08:30:29 -0000 On 4 Jul 2016, at 21:09, Adrian Chadd wrote: >=20 > Right, so if we're not careful, we could leak bits of kernel memory, > and it can also screw up key cache comparisons. >=20 > (I asked this question because I've been screwed by it recentlyish, > and it looks like the latest C standard didn't fix it..) It was discussed at the WG14 meeting in London in April, but I don=E2=80=99= t think that there was a clear consensus. It gets particularly tricky = for _Atomic types, and I think that there=E2=80=99s now a clarification = (or will be in C2x, if not) that any padding in _Atomic types is zeroed. Generally, compilers will turn this into a bzero and then a set of the = remaining fields, so you=E2=80=99re likely to end up with the right = thing, but it=E2=80=99s not guaranteed by the standard. David