|
Message-ID: <20190806123552.GB25897@zn.tnic> Date: Tue, 6 Aug 2019 14:35:53 +0200 From: Borislav Petkov <bp@...en8.de> To: Peter Zijlstra <peterz@...radead.org>, Steven Rostedt <rostedt@...dmis.org> Cc: Thomas Garnier <thgarnie@...omium.org>, Kernel Hardening <kernel-hardening@...ts.openwall.com>, Kristen Carlson Accardi <kristen@...ux.intel.com>, Kees Cook <keescook@...omium.org>, Andy Lutomirski <luto@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, "H. Peter Anvin" <hpa@...or.com>, the arch/x86 maintainers <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v9 04/11] x86/entry/64: Adapt assembly for PIE support + rostedt. Steve, pls have a look at the patch at the beginning of this thread as it touches the reentrant NMI magic. :) Thx. On Tue, Aug 06, 2019 at 10:30:32AM +0200, Peter Zijlstra wrote: > On Tue, Aug 06, 2019 at 07:08:51AM +0200, Borislav Petkov wrote: > > On Mon, Aug 05, 2019 at 10:50:30AM -0700, Thomas Garnier wrote: > > > I saw that %rdx was used for temporary usage and restored before the > > > end so I assumed that it was not an option. > > > > PUSH_AND_CLEAR_REGS saves all regs earlier so I think you should be > > able to use others. Like SAVE_AND_SWITCH_TO_KERNEL_CR3/RESTORE_CR3, for > > example, uses %r15 and %r14. > > AFAICT the CONFIG_DEBUG_ENTRY thing he's changing is before we setup > pt_regs. > > Also consider the UNWIND hint that's in there, it states we only have > the IRET frame on stack, not a full regs set. Ok, after discussing it on IRC, I guess let's leave it like that. I guess little ugly is better than a lot more ugly if we're wanting to attempt to free up some regs here to save us the rax preservation. Probably not worth the effort by a long shot. Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.
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.