[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1515459342.4423.86.camel@infradead.org>
Date: Tue, 09 Jan 2018 00:55:42 +0000
From: David Woodhouse <dwmw2@...radead.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"tim.c.chen@...ux.intel.com" <tim.c.chen@...ux.intel.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
"riel@...hat.com" <riel@...hat.com>,
"keescook@...gle.com" <keescook@...gle.com>,
"gnomes@...rguk.ukuu.org.uk" <gnomes@...rguk.ukuu.org.uk>,
"pjt@...gle.com" <pjt@...gle.com>,
"dave.hansen@...el.com" <dave.hansen@...el.com>,
"luto@...capital.net" <luto@...capital.net>,
"jikos@...nel.org" <jikos@...nel.org>,
"gregkh@...ux-foundation.org" <gregkh@...ux-foundation.org>
Subject: Re: [PATCH v6 11/10] x86/retpoline: Avoid return buffer underflows
on context switch
On Mon, 2018-01-08 at 16:48 -0800, Linus Torvalds wrote:
> On Mon, Jan 8, 2018 at 4:42 PM, David Woodhouse <dwmw2@...radead.org> wrote:
> >
> >
> > Hm... on a context switch you're reloading the registers that were in
> > the other saved context.
>
> Actually, iirc we used to very actively try to minimize that by having
> the inline asm mark a lot of registers as clobbered.
Sure, in that case it makes sense purely as a matter of hygiene to
explicitly clear the registers which were marked as clobbered.
In the original patch set from that Intel were collecting — before they
threw it all out the fucking window and started again from scratch on
the day the embargo broke — there were patches to do the same thing on
syscall entry too, for precisely the same reason.
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (5213 bytes)
Powered by blists - more mailing lists