From mboxrd@z Thu Jan 1 00:00:00 1970 Sender: Ingo Molnar Date: Tue, 17 Jul 2018 09:12:23 +0200 From: Ingo Molnar Subject: Re: [PATCH v14 0/6] Introduce the STACKLEAK feature and a test for it Message-ID: <20180717071223.GA29533@gmail.com> References: <20180712135944.GB6199@gmail.com> <20180712205016.GA20649@gmail.com> <50c690fc-c967-8376-8524-ac9c1be722bc@linux.com> <20180715224446.GA29087@gmail.com> <20180716101337.GA30279@gmail.com> <7e673919-4c6a-0120-a198-a0ed4ee47b36@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7e673919-4c6a-0120-a198-a0ed4ee47b36@linux.com> To: Alexander Popov Cc: Kees Cook , Linus Torvalds , Kernel Hardening , Pax Team , Brad Spengler , Andrew Lutomirski , Tycho Andersen , Laura Abbott , Mark Rutland , Ard Biesheuvel , Borislav Petkov , Richard Sandiford , Thomas Gleixner , 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 , Nick Piggin , Al Viro , David Miller , dingtianhong , David Woodhouse , Josh Poimboeuf , Steven Rostedt , Dominik Brodowski , =?iso-8859-1?Q?J=FCrgen_Gro=DF?= , Greg Kroah-Hartman , Dan Williams , Dave Hansen , Mathias Krause , Vikas Shivappa , Kyle Huey , Dmitry Safonov , Will Deacon , Arnd Bergmann , Florian Weimer , Boris Lukashev , Andrey Konovalov , the arch/x86 maintainers , Linux Kernel Mailing List List-ID: * Alexander Popov wrote: > > ... which would keep it initialized and wouldn't be racy, right? > > No, this will break the poison search logic. Ok. > > I.e. only the most expensive part of the function, the scanning, would be > > turned off via the sysctl. I submit that this will avoid all measurable > > aspects of the 1% kbuild performance overhead. > > Yes, I've made an experiment - skipping stackleak_erase() cuts almost all > performance penalty of the feature. Ok, that's good! > > A more involved approach can be done in the future if warranted, and the feature > > could be disabled/enabled more thoroughly - but the runtime sysctl would be > > acceptable for me for now, as a first iteration. > > Thanks, I see your point. > I'll return with an additional patch introducing sysctl knob + static key for > one-time disabling of stack erasing. Thank you! I'll have a final review of the patch but I guess it will be fine, so if that's the only change then you can also include my: Acked-by: Ingo Molnar ... to not hold the patch up for v4.19, and this can go upstream via Kees's tree? Ingo