[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f768c4e8085b45889971d623aeded560@AcuMS.aculab.com>
Date: Mon, 8 Mar 2021 10:01:20 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Peter Zijlstra' <peterz@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
CC: Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
"Namhyung Kim" <namhyung@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: RE: "struct perf_sample_data" alignment
...
> What I remember is that since perf_sample_data is fairly large,
> unconditionally initializing the whole thing is *slow* (and
> -fauto-var-init=zero will hurt here).
That will hurt everywhere.
I can also imagine it hiding bugs and making people
shrink on-stack arrays to the point where they either overrun
or cause an unexpected error or string truncation.
Initialising to zero is a bad choice if the aim is to
avoid leaking stack.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists