LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Borislav Petkov <bp@alien8.de>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [RFD] x86: The future of MPX
Date: Sat, 28 Apr 2018 11:18:23 +0200	[thread overview]
Message-ID: <20180428091823.h3iajtxkqdwdcpst@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1804272122390.1596@nanos.tec.linutronix.de>


* Thomas Gleixner <tglx@linutronix.de> wrote:

> Dave,
> 
> I've got the following MPX related information:
> 
>  .... But they [Intel] certainly haven't maintained the whole MPX support
>  in GCC at all since two or three years (e.g. bootstrap with MPX was broken
>  since forever), so now it's gone from GCC. ....
> 
> and I know that GCC is discussing MPX removal since May last year at least.
> To the best of my knowledge clang does not support it either.
> 
> So what's the state of this stuff? If we don't have a compiler supporting
> it how on earth is that useful or even testable for anyone who does not
> have access to some magic Intel internal compiler version?
> 
> If that's the sad state of affairs, then we just should move the whole
> stuff into staging or simply queue it for removal in 4.18.

I just tried the MPX testcases with the latest kernel:

 deimos:~/tip/tools/testing/selftests/x86> ./mpx-mini-test_64 
 XSAVE is supported by HW & OS
 XSAVE processor supported state mask: 0x21f
 XSAVE OS supported state mask: 0x21f
  BNDREGS: size: 64 user: 1 supervisor: 0 aligned: 0
   BNDCSR: size: 64 user: 1 supervisor: 0 aligned: 0
 mpx-mini-test_64: mpx-mini-test.c:58: write_int_to: Assertion `fd >= 0' failed.
 Aborted (core dumped)

 deimos:~/tip/tools/testing/selftests/x86> ./mpx-mini-test_32 
 XSAVE is supported by HW & OS
 XSAVE processor supported state mask: 0x21f
 XSAVE OS supported state mask: 0x21f
  BNDREGS: size: 64 user: 1 supervisor: 0 aligned: 0
   BNDCSR: size: 64 user: 1 supervisor: 0 aligned: 0
 mpx-mini-test_32: mpx-mini-test.c:58: write_int_to: Assertion `fd >= 0' failed.
 Aborted (core dumped)

... and both of them crashed.

The CPU has MPX support and the kernel has CONFIG_X86_INTEL_MPX=y:

 deimos:~> dmesg | grep -i mpx
 [    0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
 [    0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'

Thanks,

	Ingo

  reply	other threads:[~2018-04-28  9:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27 19:37 Thomas Gleixner
2018-04-28  9:18 ` Ingo Molnar [this message]
2018-04-28 16:36   ` Linus Torvalds
2018-04-28 16:44     ` Linus Torvalds
2018-04-30  4:44       ` Dave Hansen
2018-05-02 14:00         ` Borislav Petkov
2018-05-03 16:23           ` Eric W. Biederman
2018-04-28 17:50     ` Ingo Molnar
2018-04-29  4:46       ` Eric W. Biederman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180428091823.h3iajtxkqdwdcpst@gmail.com \
    --to=mingo@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [RFD] x86: The future of MPX' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).