Added safe user memory access APIs
authorDavide Libenzi <dlibenzi@google.com>
Thu, 15 Oct 2015 22:26:00 +0000 (15:26 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 30 Oct 2015 20:02:29 +0000 (16:02 -0400)
commit7349090f1e86f171fbb627b843da85c898b0f04b
tree35d2f3ab621b055c824bc92052afd0f14a29a2f4
parentb1fc762654be7f4131460096a487840e8c463326
Added safe user memory access APIs

Added safe user memory access APIs, which allows kernel code to
copy data to and from user memory, with zero cost on the fast path.
The exception table facility can also be used in other cases, where
we are executing a potentially faulting instruction.
The code is coming from the Linux kernel version 3.11.10, most of
it from the arch/x86/include/asm/uaccess.h include file.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
[Touched up checkpatch complaint and compiler.h]
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/uaccess.h [new file with mode: 0644]
kern/include/ex_table.h [new file with mode: 0644]
kern/src/ex_table.c [new file with mode: 0644]