Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 12 Mar 2018 10:21:08 +0100
From: Ingo Molnar <>
To: Ard Biesheuvel <>
Cc: Linus Torvalds <>,
	Steven Rostedt <>, Arnd Bergmann <>,
	Daniel Micay <>,
	Kees Cook <>,
	Dave Hansen <>,
	Alexander Popov <>,
	Kernel Hardening <>,
	PaX Team <>,
	Brad Spengler <>,
	Andy Lutomirski <>, Tycho Andersen <>,
	Laura Abbott <>,
	Mark Rutland <>, Borislav Petkov <>,
	Richard Sandiford <>,
	Thomas Gleixner <>,
	"H . Peter Anvin" <>,
	Peter Zijlstra <>,
	"Dmitry V . Levin" <>,
	Emese Revfy <>, Jonathan Corbet <>,
	Andrey Ryabinin <>,
	"Kirill A . Shutemov" <>,
	Thomas Garnier <>,
	Andrew Morton <>,
	Alexei Starovoitov <>, Josef Bacik <>,
	Masami Hiramatsu <>,
	Nicholas Piggin <>,
	Al Viro <>,
	"David S . Miller" <>,
	Ding Tianhong <>,
	David Woodhouse <>,
	Josh Poimboeuf <>,
	Dominik Brodowski <>,
	Juergen Gross <>,
	Greg Kroah-Hartman <>,
	Dan Williams <>,
	Mathias Krause <>,
	Vikas Shivappa <>,
	Kyle Huey <>,
	Dmitry Safonov <>,
	Will Deacon <>, X86 ML <>,
	LKML <>
Subject: Re: [PATCH RFC v9 4/7] x86/entry: Erase kernel stack in

* Ard Biesheuvel <> wrote:

> > Is it possible to implement this "safe automatic variable initialization" language
> > feature via a GCC plugin robustly, while still keeping code generation sane? (i.e.
> > no forced allocation of stack slots, etc.) It should be a superset of
> I think that should be feasible, yes.
> It would be worth trying whether the current code can be simplified, though: it 
> currently takes care not to add such an initialization if it can already spot 
> one, but I wonder whether just blindly adding one at the start and letting the 
> compiler optimize it away again is safer.

Absolutely - followed by:

 - a good look at the resulting code generation with a reasonably uptodate GCC

 - a look at the resulting code with older GCCs, to make sure there's no 
   pathological code generation

... because IMHO in the end it is the practical effects that will make (or break) 
any such attempt.

( BTW., initializing all automatic variables might even speed up certain
  optimization passes, FWIIW. )



Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.