[tip:x86/fpu] x86/mpx: Remove redundant MPX_BNDCFG_ADDR_MASK

2015-06-09 Thread tip-bot for Qiaowei Ren
Commit-ID: 3c1d32300920a446c67d697cd6b80f012ad06028 Gitweb: http://git.kernel.org/tip/3c1d32300920a446c67d697cd6b80f012ad06028 Author: Qiaowei Ren AuthorDate: Sun, 7 Jun 2015 11:37:02 -0700 Committer: Ingo Molnar CommitDate: Tue, 9 Jun 2015 12:24:30 +0200 x86/mpx: Remove redundant

[tip:x86/fpu] x86/mpx: Remove redundant MPX_BNDCFG_ADDR_MASK

2015-06-09 Thread tip-bot for Qiaowei Ren
Commit-ID: 3c1d32300920a446c67d697cd6b80f012ad06028 Gitweb: http://git.kernel.org/tip/3c1d32300920a446c67d697cd6b80f012ad06028 Author: Qiaowei Ren qiaowei@intel.com AuthorDate: Sun, 7 Jun 2015 11:37:02 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Tue, 9 Jun 2015 12:24:30

[tip:x86/mpx] x86, mpx: Add documentation on Intel MPX

2014-11-17 Thread tip-bot for Qiaowei Ren
Commit-ID: 5776563648f6437ede91c91cbad85862ca682b0b Gitweb: http://git.kernel.org/tip/5776563648f6437ede91c91cbad85862ca682b0b Author: Qiaowei Ren AuthorDate: Fri, 14 Nov 2014 07:18:32 -0800 Committer: Thomas Gleixner CommitDate: Tue, 18 Nov 2014 00:58:54 +0100 x86, mpx: Add

[tip:x86/mpx] x86, mpx: Add MPX-specific mmap interface

2014-11-17 Thread tip-bot for Qiaowei Ren
Commit-ID: 57319d80e1d328e34cb24868a4f4405661485e30 Gitweb: http://git.kernel.org/tip/57319d80e1d328e34cb24868a4f4405661485e30 Author: Qiaowei Ren AuthorDate: Fri, 14 Nov 2014 07:18:27 -0800 Committer: Thomas Gleixner CommitDate: Tue, 18 Nov 2014 00:58:53 +0100 x86, mpx: Add MPX

[tip:x86/mpx] x86, mpx: Introduce VM_MPX to indicate that a VMA is MPX specific

2014-11-17 Thread tip-bot for Qiaowei Ren
Commit-ID: 4aae7e436fa51faf4bf5d11b175aea82cfe8224a Gitweb: http://git.kernel.org/tip/4aae7e436fa51faf4bf5d11b175aea82cfe8224a Author: Qiaowei Ren AuthorDate: Fri, 14 Nov 2014 07:18:25 -0800 Committer: Thomas Gleixner CommitDate: Tue, 18 Nov 2014 00:58:53 +0100 x86, mpx: Introduce

[tip:x86/mpx] mips: Sync struct siginfo with general version

2014-11-17 Thread tip-bot for Qiaowei Ren
Commit-ID: 232b5fff5bad78ad00b94153fa90ca53bef6a444 Gitweb: http://git.kernel.org/tip/232b5fff5bad78ad00b94153fa90ca53bef6a444 Author: Qiaowei Ren AuthorDate: Fri, 14 Nov 2014 07:18:20 -0800 Committer: Thomas Gleixner CommitDate: Tue, 18 Nov 2014 00:58:53 +0100 mips: Sync struct

[tip:x86/mpx] ia64: Sync struct siginfo with general version

2014-11-17 Thread tip-bot for Qiaowei Ren
Commit-ID: 53f037b08b5bebf47aa2b574a984e2f9fc7926f2 Gitweb: http://git.kernel.org/tip/53f037b08b5bebf47aa2b574a984e2f9fc7926f2 Author: Qiaowei Ren AuthorDate: Fri, 14 Nov 2014 07:18:22 -0800 Committer: Thomas Gleixner CommitDate: Tue, 18 Nov 2014 00:58:53 +0100 ia64: Sync struct

[tip:x86/mpx] mpx: Extend siginfo structure to include bound violation information

2014-11-17 Thread tip-bot for Qiaowei Ren
Commit-ID: ee1b58d36aa1b5a79eaba11f5c3633c88231da83 Gitweb: http://git.kernel.org/tip/ee1b58d36aa1b5a79eaba11f5c3633c88231da83 Author: Qiaowei Ren AuthorDate: Fri, 14 Nov 2014 07:18:19 -0800 Committer: Thomas Gleixner CommitDate: Tue, 18 Nov 2014 00:58:53 +0100 mpx: Extend siginfo

