Date: Mon, 4 Jul 2016 13:09:19 -0700 From: Adrian Chadd <adrian.chadd@gmail.com> To: Ed Schouten <ed@nuxi.nl> Cc: Benjamin Kaduk <bjkfbsd@gmail.com>, Bruce Evans <brde@optusnet.com.au>, Konstantin Belousov <kostikbel@gmail.com>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org> Subject: Re: svn commit: r302252 - head/sys/kern Message-ID: <CAJ-Vmo=1-PbZWdB%2B06bqMH3WBQ-pU6tyR8FjH5eVksVmxb3yQA@mail.gmail.com> In-Reply-To: <CABh_MKmvGFy81ws8G4N-cMPLMYhVVkVzZfQAK2SwAZsxRu%2Bpag@mail.gmail.com> 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> <CAJ5_RoA-d8YGeFHEiGziOU6VutfuX6cHh%2BJ4YGYPcLhVv77B3w@mail.gmail.com> <CABh_MKmjSJoLYMAsrtgxfZVpedpX9wDz7osFrsz63qawdOkWLQ@mail.gmail.com> <CABh_MKm1Zat%2By22O5JfBX9vt8=e5dmULqUUELHZXHMpVAjopDA@mail.gmail.com> <CAJ-VmokVp8QmKX6VRMeKn=Er_SG7V=MNJVHyzr%2ByXcN6cRstYw@mail.gmail.com> <CABh_MKmvGFy81ws8G4N-cMPLMYhVVkVzZfQAK2SwAZsxRu%2Bpag@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 4 July 2016 at 12:28, Ed Schouten <ed@nuxi.nl> wrote: > 2016-07-04 21:08 GMT+02:00 Adrian Chadd <adrian.chadd@gmail.com>: >> Does the specification / implementation also mandate that the padding >> is zero'ed out or otherwise initialised? > > Well... That's tricky: > > https://stackoverflow.com/questions/13056364/is-zero-initialization-of-structures-guaranteed-to-wipe-padded-areas > https://gustedt.wordpress.com/2012/10/24/c11-defects-initialization-of-padding/ Right, so if we're not careful, we could leak bits of kernel memory, and it can also screw up key cache comparisons. (I asked this question because I've been screwed by it recentlyish, and it looks like the latest C standard didn't fix it..) -adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=1-PbZWdB%2B06bqMH3WBQ-pU6tyR8FjH5eVksVmxb3yQA>