Jann Horn 75045f77f7 x86/extable: Introduce _ASM_EXTABLE_UA for uaccess fixups
Currently, most fixups for attempting to access userspace memory are
handled using _ASM_EXTABLE, which is also used for various other types of
fixups (e.g. safe MSR access, IRET failures, and a bunch of other things).
In order to make it possible to add special safety checks to uaccess fixups
(in particular, checking whether the fault address is actually in
userspace), introduce a new exception table handler ex_handler_uaccess()
and wire it up to all the user access fixups (excluding ones that
already use _ASM_EXTABLE_EX).

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Kees Cook <keescook@chromium.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: kernel-hardening@lists.openwall.com
Cc: dvyukov@google.com
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Cc: Borislav Petkov <bp@alien8.de>
Link: https://lkml.kernel.org/r/20180828201421.157735-5-jannh@google.com
2018-09-03 15:12:09 +02:00
..
2018-08-19 10:38:36 -07:00
2018-07-25 11:53:59 +02:00
2018-02-15 01:15:50 +01:00
2018-07-25 11:53:59 +02:00
2018-03-20 10:01:57 +01:00
2018-01-30 15:08:27 +01:00
2018-05-19 13:55:40 +02:00
2018-08-19 10:38:36 -07:00
2018-08-15 13:44:10 -07:00
2017-12-22 20:13:04 +01:00
2017-12-04 10:56:53 +10:00
2018-08-19 10:38:36 -07:00
2017-12-22 20:13:01 +01:00
2018-08-19 10:38:36 -07:00
2017-07-26 13:18:20 +02:00
2018-05-07 07:15:41 +02:00
2018-06-07 10:23:33 -07:00
2018-07-20 01:11:45 +02:00
2017-11-15 18:21:05 -08:00
2018-03-28 22:47:06 +02:00
2018-03-20 10:01:57 +01:00
2018-05-09 21:41:38 +02:00
2018-09-01 23:01:56 +02:00
2017-11-15 18:21:04 -08:00