From: Ren Qiaowei <qiaowei.ren@intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/4] Intel MPX support
Date: Sun, 26 Jan 2014 16:20:33 +0800 [thread overview]
Message-ID: <52E4C551.7020402@intel.com> (raw)
In-Reply-To: <20140126081912.GA28831@gmail.com>
On 01/26/2014 04:19 PM, Ingo Molnar wrote:
>
> * Qiaowei Ren <qiaowei.ren@intel.com> wrote:
>
>> This patchset adds support for the Memory Protection Extensions
>> (MPX) feature found in future Intel processors.
>>
>> MPX can be used in conjunction with compiler changes to check memory
>> references, for those references whose compile-time normal intentions
>> are usurped at runtime due to buffer overflow or underflow.
>>
>> MPX provides this capability at very low performance overhead for
>> newly compiled code, and provides compatibility mechanisms with legacy
>> software components. MPX architecture is designed allow a machine to
>> run both MPX enabled software and legacy software that is MPX unaware.
>> In such a case, the legacy software does not benefit from MPX, but it
>> also does not experience any change in functionality or reduction in
>> performance.
>>
>> More information about Intel MPX can be found in "Intel(R) Architecture
>> Instruction Set Extensions Programming Reference".
>>
>> To get the advantage of MPX, changes are required in the OS kernel,
>> binutils, compiler, system libraries support.
>>
>> New GCC option -fmpx is introduced to utilize MPX instructions.
>> Currently GCC compiler sources with MPX support is available in a
>> separate branch in common GCC SVN repository. See GCC SVN page
>> (http://gcc.gnu.org/svn.html) for details.
>>
>> To have the full protection, we had to add MPX instrumentation to all
>> the necessary Glibc routines (e.g. memcpy) written on assembler, and
>> compile Glibc with the MPX enabled GCC compiler. Currently MPX enabled
>> Glibc source can be found in Glibc git repository.
>>
>> Enabling an application to use MPX will generally not require source
>> code updates but there is some runtime code, which is responsible for
>> configuring and enabling MPX, needed in order to make use of MPX.
>> For most applications this runtime support will be available by linking
>> to a library supplied by the compiler or possibly it will come directly
>> from the OS once OS versions that support MPX are available.
>>
>> MPX kernel code, namely this patchset, has mainly the 2 responsibilities:
>> provide handlers for bounds faults (#BR), and manage bounds memory.
>
> AFAICS the kernel side implementation causes no runtime overhead for
> non-MPX workloads, and also causes no runtime overhead for non-MPX
> hardware, right?
>
Yes.
>> Currently no hardware with MPX ISA is available but it is always
>> possible to use SDE (Intel(R) software Development Emulator) instead,
>> which can be downloaded from
>> http://software.intel.com/en-us/articles/intel-software-development-emulator
>>
>>
>> Changes since v1:
>> * check to see if #BR occurred in userspace or kernel space.
>> * use generic structure and macro as much as possible when
>> decode mpx instructions.
>>
>> Changes since v2:
>> * fix some compile warnings.
>> * update documentation.
>>
>> Qiaowei Ren (4):
>> x86, mpx: add documentation on Intel MPX
>> x86, mpx: hook #BR exception handler to allocate bound tables
>> x86, mpx: add prctl commands PR_MPX_INIT, PR_MPX_RELEASE
>> x86, mpx: extend siginfo structure to include bound violation
>> information
>>
>> Documentation/x86/intel_mpx.txt | 226 ++++++++++++++++++++
>> arch/x86/Kconfig | 4 +
>> arch/x86/include/asm/mpx.h | 63 ++++++
>> arch/x86/include/asm/processor.h | 16 ++
>> arch/x86/kernel/Makefile | 1 +
>> arch/x86/kernel/mpx.c | 415 ++++++++++++++++++++++++++++++++++++
>> arch/x86/kernel/traps.c | 61 +++++-
>> include/uapi/asm-generic/siginfo.h | 9 +-
>> include/uapi/linux/prctl.h | 6 +
>> kernel/signal.c | 4 +
>> kernel/sys.c | 12 +
>> 11 files changed, 815 insertions(+), 2 deletions(-)
>> create mode 100644 Documentation/x86/intel_mpx.txt
>> create mode 100644 arch/x86/include/asm/mpx.h
>> create mode 100644 arch/x86/kernel/mpx.c
>
> Ok, this summary was pretty good - it addresses my prior objections
> wrt. submission quality. Once the details are fleshed out this sure
> looks like a useful feature.
>
Thanks. I apologize for previous submission.
Thanks,
Qiaowei
next prev parent reply other threads:[~2014-01-26 8:26 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-26 9:08 Qiaowei Ren
2014-01-26 8:19 ` Ingo Molnar
2014-01-26 8:20 ` Ren Qiaowei [this message]
2014-01-28 6:42 ` Ingo Molnar
2014-01-28 7:01 ` Ren Qiaowei
2014-01-28 18:26 ` H. Peter Anvin
2014-01-26 9:08 ` [PATCH v3 1/4] x86, mpx: add documentation on Intel MPX Qiaowei Ren
2014-01-26 3:06 ` Randy Dunlap
2014-01-26 3:15 ` Ren Qiaowei
2014-01-27 20:27 ` Andy Lutomirski
2014-01-28 3:40 ` Ren Qiaowei
2014-01-26 9:08 ` [PATCH v3 2/4] x86, mpx: hook #BR exception handler to allocate bound tables Qiaowei Ren
2014-01-27 20:36 ` Andy Lutomirski
2014-01-28 3:35 ` Ren Qiaowei
2014-01-28 5:21 ` Andy Lutomirski
2014-01-28 5:39 ` Ren Qiaowei
2014-01-28 6:42 ` Andy Lutomirski
2014-01-28 6:46 ` Ren Qiaowei
2014-01-26 9:08 ` [PATCH v3 3/4] x86, mpx: add prctl commands PR_MPX_INIT, PR_MPX_RELEASE Qiaowei Ren
2014-01-26 8:22 ` Ingo Molnar
2014-01-26 8:23 ` Ren Qiaowei
2014-01-26 8:39 ` Ingo Molnar
2014-01-26 11:37 ` Ren, Qiaowei
2014-01-27 1:50 ` H. Peter Anvin
2014-01-27 1:55 ` Ren Qiaowei
2014-01-27 2:10 ` H. Peter Anvin
2014-01-27 2:16 ` Ren Qiaowei
2014-01-27 21:54 ` Andy Lutomirski
2014-01-27 22:01 ` H. Peter Anvin
2014-01-26 9:08 ` Ingo Molnar
2014-01-26 12:49 ` Ren, Qiaowei
2014-01-26 15:14 ` Ingo Molnar
2014-01-27 2:01 ` Ren Qiaowei
2014-01-27 20:59 ` Andy Lutomirski
2014-01-26 9:08 ` [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information Qiaowei Ren
2014-01-26 4:22 ` David Rientjes
2014-01-26 4:39 ` Ren Qiaowei
2014-01-26 21:38 ` David Rientjes
2014-01-27 1:34 ` Ren Qiaowei
2014-01-27 1:53 ` H. Peter Anvin
2014-01-27 1:56 ` Ren Qiaowei
2014-01-27 21:58 ` Andy Lutomirski
2014-01-28 2:43 ` Ren Qiaowei
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=52E4C551.7020402@intel.com \
--to=qiaowei.ren@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome