All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3.19 0/3] Possible MPX improvements for 3.19
@ 2014-12-30  0:52 Andy Lutomirski
  2014-12-30  0:52 ` [PATCH 3.19 1/3] x86, mpx: Check user mode bitness correctly when decoding instructions Andy Lutomirski
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Andy Lutomirski @ 2014-12-30  0:52 UTC (permalink / raw)
  To: linux-kernel, x86, Dave Hansen, Thomas Gleixner; +Cc: Andy Lutomirski

I don't have the hardware, so this is only compile-tested.

Patches 1 and 2 should be safe.  Patch 1 is a bugfix, although given the
bitness sensitivity of the MPX data structures, any user code that hits
the bug is probably doomed to failure anyway.  Patch 2 is a hardening
change that adds almost no complexity (it's mostly just reordering some
code) that will make it considerably harder to exploit a possibly insn
decoder vulnerability using threads that modify MPX instructions that
send #BR before the trap handler runs.

Patch 3 will be much more controversial, since it's a complete ABI
break.  The ABI in question has never appeared in a released kernel,
though.  If patch 3 is not okay, then I want to fix the prctl
implementation to at least validate its arguments.

Andy Lutomirski (3):
  x86, mpx: Check user mode bitness correctly when decoding instructions
  x86, mpx: Short-circuit the instruction decoder for unexpected opcodes
  x86, mpx: Change the MPX enable/disable API to arch_prctl

 arch/x86/include/asm/ptrace.h     |  5 +++++
 arch/x86/include/uapi/asm/prctl.h | 15 +++++++++++----
 arch/x86/kernel/process_64.c      | 10 ++++++++++
 arch/x86/mm/mpx.c                 | 28 ++++++++++++++++++----------
 include/uapi/linux/prctl.h        |  6 ------
 kernel/sys.c                      | 12 ------------
 6 files changed, 44 insertions(+), 32 deletions(-)

-- 
2.1.0


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2015-01-12 22:48 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-30  0:52 [PATCH 3.19 0/3] Possible MPX improvements for 3.19 Andy Lutomirski
2014-12-30  0:52 ` [PATCH 3.19 1/3] x86, mpx: Check user mode bitness correctly when decoding instructions Andy Lutomirski
2015-01-07 17:22   ` Dave Hansen
2015-01-12 22:48     ` Andy Lutomirski
2014-12-30  0:52 ` [PATCH 3.19 2/3] x86, mpx: Short-circuit the instruction decoder for unexpected opcodes Andy Lutomirski
2014-12-30  0:58   ` Andy Lutomirski
2014-12-30  0:52 ` [PATCH 3.19 3/3] x86, mpx: Change the MPX enable/disable API to arch_prctl Andy Lutomirski
2015-01-02  7:53   ` Dave Hansen
2015-01-05 20:42     ` Andi Kleen
2015-01-05 21:18       ` Dave Hansen
2015-01-05 23:04         ` Andy Lutomirski
2015-01-05 23:10           ` Dave Hansen
2015-01-05 23:22             ` Andy Lutomirski
2015-01-06  4:04           ` Andi Kleen
2015-01-06  5:59             ` Andy Lutomirski
2015-01-06 17:48               ` Dave Hansen
2015-01-06 18:06                 ` Andy Lutomirski
2015-01-06 18:30                   ` Dave Hansen
2015-01-06 18:41                     ` Andy Lutomirski
2015-01-06 18:54                       ` Dave Hansen
2015-01-06 19:16                         ` Andi Kleen
2015-01-06 19:51                           ` Andy Lutomirski
2015-01-06 21:22                             ` Andi Kleen
2015-01-06 21:34                               ` Andy Lutomirski
2015-01-06 21:39                                 ` Andi Kleen
2015-01-12 10:34                     ` Enkovich, Ilya
2015-01-07 23:18           ` Dave Hansen
2015-01-07 23:24             ` Andy Lutomirski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.