[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/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

[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
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/includ

[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
managing bounds tables 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 arc

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

2014-10-11 Thread Qiaowei Ren
erfaces 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..cc31

[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
e 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|

[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
be in a world of hurt. But we 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/kern

[PATCH v9 00/12] Intel MPX support

2014-10-11 Thread Qiaowei Ren
e management of bounds 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 dif

[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 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: introd

[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
sibly 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(-)

[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/tr

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

2014-09-11 Thread Qiaowei Ren
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
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
e 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|

[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/tr

[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
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
e 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|

[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
sibly 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 --

[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
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 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
sibly 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 chang

[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
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/tr

[PATCH v5 2/3] x86, mpx: hook #BR exception handler to allocate bound tables

2014-02-22 Thread Qiaowei Ren
entry. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 35 +++ arch/x86/kernel/Makefile |1 + arch/x86/kernel/mpx.c | 46 arch/x86/kernel/traps.c| 56 +++- 4 files

[PATCH v5 3/3] x86, mpx: extend siginfo structure to include bound violation information

2014-02-22 Thread Qiaowei Ren
userspace application can get violation address, lower bound and upper bound for bound violation from this new siginfo structure. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 19 +++ arch/x86/kernel/mpx.c | 289 arch/x86

[PATCH v5 1/3] x86, mpx: add documentation on Intel MPX

2014-02-22 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 | 239 +++ 1 files changed, 239 insertions(+), 0 deletions(-) create mode 100644 Documentation/x86

[PATCH v5 0/3] Intel MPX support

2014-02-22 Thread Qiaowei Ren
TATUS is 3. * add some comments. * remove new prctl() commands. * fix some compile warnings for 32-bit. Changes since v4: * raise SIGBUS if the allocations of the bound tables fail. Qiaowei Ren (3): x86, mpx: add documentation on Intel MPX x86, mpx: hook #BR exception handler to allo

[PATCH v4 1/3] x86, mpx: add documentation on Intel MPX

2014-02-12 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 | 239 +++ 1 files changed, 239 insertions(+), 0 deletions(-) create mode 100644 Documentation/x86

[PATCH v4 3/3] x86, mpx: extend siginfo structure to include bound violation information

2014-02-12 Thread Qiaowei Ren
userspace application can get violation address, lower bound and upper bound for bound violation from this new siginfo structure. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 19 +++ arch/x86/kernel/mpx.c | 289 arch/x86

[PATCH v4 2/3] x86, mpx: hook #BR exception handler to allocate bound tables

2014-02-12 Thread Qiaowei Ren
entry. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 35 arch/x86/kernel/Makefile |1 + arch/x86/kernel/mpx.c | 44 +++ arch/x86/kernel/traps.c| 55 +++- 4 files

[PATCH v4 0/3] Intel MPX support

2014-02-12 Thread Qiaowei Ren
TATUS is 3. * add some comments. * remove new prctl() commands. * fix some compile warnings for 32-bit. Qiaowei Ren (3): x86, mpx: add documentation on Intel MPX x86, mpx: hook #BR exception handler to allocate bound tables x86, mpx: extend siginfo structure to include bound

[PATCH] kernel/trace: fix compiler warning

2014-02-11 Thread Qiaowei Ren
The patch fixes the following compiler warning: CC kernel/trace/trace_events.o kernel/trace/trace_events.c: In function 'event_enable_read' kernel/trace/trace_events.c:693: warning: 'flags' may be used \ uninitialized in this function Signed-off-by: Qiaowei Re

[PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-25 Thread Qiaowei Ren
userspace application can get violation address, lower bound and upper bound for bound violation from this new siginfo structure. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 19 +++ arch/x86/kernel/mpx.c | 287 arch/x86

[PATCH v3 3/4] x86, mpx: add prctl commands PR_MPX_INIT, PR_MPX_RELEASE

2014-01-25 Thread Qiaowei Ren
memory area is unmapped. Signed-off-by: Qiaowei Ren --- arch/x86/Kconfig |4 ++ arch/x86/include/asm/mpx.h |9 arch/x86/include/asm/processor.h | 16 +++ arch/x86/kernel/mpx.c| 84 ++ include/uapi/linux/prctl.h

[PATCH v3 0/4] Intel MPX support

2014-01-25 Thread Qiaowei Ren
d 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 P

[PATCH v3 2/4] x86, mpx: hook #BR exception handler to allocate bound tables

2014-01-25 Thread Qiaowei Ren
entry. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 35 arch/x86/kernel/Makefile |1 + arch/x86/kernel/mpx.c | 44 +++ arch/x86/kernel/traps.c| 55 +++- 4 files

[PATCH v3 1/4] x86, mpx: add documentation on Intel MPX

2014-01-25 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 | 226 +++ 1 files changed, 226 insertions(+), 0 deletions(-) create mode 100644 Documentation/x86

[PATCH v2 0/4] Intel MPX support

2014-01-21 Thread Qiaowei Ren
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. Qiaowei Ren (4): x86, mpx: add documentation on Intel MPX x86, mpx: hook #BR exception handler to allocate bound tables

[PATCH v2 1/4] x86, mpx: add documentation on Intel MPX

2014-01-21 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 | 76 +++ 1 files changed, 76 insertions(+), 0 deletions(-) create mode 100644 Documentation/x86

[PATCH v2 3/4] x86, mpx: add prctl commands PR_MPX_INIT, PR_MPX_RELEASE

2014-01-21 Thread Qiaowei Ren
memory area is unmapped. Signed-off-by: Qiaowei Ren --- arch/x86/Kconfig |4 ++ arch/x86/include/asm/mpx.h |9 arch/x86/include/asm/processor.h | 16 +++ arch/x86/kernel/mpx.c| 84 ++ include/uapi/linux/prctl.h

[PATCH v2 2/4] x86, mpx: hook #BR exception handler to allocate bound tables

2014-01-21 Thread Qiaowei Ren
entry. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 35 arch/x86/kernel/Makefile |1 + arch/x86/kernel/mpx.c | 44 +++ arch/x86/kernel/traps.c| 55 +++- 4 files

[PATCH v2 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-21 Thread Qiaowei Ren
userspace application can get violation address, lower bound and upper bound for bound violation from this new siginfo structure. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 19 +++ arch/x86/kernel/mpx.c | 289 arch/x86

[tip:x86/mpx] x86, mpx: Add MPX related opcodes to the x86 opcode map

2014-01-17 Thread tip-bot for Qiaowei Ren
Commit-ID: fb09b78151361f5001ad462e4b242b10845830e2 Gitweb: http://git.kernel.org/tip/fb09b78151361f5001ad462e4b242b10845830e2 Author: Qiaowei Ren AuthorDate: Sun, 12 Jan 2014 17:20:02 +0800 Committer: H. Peter Anvin CommitDate: Fri, 17 Jan 2014 11:04:09 -0800 x86, mpx: Add MPX

[PATCH 4/5] x86, mpx: add MPX related opcodes to the x86 opcode map

2014-01-11 Thread Qiaowei Ren
This patch adds all the MPX instructions to x86 opcode map, and then the x86 instruction decoder can decode MPX instructions used in kernel. Signed-off-by: Qiaowei Ren --- arch/x86/lib/x86-opcode-map.txt |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/lib

[PATCH 3/5] x86, mpx: add prctl commands PR_MPX_INIT, PR_MPX_RELEASE

2014-01-11 Thread Qiaowei Ren
memory area is unmapped. Signed-off-by: Qiaowei Ren --- arch/x86/Kconfig |4 ++ arch/x86/include/asm/mpx.h |9 arch/x86/include/asm/processor.h | 16 +++ arch/x86/kernel/mpx.c| 84 ++ include/uapi/linux/prctl.h

[PATCH 1/5] x86, mpx: add documentation on Intel MPX

2014-01-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 | 76 +++ 1 files changed, 76 insertions(+), 0 deletions(-) create mode 100644 Documentation/x86

[PATCH 2/5] x86, mpx: hook #BR exception handler to allocate bound tables

2014-01-11 Thread Qiaowei Ren
entry. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 35 + arch/x86/kernel/Makefile |1 + arch/x86/kernel/mpx.c | 44 ++ arch/x86/kernel/traps.c| 46

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

2014-01-11 Thread Qiaowei Ren
userspace application can get violation address, lower bound and upper bound for bound violation from this new siginfo structure. Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/mpx.h | 39 + arch/x86/kernel/mpx.c | 289 arch/x86

[tip:x86/mpx] x86: replace futex_atomic_cmpxchg_inatomic() with user_atomic_cmpxchg_inatomic

2013-12-16 Thread tip-bot for Qiaowei Ren
Commit-ID: 0ee3b6f87d4d748d5362cb47ff33fa1553805cb4 Gitweb: http://git.kernel.org/tip/0ee3b6f87d4d748d5362cb47ff33fa1553805cb4 Author: Qiaowei Ren AuthorDate: Sat, 14 Dec 2013 14:25:03 +0800 Committer: H. Peter Anvin CommitDate: Mon, 16 Dec 2013 09:08:13 -0800 x86: replace

[tip:x86/mpx] x86: add user_atomic_cmpxchg_inatomic at uaccess.h

2013-12-16 Thread tip-bot for Qiaowei Ren
Commit-ID: f09174c501f8bb259788cc36d5a7aa5b2831fb5e Gitweb: http://git.kernel.org/tip/f09174c501f8bb259788cc36d5a7aa5b2831fb5e Author: Qiaowei Ren AuthorDate: Sat, 14 Dec 2013 14:25:02 +0800 Committer: H. Peter Anvin CommitDate: Mon, 16 Dec 2013 09:07:57 -0800 x86: add

[PATCH 1/2] x86: add user_atomic_cmpxchg_inatomic at uaccess.h

2013-12-13 Thread Qiaowei Ren
.) Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/uaccess.h | 91 1 files changed, 91 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h index 5838fa9..894d8bf 100644 --- a/arch/x86/include

[PATCH 2/2] x86: replace futex_atomic_cmpxchg_inatomic() with user_atomic_cmpxchg_inatomic

2013-12-13 Thread Qiaowei Ren
futex_atomic_cmpxchg_inatomic() is only the 32bit implementation of user_atomic_cmpxchg_inatomic(). This patch replaces it with user_atomic_cmpxchg_inatomic(). Signed-off-by: Qiaowei Ren --- arch/x86/include/asm/futex.h | 27 ++- 1 files changed, 2 insertions(+), 25

[PATCH] Documentation: move intel_txt.txt to Documentation/x86

2013-12-09 Thread Qiaowei Ren
Documentation/x86 is a more fitting place for intel_txt.txt. Signed-off-by: Qiaowei Ren --- Documentation/intel_txt.txt | 210 --- Documentation/x86/intel_txt.txt | 210 +++ 2 files changed, 210 insertions(+), 210

[tip:x86/cpufeature] x86, xsave: Support eager-only xsave features, add MPX support

2013-12-06 Thread tip-bot for Qiaowei Ren
Commit-ID: e7d820a5e549b3eb6c3f9467507566565646a669 Gitweb: http://git.kernel.org/tip/e7d820a5e549b3eb6c3f9467507566565646a669 Author: Qiaowei Ren AuthorDate: Thu, 5 Dec 2013 17:15:34 +0800 Committer: H. Peter Anvin CommitDate: Fri, 6 Dec 2013 17:17:42 -0800 x86, xsave: Support eager

[PATCH v3 3/3] X86, mpx: Intel MPX xstate feature definition

2013-12-06 Thread Qiaowei Ren
This patch defines xstate feature and extends struct xsave_hdr_struct to support Intel MPX. Signed-off-by: Qiaowei Ren Signed-off-by: Xudong Hao Signed-off-by: Liu Jinsong --- arch/x86/include/asm/processor.h | 12 arch/x86/include/asm/xsave.h |6 +- 2 files changed

[tip:x86/cpufeature] x86, cpufeature: Define the Intel MPX feature flag

2013-12-06 Thread tip-bot for Qiaowei Ren
Commit-ID: 191f57c137bcce0e3e9313acb77b2f114d15afbb Gitweb: http://git.kernel.org/tip/191f57c137bcce0e3e9313acb77b2f114d15afbb Author: Qiaowei Ren AuthorDate: Sat, 7 Dec 2013 08:20:57 +0800 Committer: H. Peter Anvin CommitDate: Fri, 6 Dec 2013 10:21:44 -0800 x86, cpufeature: Define

[PATCH v2 1/3] x86, mpx: add documentation on Intel MPX

2013-12-06 Thread Qiaowei Ren
This patch adds the Documentation/intel_mpx.txt file with some information about Intel MPX. Signed-off-by: Qiaowei Ren Signed-off-by: Xudong Hao Signed-off-by: Liu Jinsong --- Documentation/x86/intel_mpx.txt | 76 +++ 1 files changed, 76 insertions(+), 0

[PATCH v2 3/3] X86, mpx: Intel MPX xstate feature definition

2013-12-06 Thread Qiaowei Ren
This patch defines xstate feature and extends struct xsave_hdr_struct to support Intel MPX. Signed-off-by: Qiaowei Ren Signed-off-by: Xudong Hao Signed-off-by: Liu Jinsong --- arch/x86/include/asm/processor.h | 12 arch/x86/include/asm/xsave.h |5 - 2 files changed

[PATCH v2 2/3] X86, mpx: Intel MPX CPU feature definition

2013-12-06 Thread Qiaowei Ren
This patch defines Intel MPX CPU feature. Signed-off-by: Qiaowei Ren Signed-off-by: Xudong Hao Signed-off-by: Liu Jinsong --- arch/x86/include/asm/cpufeature.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm

[PATCH 3/3] X86, mpx: Intel MPX xstate feature definition

2013-12-06 Thread Qiaowei Ren
Signed-off-by: Qiaowei Ren Signed-off-by: Xudong Hao Signed-off-by: Liu Jinsong --- arch/x86/include/asm/processor.h | 23 +++ arch/x86/include/asm/xsave.h |6 +- 2 files changed, 28 insertions(+), 1 deletions(-) diff --git a/arch/x86/include/asm/processor.h

[PATCH 1/3] x86, mpx: add documentation on Intel MPX

2013-12-06 Thread Qiaowei Ren
This patch adds the Documentation/intel_mpx.txt file with some information about Intel MPX. Signed-off-by: Qiaowei Ren Signed-off-by: Xudong Hao Signed-off-by: Liu Jinsong --- Documentation/intel_mpx.txt | 77 +++ 1 files changed, 77 insertions(+), 0

[PATCH 2/3] X86, mpx: Intel MPX definition

2013-12-06 Thread Qiaowei Ren
Signed-off-by: Qiaowei Ren Signed-off-by: Xudong Hao Signed-off-by: Liu Jinsong --- arch/x86/include/asm/cpufeature.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index d3f5c63..6c2738d 100644

[PATCH v5] x86, tboot: iomem fixes

2013-07-20 Thread Qiaowei Ren
Current code doesn't use specific interface to access I/O space. So some potential bugs can be caused. We can fix this by using specific API. Signed-off-by: Qiaowei Ren --- arch/x86/kernel/tboot.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/arc

[PATCH] x86, tboot: iomem fixes

2013-07-19 Thread Qiaowei Ren
Current code doesn't use specific interface to access I/O space. So some potential bugs can be caused. We can fix this by using specific API. Signed-off-by: Qiaowei Ren --- arch/x86/kernel/tboot.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a

[PATCH v3] x86, tboot: iomem fixes

2013-07-18 Thread Qiaowei Ren
Current code doesn't use specific interface to access I/O space. So some potential bugs can be caused. We can fix this by using specific API. Signed-off-by: Qiaowei Ren --- arch/x86/kernel/tboot.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a

[PATCH v2] x86, tboot: iomem fixes

2013-07-17 Thread Qiaowei Ren
Fixes for iomem annotations in arch/x86/kernel/tboot.c Signed-off-by: Qiaowei Ren --- arch/x86/kernel/tboot.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c index 3ff42d2..afe8cf8 100644 --- a/arch

[PATCH] x86, tboot: iomem fixes

2013-07-04 Thread Qiaowei Ren
Fixes for iomem annotations in arch/x86/kernel/tboot.c Signed-off-by: Qiaowei Ren --- arch/x86/kernel/tboot.c | 43 +++ 1 file changed, 11 insertions(+), 32 deletions(-) diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c index 3ff42d2

[tip:x86/debug] x86/tboot: Provide debugfs interfaces to access TXT log

2013-06-28 Thread tip-bot for Qiaowei Ren
Commit-ID: 13bfd47a0ef68fc8b21e67873dbdf269c7db6b59 Gitweb: http://git.kernel.org/tip/13bfd47a0ef68fc8b21e67873dbdf269c7db6b59 Author: Qiaowei Ren AuthorDate: Mon, 24 Jun 2013 13:55:33 +0800 Committer: Ingo Molnar CommitDate: Fri, 28 Jun 2013 11:05:16 +0200 x86/tboot: Provide debugfs

[PATCH v2] x86, tboot: provide debugfs interfaces to access TXT log

2013-06-23 Thread Qiaowei Ren
These logs come from tboot (Trusted Boot, an open source, pre-kernel/VMM module that uses Intel TXT to perform a measured and verified launch of an OS kernel/VMM.). Signed-off-by: Qiaowei Ren --- arch/x86/kernel/tboot.c | 72 +++ 1 file changed, 72

[PATCH] x86, tboot: provide debugfs interfaces to access TXT log

2013-06-23 Thread Qiaowei Ren
These logs come from tboot (Trusted Boot, an open source, pre-kernel/VMM module that uses Intel TXT to perform a measured and verified launch of an OS kernel/VMM.). Signed-off-by: Qiaowei Ren --- arch/x86/kernel/tboot.c | 70 +++ 1 file changed, 70

  1   2   >