[tip:x86/mpx] mpx: Extend siginfo structure to include bound violation information

2014-11-17 Thread tip-bot for Qiaowei Ren
Commit-ID: ee1b58d36aa1b5a79eaba11f5c3633c88231da83 Gitweb: http://git.kernel.org/tip/ee1b58d36aa1b5a79eaba11f5c3633c88231da83 Author: Qiaowei Ren qiaowei@intel.com AuthorDate: Fri, 14 Nov 2014 07:18:19 -0800 Committer: Thomas Gleixner t...@linutronix.de CommitDate: Tue, 18 Nov 2014

[tip:x86/mpx] ia64: Sync struct siginfo with general version

2014-11-17 Thread tip-bot for Qiaowei Ren
Commit-ID: 53f037b08b5bebf47aa2b574a984e2f9fc7926f2 Gitweb: http://git.kernel.org/tip/53f037b08b5bebf47aa2b574a984e2f9fc7926f2 Author: Qiaowei Ren qiaowei@intel.com AuthorDate: Fri, 14 Nov 2014 07:18:22 -0800 Committer: Thomas Gleixner t...@linutronix.de CommitDate: Tue, 18 Nov 2014

[tip:x86/mpx] mips: Sync struct siginfo with general version

2014-11-17 Thread tip-bot for Qiaowei Ren
Commit-ID: 232b5fff5bad78ad00b94153fa90ca53bef6a444 Gitweb: http://git.kernel.org/tip/232b5fff5bad78ad00b94153fa90ca53bef6a444 Author: Qiaowei Ren qiaowei@intel.com AuthorDate: Fri, 14 Nov 2014 07:18:20 -0800 Committer: Thomas Gleixner t...@linutronix.de CommitDate: Tue, 18 Nov 2014

[tip:x86/mpx] x86, mpx: Introduce VM_MPX to indicate that a VMA is MPX specific

2014-11-17 Thread tip-bot for Qiaowei Ren
Commit-ID: 4aae7e436fa51faf4bf5d11b175aea82cfe8224a Gitweb: http://git.kernel.org/tip/4aae7e436fa51faf4bf5d11b175aea82cfe8224a Author: Qiaowei Ren qiaowei@intel.com AuthorDate: Fri, 14 Nov 2014 07:18:25 -0800 Committer: Thomas Gleixner t...@linutronix.de CommitDate: Tue, 18 Nov 2014

[tip:x86/mpx] x86, mpx: Add MPX-specific mmap interface

2014-11-17 Thread tip-bot for Qiaowei Ren
Commit-ID: 57319d80e1d328e34cb24868a4f4405661485e30 Gitweb: http://git.kernel.org/tip/57319d80e1d328e34cb24868a4f4405661485e30 Author: Qiaowei Ren qiaowei@intel.com AuthorDate: Fri, 14 Nov 2014 07:18:27 -0800 Committer: Thomas Gleixner t...@linutronix.de CommitDate: Tue, 18 Nov 2014

[tip:x86/mpx] x86, mpx: Add documentation on Intel MPX

2014-11-17 Thread tip-bot for Qiaowei Ren
Commit-ID: 5776563648f6437ede91c91cbad85862ca682b0b Gitweb: http://git.kernel.org/tip/5776563648f6437ede91c91cbad85862ca682b0b Author: Qiaowei Ren qiaowei@intel.com AuthorDate: Fri, 14 Nov 2014 07:18:32 -0800 Committer: Thomas Gleixner t...@linutronix.de CommitDate: Tue, 18 Nov 2014

[PATCH v9 06/12] mpx: extend siginfo structure to include bound violation information

2014-10-11 Thread Qiaowei Ren
This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. Signed-off-by: Qiaowei Ren --- include/uapi/asm-generic/siginfo.h |9 - kernel/signal.c

[PATCH v9 04/12] x86, mpx: add MPX to disaabled features

2014-10-11 Thread Qiaowei Ren
. This patch must be applied after another Dave's commit: 381aa07a9b4e1f82969203e9e4863da2a157781d Signed-off-by: Dave Hansen Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/disabled-features.h |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/x86/include/asm

[PATCH v9 07/12] mips: sync struct siginfo with general version

2014-10-11 Thread Qiaowei Ren
New fields about bound violation are added into general struct siginfo. This will impact MIPS and IA64, which extend general struct siginfo. This patch syncs this struct for MIPS with general version. Signed-off-by: Qiaowei Ren --- arch/mips/include/uapi/asm/siginfo.h |4 1 files

[PATCH v9 05/12] x86, mpx: on-demand kernel allocation of bounds tables

