Date: Fri, 02 Oct 2015 10:54:53 -0700 From: Rui Paulo <rpaulo@me.com> To: Andriy Gapon <avg@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r288362 - head/sys/cddl/dev/sdt Message-ID: <1443808493.13078.11.camel@me.com> In-Reply-To: <201509291158.t8TBwLd1052484@repo.freebsd.org> References: <201509291158.t8TBwLd1052484@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2015-09-29 at 11:58 +0000, Andriy Gapon wrote: > Author: avg > Date: Tue Sep 29 11:58:21 2015 > New Revision: 288362 > URL: https://svnweb.freebsd.org/changeset/base/288362 > > Log: > sdt: start checking version field when parsing probe definitions > > This is an extra safety measure. > > MFC after: 21 days > > Modified: > head/sys/cddl/dev/sdt/sdt.c > > Modified: head/sys/cddl/dev/sdt/sdt.c > ===================================================================== > ========= > --- head/sys/cddl/dev/sdt/sdt.c Tue Sep 29 11:55:26 2015 > (r288361) > +++ head/sys/cddl/dev/sdt/sdt.c Tue Sep 29 11:58:21 2015 > (r288362) > @@ -141,6 +141,12 @@ sdt_create_probe(struct sdt_probe *probe > char *to; > size_t len; > > + if (probe->version != (int)sizeof(*probe)) { > + printf("ignoring probe %p, version %u expected > %u\n", > + probe, probe->version, (int)sizeof(*probe)); > + return; > + } > + > Not picking on your change, but this version management sounds like a bad idea to me... -- Rui Paulo
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1443808493.13078.11.camel>