Re: [PATCH] x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid()

2021-06-25 Thread Luck, Tony
On Wed, Jun 09, 2021 at 04:34:31PM -0700, Andy Lutomirski wrote: > On 6/9/21 10:32 AM, Luck, Tony wrote: > >>> I've told Fenghua to dig out the previous iteration of this patch where > >>> the plan was to lazily fix the PASID_MSR in other threads in the #GP > >>> handler. > >> > >> Blech. Also

Re: [PATCH] x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid()

2021-06-09 Thread Andy Lutomirski
On 6/9/21 10:32 AM, Luck, Tony wrote: >>> I've told Fenghua to dig out the previous iteration of this patch where >>> the plan was to lazily fix the PASID_MSR in other threads in the #GP >>> handler. >> >> Blech. Also this won't work for other PASID-like features. >> >> I have a half-written

RE: [PATCH] x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid()

2021-06-09 Thread Luck, Tony
>> I've told Fenghua to dig out the previous iteration of this patch where >> the plan was to lazily fix the PASID_MSR in other threads in the #GP >> handler. > > Blech. Also this won't work for other PASID-like features. > > I have a half-written patch to fix this up for real. Stay tuned.

Re: [PATCH] x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid()

2021-06-03 Thread Andy Lutomirski
On 6/2/21 1:37 PM, Luck, Tony wrote: >>> ... so on a PASID system, your trivial reproducer would theoretically >>> fire the same way and corrupt FPU state just as well. >> >> This is worse and you can't selftest it because the IPI can just hit in >> the middle of _any_ FPU state operation and

Re: [PATCH] x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid()

2021-06-03 Thread Borislav Petkov
On Thu, Jun 03, 2021 at 06:17:04PM +0530, Vinod Koul wrote: > You can add: > > Acked-By: Vinod Koul Done. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette ___ iommu mailing list

Re: [PATCH] x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid()

2021-06-03 Thread Vinod Koul
On 03-06-21, 13:42, Borislav Petkov wrote: > On Thu, Jun 03, 2021 at 04:50:26PM +0530, Vinod Koul wrote: > > Applied, thanks > > Actually, I'd prefer if I take it through the tip tree: > > https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=x86/urgent > > because it is needed for

Re: [PATCH] x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid()

2021-06-03 Thread Borislav Petkov
On Thu, Jun 03, 2021 at 04:50:26PM +0530, Vinod Koul wrote: > Applied, thanks Actually, I'd prefer if I take it through the tip tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=x86/urgent because it is needed for the following patch by tglx: 6867ee8bcb75

Re: [PATCH] x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid()

2021-06-03 Thread Vinod Koul
On 02-06-21, 12:14, Borislav Petkov wrote: > --- > From: Borislav Petkov > Date: Wed, 2 Jun 2021 12:07:52 +0200 > Subject: [PATCH] dmaengine: idxd: Use cpu_feature_enabled() > > When testing x86 feature bits, use cpu_feature_enabled() so that > build-disabled features can remain off, regardless

RE: [PATCH] x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid()

2021-06-02 Thread Luck, Tony
>> ... so on a PASID system, your trivial reproducer would theoretically >> fire the same way and corrupt FPU state just as well. > > This is worse and you can't selftest it because the IPI can just hit in > the middle of _any_ FPU state operation and corrupt state. That sounds like we should

Re: [PATCH] x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid()

2021-06-02 Thread Thomas Gleixner
On Wed, Jun 02 2021 at 12:14, Borislav Petkov wrote: > On Sat, May 29, 2021 at 11:17:30AM +0200, Thomas Gleixner wrote: >> --- a/arch/x86/include/asm/disabled-features.h >> +++ b/arch/x86/include/asm/disabled-features.h >> @@ -56,11 +56,8 @@ >> # define DISABLE_PTI(1 <<

Re: [PATCH] x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid()

2021-06-02 Thread Borislav Petkov
On Sat, May 29, 2021 at 11:17:30AM +0200, Thomas Gleixner wrote: > --- a/arch/x86/include/asm/disabled-features.h > +++ b/arch/x86/include/asm/disabled-features.h > @@ -56,11 +56,8 @@ > # define DISABLE_PTI (1 << (X86_FEATURE_PTI & 31)) > #endif > > -#ifdef CONFIG_IOMMU_SUPPORT > -#

Re: [PATCH] x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid()

2021-05-31 Thread Thomas Gleixner
On Mon, May 31 2021 at 10:43, Borislav Petkov wrote: > On Sat, May 29, 2021 at 11:17:30AM +0200, Thomas Gleixner wrote: >> #2 is broken beyond repair. The comment in the code claims that it is safe >>to invoke this in an IPI, but that's just wishful thinking. >> >>FPU state of a running

Re: [PATCH] x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid()

2021-05-31 Thread Borislav Petkov
On Sat, May 29, 2021 at 11:17:30AM +0200, Thomas Gleixner wrote: > While digesting the XSAVE related horrors, which got introduced with the > supervisor/user split, the recent addition of ENQCMD related functionality > got on the radar and turned out to be similarly broken. > > update_pasid(),

[PATCH] x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid()

2021-05-29 Thread Thomas Gleixner
While digesting the XSAVE related horrors, which got introduced with the supervisor/user split, the recent addition of ENQCMD related functionality got on the radar and turned out to be similarly broken. update_pasid(), which is only required when X86_FEATURE_ENQCMD is available, is invoked from