lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bd3126fff15641098af2a4ac2164f3c4@AcuMS.aculab.com>
Date:   Tue, 21 Jan 2020 14:59:35 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Peter Zijlstra' <peterz@...radead.org>,
        Steven Rostedt <rostedt@...dmis.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Jiri Olsa <jolsa@...nel.org>,
        "Naveen N . Rao" <naveen.n.rao@...ux.ibm.com>,
        "Anil S Keshavamurthy" <anil.s.keshavamurthy@...el.com>,
        "David S . Miller" <davem@...emloft.net>,
        Namhyung Kim <namhyung@...nel.org>,
        Toke Høiland-Jørgensen <thoiland@...hat.com>,
        "Jean-Tsung Hsiao" <jhsiao@...hat.com>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        "Masami Hiramatsu" <mhiramat@...nel.org>
Subject: RE: [for-linus][PATCH 2/5] tracing/uprobe: Fix double perf_event
 linking on multiprobe uprobe

From: Peter Zijlstra
> Sent: 21 January 2020 14:50
> On Tue, Jan 21, 2020 at 09:38:49AM -0500, Steven Rostedt wrote:
> > diff --git a/kernel/trace/trace_probe.h b/kernel/trace/trace_probe.h
> > index 4ee703728aec..03e4e180058d 100644
> > --- a/kernel/trace/trace_probe.h
> > +++ b/kernel/trace/trace_probe.h
> > @@ -230,6 +230,7 @@ struct trace_probe_event {
> >  	struct trace_event_call		call;
> >  	struct list_head 		files;
> >  	struct list_head		probes;
> > +	char				data[0];
> >  };
> 
> Note that this relies on pure 'luck'. If you stick anything <4 bytes in
> between the list_head and the data member it'll come unstuck real fast.

Can you fix it by adding an unnamed struct as in:

struct trace_probe_event {
    	struct {
		struct trace_event_call		call;
		struct list_head 		files;
		struct list_head		probes;
	};
	char				data[0];
};

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