2014-10-11 Thread Qiaowei Ren
es that we could think of, we create them on demand in the kernel. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 20 + arch/x86/kernel/Makefile |1 + arch/x86/kernel/mpx.c | 101 arch/x86/kernel/traps.c

[PATCH v9 03/12] x86, mpx: add MPX specific mmap interface

2014-10-11 Thread Qiaowei Ren
interfaces to do this in current kernel. Existing interfaces, like do_mmap_pgoff(), could not stick specific ->vm_ops in the vma_area_struct when a VMA is created. So, this patch adds MPX specific mmap interface to do the allocation of bounds tables. Signed-off-by: Qiaowei Ren --- arc

[PATCH v9 01/12] x86, mpx: introduce VM_MPX to indicate that a VMA is MPX specific

2014-10-11 Thread Qiaowei Ren
from merging. We understand that VM_ flags are scarce and are open to other options. Signed-off-by: Qiaowei Ren --- fs/proc/task_mmu.c |1 + include/linux/mm.h |6 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index dfc791c

[PATCH v9 08/12] ia64: sync struct siginfo with general version

2014-10-11 Thread Qiaowei Ren
New fields about bound violation are added into general struct siginfo. This will impact MIPS and IA64, which extend general struct siginfo. This patch syncs this struct for IA64 with general version. Signed-off-by: Qiaowei Ren --- arch/ia64/include/uapi/asm/siginfo.h |8 ++-- 1 files

[PATCH v9 12/12] x86, mpx: add documentation on Intel MPX

2014-10-11 Thread Qiaowei Ren
This patch adds the Documentation/x86/intel_mpx.txt file with some information about Intel MPX. Signed-off-by: Qiaowei Ren --- Documentation/x86/intel_mpx.txt | 245 +++ 1 files changed, 245 insertions(+), 0 deletions(-) create mode 100644 Documentation/x86

[PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-11 Thread Qiaowei Ren
the generic decoder is very heavyweight not just in terms of performance but in terms of interface -- because it has to. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 23 arch/x86/kernel/mpx.c | 299 arch/x86/kernel/traps.c|6

[PATCH v9 11/12] x86, mpx: cleanup unused bound tables

2014-10-11 Thread Qiaowei Ren
faults while touching the bounds directory entry. This keeps us from being able to free the tables in this case. This deficiency will be addressed in later patches. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mmu_context.h | 16 ++ arch/x86/include/asm/mpx.h |9 + arch

[PATCH v9 10/12] x86, mpx: add prctl commands PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT

2014-10-11 Thread Qiaowei Ren
will still check whether it is changed by users at #BR fault time. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mmu_context.h |9 arch/x86/include/asm/mpx.h | 11 + arch/x86/include/asm/processor.h | 18 +++ arch/x86/kernel/mpx.c | 88 +

[PATCH v9 00/12] Intel MPX support

2014-10-11 Thread Qiaowei Ren
tables in kernel is enabled at #BR fault time, and add locking to protect the access to 'bd_addr'. * update the documentation file to add more content about on-demand allocation of bounds tables, etc.. Qiaowei Ren (12): mm: distinguish VMAs with different vm_ops x86, mpx: rename cf

[PATCH v9 02/12] x86, mpx: rename cfg_reg_u and status_reg

2014-10-11 Thread Qiaowei Ren
According to Intel SDM extension, MPX configuration and status registers should be BNDCFGU and BNDSTATUS. This patch renames cfg_reg_u and status_reg to bndcfgu and bndstatus. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/processor.h |4 ++-- 1 files changed, 2 insertions(+), 2

[PATCH v9 02/12] x86, mpx: rename cfg_reg_u and status_reg

2014-10-11 Thread Qiaowei Ren
According to Intel SDM extension, MPX configuration and status registers should be BNDCFGU and BNDSTATUS. This patch renames cfg_reg_u and status_reg to bndcfgu and bndstatus. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/processor.h |4 ++-- 1 files changed, 2

[PATCH v9 00/12] Intel MPX support

2014-10-11 Thread Qiaowei Ren
to protect the access to 'bd_addr'. * update the documentation file to add more content about on-demand allocation of bounds tables, etc.. Qiaowei Ren (12): mm: distinguish VMAs with different vm_ops x86, mpx: rename cfg_reg_u and status_reg x86, mpx: add MPX specific mmap interface x86

[PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-11 Thread Qiaowei Ren
the generic decoder is very heavyweight not just in terms of performance but in terms of interface -- because it has to. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mpx.h | 23 arch/x86/kernel/mpx.c | 299 arch/x86

[PATCH v9 11/12] x86, mpx: cleanup unused bound tables

2014-10-11 Thread Qiaowei Ren
touching the bounds directory entry. This keeps us from being able to free the tables in this case. This deficiency will be addressed in later patches. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mmu_context.h | 16 ++ arch/x86/include/asm/mpx.h |9 + arch

[PATCH v9 10/12] x86, mpx: add prctl commands PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT

2014-10-11 Thread Qiaowei Ren
-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mmu_context.h |9 arch/x86/include/asm/mpx.h | 11 + arch/x86/include/asm/processor.h | 18 +++ arch/x86/kernel/mpx.c | 88 arch/x86/kernel/setup.c

[PATCH v9 08/12] ia64: sync struct siginfo with general version

2014-10-11 Thread Qiaowei Ren
New fields about bound violation are added into general struct siginfo. This will impact MIPS and IA64, which extend general struct siginfo. This patch syncs this struct for IA64 with general version. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/ia64/include/uapi/asm/siginfo.h

[PATCH v9 12/12] x86, mpx: add documentation on Intel MPX

2014-10-11 Thread Qiaowei Ren
This patch adds the Documentation/x86/intel_mpx.txt file with some information about Intel MPX. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- Documentation/x86/intel_mpx.txt | 245 +++ 1 files changed, 245 insertions(+), 0 deletions(-) create mode

[PATCH v9 03/12] x86, mpx: add MPX specific mmap interface

2014-10-11 Thread Qiaowei Ren
to do this in current kernel. Existing interfaces, like do_mmap_pgoff(), could not stick specific -vm_ops in the vma_area_struct when a VMA is created. So, this patch adds MPX specific mmap interface to do the allocation of bounds tables. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86

[PATCH v9 01/12] x86, mpx: introduce VM_MPX to indicate that a VMA is MPX specific

2014-10-11 Thread Qiaowei Ren
understand that VM_ flags are scarce and are open to other options. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- fs/proc/task_mmu.c |1 + include/linux/mm.h |6 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index dfc791c

[PATCH v9 07/12] mips: sync struct siginfo with general version

2014-10-11 Thread Qiaowei Ren
New fields about bound violation are added into general struct siginfo. This will impact MIPS and IA64, which extend general struct siginfo. This patch syncs this struct for MIPS with general version. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/mips/include/uapi/asm/siginfo.h

[PATCH v9 05/12] x86, mpx: on-demand kernel allocation of bounds tables

2014-10-11 Thread Qiaowei Ren
could think of, we create them on demand in the kernel. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mpx.h | 20 + arch/x86/kernel/Makefile |1 + arch/x86/kernel/mpx.c | 101 arch/x86/kernel/traps.c

[PATCH v9 04/12] x86, mpx: add MPX to disaabled features

2014-10-11 Thread Qiaowei Ren
. This patch must be applied after another Dave's commit: 381aa07a9b4e1f82969203e9e4863da2a157781d Signed-off-by: Dave Hansen dave.han...@linux.intel.com Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/disabled-features.h |8 +++- 1 files changed, 7 insertions(+), 1

[PATCH v9 06/12] mpx: extend siginfo structure to include bound violation information

2014-10-11 Thread Qiaowei Ren
This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- include/uapi/asm-generic/siginfo.h |9 - kernel/signal.c

[PATCH v8 00/10] Intel MPX support

2014-09-11 Thread Qiaowei Ren
he same thing. * fix warnings for 32 bit arch. * add more description into these patches. Changes since v7: * introduce VM_ARCH_2 flag. * remove all of the pr_debug()s. * fix prctl numbers in documentation. * fix some bugs on bounds tables freeing. Qiaowei Ren (10): x86, mpx: int

[PATCH v8 02/10] x86, mpx: add MPX specific mmap interface

2014-09-11 Thread Qiaowei Ren
memory is being dedicated to it. With this feature, plus some grepping in /proc/$pid/smaps one could take a pretty good stab at it. Signed-off-by: Qiaowei Ren --- arch/x86/Kconfig |4 ++ arch/x86/include/asm/mpx.h | 38 + arch/x86/mm/Makefile |2 + arch

[PATCH v8 03/10] x86, mpx: add macro cpu_has_mpx

2014-09-11 Thread Qiaowei Ren
(); Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/cpufeature.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index bb9b258..82ec7ed 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86

[PATCH v8 05/10] x86, mpx: extend siginfo structure to include bound violation information

2014-09-11 Thread Qiaowei Ren
This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. Signed-off-by: Qiaowei Ren --- include/uapi/asm-generic/siginfo.h |9 - kernel/signal.c

[PATCH v8 01/10] x86, mpx: introduce VM_MPX to indicate that a VMA is MPX specific

2014-09-11 Thread Qiaowei Ren
contain a bounds table. This is less expensive than (1), but still requires reading a pointer out of userspace for every VMA that we iterate over. Signed-off-by: Qiaowei Ren --- fs/proc/task_mmu.c |1 + include/linux/mm.h |6 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff

[PATCH v8 06/10] mips: sync struct siginfo with general version

2014-09-11 Thread Qiaowei Ren
Due to new fields about bound violation added into struct siginfo, this patch syncs it with general version to avoid build issue. Signed-off-by: Qiaowei Ren --- arch/mips/include/uapi/asm/siginfo.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/mips/include

[PATCH v8 04/10] x86, mpx: hook #BR exception handler to allocate bound tables

2014-09-11 Thread Qiaowei Ren
somewhere else. We don't have that room in the kernel address space. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 20 +++ arch/x86/kernel/Makefile |1 + arch/x86/kernel/mpx.c | 58 arch/x86/kernel/traps.c

[PATCH v8 08/10] x86, mpx: add prctl commands PR_MPX_REGISTER, PR_MPX_UNREGISTER

2014-09-11 Thread Qiaowei Ren
to check whether one application is mpx enabled. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h |1 + arch/x86/include/asm/processor.h | 18 arch/x86/kernel/mpx.c| 55 ++ include/linux/mm_types.h |3

[PATCH v8 10/10] x86, mpx: add documentation on Intel MPX

2014-09-11 Thread Qiaowei Ren
This patch adds the Documentation/x86/intel_mpx.txt file with some information about Intel MPX. Signed-off-by: Qiaowei Ren --- Documentation/x86/intel_mpx.txt | 127 +++ 1 files changed, 127 insertions(+), 0 deletions(-) create mode 100644 Documentation/x86

[PATCH v8 09/10] x86, mpx: cleanup unused bound tables

2014-09-11 Thread Qiaowei Ren
in the virtual address region which is being unmapped will be freed also. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mmu_context.h | 16 +++ arch/x86/include/asm/mpx.h |9 ++ arch/x86/mm/mpx.c | 252 include/asm-generic

[PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-11 Thread Qiaowei Ren
the generic decoder is very heavyweight not just in terms of performance but in terms of interface -- because it has to. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 23 arch/x86/kernel/mpx.c | 299 arch/x86/kernel/traps.c|6

[PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-11 Thread Qiaowei Ren
the generic decoder is very heavyweight not just in terms of performance but in terms of interface -- because it has to. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mpx.h | 23 arch/x86/kernel/mpx.c | 299 arch/x86

[PATCH v8 10/10] x86, mpx: add documentation on Intel MPX

2014-09-11 Thread Qiaowei Ren
This patch adds the Documentation/x86/intel_mpx.txt file with some information about Intel MPX. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- Documentation/x86/intel_mpx.txt | 127 +++ 1 files changed, 127 insertions(+), 0 deletions(-) create mode

[PATCH v8 09/10] x86, mpx: cleanup unused bound tables

2014-09-11 Thread Qiaowei Ren
in the virtual address region which is being unmapped will be freed also. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mmu_context.h | 16 +++ arch/x86/include/asm/mpx.h |9 ++ arch/x86/mm/mpx.c | 252

[PATCH v8 08/10] x86, mpx: add prctl commands PR_MPX_REGISTER, PR_MPX_UNREGISTER

2014-09-11 Thread Qiaowei Ren
to check whether one application is mpx enabled. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mpx.h |1 + arch/x86/include/asm/processor.h | 18 arch/x86/kernel/mpx.c| 55 ++ include/linux

[PATCH v8 04/10] x86, mpx: hook #BR exception handler to allocate bound tables

2014-09-11 Thread Qiaowei Ren
somewhere else. We don't have that room in the kernel address space. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mpx.h | 20 +++ arch/x86/kernel/Makefile |1 + arch/x86/kernel/mpx.c | 58 arch/x86

[PATCH v8 06/10] mips: sync struct siginfo with general version

2014-09-11 Thread Qiaowei Ren
Due to new fields about bound violation added into struct siginfo, this patch syncs it with general version to avoid build issue. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/mips/include/uapi/asm/siginfo.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git

[PATCH v8 01/10] x86, mpx: introduce VM_MPX to indicate that a VMA is MPX specific

2014-09-11 Thread Qiaowei Ren
contain a bounds table. This is less expensive than (1), but still requires reading a pointer out of userspace for every VMA that we iterate over. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- fs/proc/task_mmu.c |1 + include/linux/mm.h |6 ++ 2 files changed, 7 insertions(+), 0

[PATCH v8 05/10] x86, mpx: extend siginfo structure to include bound violation information

2014-09-11 Thread Qiaowei Ren
This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- include/uapi/asm-generic/siginfo.h |9 - kernel/signal.c

[PATCH v8 03/10] x86, mpx: add macro cpu_has_mpx

2014-09-11 Thread Qiaowei Ren
(); Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/cpufeature.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index bb9b258..82ec7ed 100644 --- a/arch/x86/include/asm

[PATCH v8 02/10] x86, mpx: add MPX specific mmap interface

2014-09-11 Thread Qiaowei Ren
memory is being dedicated to it. With this feature, plus some grepping in /proc/$pid/smaps one could take a pretty good stab at it. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/Kconfig |4 ++ arch/x86/include/asm/mpx.h | 38 + arch/x86/mm/Makefile

[PATCH v8 00/10] Intel MPX support

2014-09-11 Thread Qiaowei Ren
warnings for 32 bit arch. * add more description into these patches. Changes since v7: * introduce VM_ARCH_2 flag. * remove all of the pr_debug()s. * fix prctl numbers in documentation. * fix some bugs on bounds tables freeing. Qiaowei Ren (10): x86, mpx: introduce VM_MPX to indicate

[PATCH v7 02/10] x86, mpx: add MPX specific mmap interface

2014-07-20 Thread Qiaowei Ren
memory is being dedicated to it. With this feature, plus some grepping in /proc/$pid/smaps one could take a pretty good stab at it. Signed-off-by: Qiaowei Ren --- arch/x86/Kconfig |4 ++ arch/x86/include/asm/mpx.h | 38 + arch/x86/mm/Makefile |2 + arch

[PATCH v7 05/10] x86, mpx: extend siginfo structure to include bound violation information

2014-07-20 Thread Qiaowei Ren
This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. Signed-off-by: Qiaowei Ren --- include/uapi/asm-generic/siginfo.h |9 - kernel/signal.c

[PATCH v7 04/10] x86, mpx: hook #BR exception handler to allocate bound tables

2014-07-20 Thread Qiaowei Ren
somewhere else. We don't have that room in the kernel address space. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 20 ++ arch/x86/kernel/Makefile |1 + arch/x86/kernel/mpx.c | 60 arch/x86/kernel/traps.c

[PATCH v7 00/10] Intel MPX support

2014-07-20 Thread Qiaowei Ren
hing. * fix warnings for 32 bit arch. * add more description into these patches. Qiaowei Ren (10): x86, mpx: introduce VM_MPX to indicate that a VMA is MPX specific x86, mpx: add MPX specific mmap interface x86, mpx: add macro cpu_has_mpx x86, mpx: hook #BR exception handler to allocate

[PATCH v7 09/10] x86, mpx: cleanup unused bound tables

2014-07-20 Thread Qiaowei Ren
in the virtual address region which is being unmapped will be freed also. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mmu_context.h | 16 +++ arch/x86/include/asm/mpx.h |9 ++ arch/x86/mm/mpx.c | 181 include/asm-generic

[PATCH v7 03/10] x86, mpx: add macro cpu_has_mpx

2014-07-20 Thread Qiaowei Ren
(); Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/cpufeature.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index e265ff9..f302d08 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86

[PATCH v7 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-07-20 Thread Qiaowei Ren
the generic decoder is very heavyweight not just in terms of performance but in terms of interface -- because it has to. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 23 arch/x86/kernel/mpx.c | 299 arch/x86/kernel/traps.c|6

[PATCH v7 10/10] x86, mpx: add documentation on Intel MPX

2014-07-20 Thread Qiaowei Ren
This patch adds the Documentation/x86/intel_mpx.txt file with some information about Intel MPX. Signed-off-by: Qiaowei Ren --- Documentation/x86/intel_mpx.txt | 127 +++ 1 files changed, 127 insertions(+), 0 deletions(-) create mode 100644 Documentation/x86

[PATCH v7 01/10] x86, mpx: introduce VM_MPX to indicate that a VMA is MPX specific

2014-07-20 Thread Qiaowei Ren
contain a bounds table. This is less expensive than (1), but still requires reading a pointer out of userspace for every VMA that we iterate over. Signed-off-by: Qiaowei Ren --- fs/proc/task_mmu.c |1 + include/linux/mm.h |2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git

[PATCH v7 06/10] mips: sync struct siginfo with general version

2014-07-20 Thread Qiaowei Ren
Due to new fields about bound violation added into struct siginfo, this patch syncs it with general version to avoid build issue. Signed-off-by: Qiaowei Ren --- arch/mips/include/uapi/asm/siginfo.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/mips/include

[PATCH v7 08/10] x86, mpx: add prctl commands PR_MPX_REGISTER, PR_MPX_UNREGISTER

2014-07-20 Thread Qiaowei Ren
to check whether one application is mpx enabled. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h |1 + arch/x86/include/asm/processor.h | 18 arch/x86/kernel/mpx.c| 56 ++ include/linux/mm_types.h |3

[PATCH v7 06/10] mips: sync struct siginfo with general version

2014-07-20 Thread Qiaowei Ren
Due to new fields about bound violation added into struct siginfo, this patch syncs it with general version to avoid build issue. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/mips/include/uapi/asm/siginfo.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git

[PATCH v7 08/10] x86, mpx: add prctl commands PR_MPX_REGISTER, PR_MPX_UNREGISTER

2014-07-20 Thread Qiaowei Ren
to check whether one application is mpx enabled. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mpx.h |1 + arch/x86/include/asm/processor.h | 18 arch/x86/kernel/mpx.c| 56 ++ include/linux

[PATCH v7 03/10] x86, mpx: add macro cpu_has_mpx

2014-07-20 Thread Qiaowei Ren
(); Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/cpufeature.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index e265ff9..f302d08 100644 --- a/arch/x86/include/asm

[PATCH v7 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-07-20 Thread Qiaowei Ren
the generic decoder is very heavyweight not just in terms of performance but in terms of interface -- because it has to. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mpx.h | 23 arch/x86/kernel/mpx.c | 299 arch/x86

[PATCH v7 10/10] x86, mpx: add documentation on Intel MPX

2014-07-20 Thread Qiaowei Ren
This patch adds the Documentation/x86/intel_mpx.txt file with some information about Intel MPX. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- Documentation/x86/intel_mpx.txt | 127 +++ 1 files changed, 127 insertions(+), 0 deletions(-) create mode

[PATCH v7 01/10] x86, mpx: introduce VM_MPX to indicate that a VMA is MPX specific

2014-07-20 Thread Qiaowei Ren
contain a bounds table. This is less expensive than (1), but still requires reading a pointer out of userspace for every VMA that we iterate over. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- fs/proc/task_mmu.c |1 + include/linux/mm.h |2 ++ 2 files changed, 3 insertions(+), 0

[PATCH v7 04/10] x86, mpx: hook #BR exception handler to allocate bound tables

2014-07-20 Thread Qiaowei Ren
somewhere else. We don't have that room in the kernel address space. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mpx.h | 20 ++ arch/x86/kernel/Makefile |1 + arch/x86/kernel/mpx.c | 60 arch/x86

[PATCH v7 00/10] Intel MPX support

2014-07-20 Thread Qiaowei Ren
warnings for 32 bit arch. * add more description into these patches. Qiaowei Ren (10): x86, mpx: introduce VM_MPX to indicate that a VMA is MPX specific x86, mpx: add MPX specific mmap interface x86, mpx: add macro cpu_has_mpx x86, mpx: hook #BR exception handler to allocate bound tables x86

[PATCH v7 02/10] x86, mpx: add MPX specific mmap interface

2014-07-20 Thread Qiaowei Ren
memory is being dedicated to it. With this feature, plus some grepping in /proc/$pid/smaps one could take a pretty good stab at it. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/Kconfig |4 ++ arch/x86/include/asm/mpx.h | 38 + arch/x86/mm/Makefile

[PATCH v7 05/10] x86, mpx: extend siginfo structure to include bound violation information

2014-07-20 Thread Qiaowei Ren
This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- include/uapi/asm-generic/siginfo.h |9 - kernel/signal.c

[PATCH v7 09/10] x86, mpx: cleanup unused bound tables

2014-07-20 Thread Qiaowei Ren
in the virtual address region which is being unmapped will be freed also. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mmu_context.h | 16 +++ arch/x86/include/asm/mpx.h |9 ++ arch/x86/mm/mpx.c | 181

[PATCH v6 00/10] Intel MPX support

2014-06-18 Thread Qiaowei Ren
ync struct figinfo for mips with general version to avoid build issue. Qiaowei Ren (10): x86, mpx: introduce VM_MPX to indicate that a VMA is MPX specific x86, mpx: add MPX specific mmap interface x86, mpx: add macro cpu_has_mpx x86, mpx: hook #BR exception handler to allocate bound ta

[PATCH v6 03/10] x86, mpx: add macro cpu_has_mpx

2014-06-18 Thread Qiaowei Ren
In order to do performance optimization, this patch adds macro cpu_has_mpx which will directly return 0 when MPX is not supported by kernel. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/cpufeature.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/x86

[PATCH v6 01/10] x86, mpx: introduce VM_MPX to indicate that a VMA is MPX specific

2014-06-18 Thread Qiaowei Ren
contain a bounds table. This is less expensive than (1), but still requires reading a pointer out of userspace for every VMA that we iterate over. Signed-off-by: Qiaowei Ren --- arch/x86/mm/init_64.c |2 ++ fs/proc/task_mmu.c|1 + include/linux/mm.h|2 ++ 3 files changed, 5

[PATCH v6 05/10] x86, mpx: extend siginfo structure to include bound violation information

2014-06-18 Thread Qiaowei Ren
This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. Signed-off-by: Qiaowei Ren --- include/uapi/asm-generic/siginfo.h |9 - kernel/signal.c

[PATCH v6 02/10] x86, mpx: add MPX specific mmap interface

2014-06-18 Thread Qiaowei Ren
. Signed-off-by: Qiaowei Ren --- arch/x86/Kconfig |4 +++ arch/x86/include/asm/mpx.h | 38 arch/x86/mm/Makefile |2 + arch/x86/mm/mpx.c | 58 4 files changed, 102 insertions(+), 0

[PATCH v6 08/10] x86, mpx: add prctl commands PR_MPX_REGISTER, PR_MPX_UNREGISTER

2014-06-18 Thread Qiaowei Ren
to check whether one application is mpx enabled. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h |1 + arch/x86/include/asm/processor.h | 18 arch/x86/kernel/mpx.c| 56 ++ include/linux/mm_types.h |3

[PATCH v6 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-06-18 Thread Qiaowei Ren
This patch sets bound violation fields of siginfo struct in #BR exception handler by decoding the user instruction and constructing the faulting pointer. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 23 arch/x86/kernel/mpx.c | 294

[PATCH v6 09/10] x86, mpx: cleanup unused bound tables

2014-06-18 Thread Qiaowei Ren
When user memory region is unmapped, related bound tables become unused and need to be released also. This patch cleanups these unused bound tables through hooking unmap path. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mmu_context.h | 16 +++ arch/x86/include/asm/mpx.h |9

[PATCH v6 10/10] x86, mpx: add documentation on Intel MPX

2014-06-18 Thread Qiaowei Ren
This patch adds the Documentation/x86/intel_mpx.txt file with some information about Intel MPX. Signed-off-by: Qiaowei Ren --- Documentation/x86/intel_mpx.txt | 127 +++ 1 files changed, 127 insertions(+), 0 deletions(-) create mode 100644 Documentation/x86

[PATCH v6 06/10] mips: sync struct siginfo with general version

2014-06-18 Thread Qiaowei Ren
Due to new fields about bound violation added into struct siginfo, this patch syncs it with general version to avoid build issue. Signed-off-by: Qiaowei Ren --- arch/mips/include/uapi/asm/siginfo.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/mips/include

[PATCH v6 04/10] x86, mpx: hook #BR exception handler to allocate bound tables

2014-06-18 Thread Qiaowei Ren
somewhere else. We don't have that room in the kernel address space. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 20 ++ arch/x86/kernel/Makefile |1 + arch/x86/kernel/mpx.c | 63 arch/x86/kernel/traps.c

[PATCH v6 04/10] x86, mpx: hook #BR exception handler to allocate bound tables

2014-06-18 Thread Qiaowei Ren
somewhere else. We don't have that room in the kernel address space. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mpx.h | 20 ++ arch/x86/kernel/Makefile |1 + arch/x86/kernel/mpx.c | 63 arch/x86

[PATCH v6 10/10] x86, mpx: add documentation on Intel MPX

2014-06-18 Thread Qiaowei Ren
This patch adds the Documentation/x86/intel_mpx.txt file with some information about Intel MPX. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- Documentation/x86/intel_mpx.txt | 127 +++ 1 files changed, 127 insertions(+), 0 deletions(-) create mode

[PATCH v6 06/10] mips: sync struct siginfo with general version

2014-06-18 Thread Qiaowei Ren
Due to new fields about bound violation added into struct siginfo, this patch syncs it with general version to avoid build issue. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/mips/include/uapi/asm/siginfo.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git

[PATCH v6 09/10] x86, mpx: cleanup unused bound tables

2014-06-18 Thread Qiaowei Ren
When user memory region is unmapped, related bound tables become unused and need to be released also. This patch cleanups these unused bound tables through hooking unmap path. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mmu_context.h | 16 +++ arch/x86/include/asm

[PATCH v6 08/10] x86, mpx: add prctl commands PR_MPX_REGISTER, PR_MPX_UNREGISTER

2014-06-18 Thread Qiaowei Ren
to check whether one application is mpx enabled. Signed-off-by: Qiaowei Ren qiaowei@intel.com --- arch/x86/include/asm/mpx.h |1 + arch/x86/include/asm/processor.h | 18 arch/x86/kernel/mpx.c| 56 ++ include/linux

  1   2   3   >