Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1393091

Re: [PATCH] [RFC] x86: work around MPX Erratum

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] [RFC] x86: work around MPX Erratum
Date 2016-05-03 08:50 +0200
Message-ID <ruCjE-309-13@gated-at.bofh.it> (permalink)
References <ruucp-3Fl-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* Dave Hansen <dave@sr71.net> wrote:

> 
> From: Dave Hansen <dave.hansen@linux.intel.com>
> 
> Big core processors (Xeon/Core) are affected by an MPX erratum.
> This erratum can only be triggered when a system is not using
> Supervisor Mode Execution Prevention (SMEP).  To work around
> this, we ensure that MPX can only be used in cases where SMEP is
> present in the processor and enabled.

That's fair enough IMHO.

> MPX and SMEP are present together in the *vast* majority of
> cases, and the kernel does not generally execute code that is
> readable by userspace, so the real-world impact of this issue is
> expected to be very limited.
> 
> Note that we don't have a good way to tell if we are on an
> unaffected Atom processor or an affected Core/Xeon.  The
> solution for the moment is to just be conservative and assume
> that everything is affected unless explicitly known to be
> unaffected.

> +static int is_mpx_affected_microarch(struct cpuinfo_x86 *c)
> +{
> +	/* Only family 6 is affected */
> +	if (c->x86 != 0x6)
> +		return 0;
> +
> +	/* We know these Atom models are unaffected, for sure */
> +	switch (c->x86_model) {
> +	case 0x5F: /* "Future Intel Atom ... Goldmont */
> +	case 0x5C: /* "Future Intel Atom ... Goldmont */
> +	     return 0;
> +	}
> +	/*
> +	 * We will get here on future unknown processors and all
> +	 * Core/Xeons.  They might be unaffected Atoms or
> +	 * affected Core/Xeons. Be conservative and assume
> +	 * processor is affected.
> +	 *
> +	 * Once the complete list of Core/Xeon models is known
> +	 * it can be added here, and the Atom list removed.
> +	 */
> +	return 1;

So instead of trying to sort out the erratum, could we not just generally make MPX 
dependent on SMEP and be done with it? MPX is a sophisticated security feature, 
and it makes little sense to not do SMEP if you have it available.

Anyone who is absolutely desperate to disable SMEP while enabling MPX is free to 
step in and make his case.

I.e. I think the simplest workaround would be to disable MPX if SMEP is disabled.

Thanks,

	Ingo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] [RFC] x86: work around MPX Erratum Dave Hansen <dave@sr71.net> - 2016-05-03 00:10 +0200
  Re: [PATCH] [RFC] x86: work around MPX Erratum Ingo Molnar <mingo@kernel.org> - 2016-05-03 08:50 +0200
    Re: [PATCH] [RFC] x86: work around MPX Erratum Dave Hansen <dave.hansen@intel.com> - 2016-05-03 23:10 +0200
      Re: [PATCH] [RFC] x86: work around MPX Erratum Borislav Petkov <bp@alien8.de> - 2016-05-03 23:20 +0200
        Re: [PATCH] [RFC] x86: work around MPX Erratum Dave Hansen <dave.hansen@intel.com> - 2016-05-03 23:30 +0200
          Re: [PATCH] [RFC] x86: work around MPX Erratum Linus Torvalds <torvalds@linux-foundation.org> - 2016-05-03 23:40 +0200
          Re: [PATCH] [RFC] x86: work around MPX Erratum Borislav Petkov <bp@alien8.de> - 2016-05-03 23:50 +0200
      Re: [PATCH] [RFC] x86: work around MPX Erratum Linus Torvalds <torvalds@linux-foundation.org> - 2016-05-03 23:40 +0200
        Re: [PATCH] [RFC] x86: work around MPX Erratum Andy Lutomirski <luto@amacapital.net> - 2016-05-03 23:50 +0200
      Re: [PATCH] [RFC] x86: work around MPX Erratum Andy Lutomirski <luto@amacapital.net> - 2016-05-03 23:40 +0200
        Re: [PATCH] [RFC] x86: work around MPX Erratum Dave Hansen <dave.hansen@intel.com> - 2016-05-03 23:50 +0200
          Re: [PATCH] [RFC] x86: work around MPX Erratum Andy Lutomirski <luto@amacapital.net> - 2016-05-04 00:00 +0200
            Re: [PATCH] [RFC] x86: work around MPX Erratum Ingo Molnar <mingo@kernel.org> - 2016-05-04 08:50 +0200
              Re: [PATCH] [RFC] x86: work around MPX Erratum Andy Lutomirski <luto@amacapital.net> - 2016-05-05 19:20 +0200
                Re: [PATCH] [RFC] x86: work around MPX Erratum Ingo Molnar <mingo@kernel.org> - 2016-05-05 20:50 +0200
                Re: [PATCH] [RFC] x86: work around MPX Erratum Andy Lutomirski <luto@amacapital.net> - 2016-05-06 21:10 +0200

csiph-web