]> asedeno.scripts.mit.edu Git - linux.git/commit
usercopy: Adjust tests to deal with SMAP/PAN
authorKees Cook <keescook@chromium.org>
Mon, 13 Feb 2017 19:25:26 +0000 (11:25 -0800)
committerKees Cook <keescook@chromium.org>
Fri, 17 Feb 2017 00:34:59 +0000 (16:34 -0800)
commitf5f893c57e37ca730808cb2eee3820abd05e7507
tree64e6e91e1728dc333ea1a267c31f8076d95bb0ef
parent4fbfeb8bd684d564bddeff1e3723d3d9f99aa5de
usercopy: Adjust tests to deal with SMAP/PAN

Under SMAP/PAN/etc, we cannot write directly to userspace memory, so
this rearranges the test bytes to get written through copy_to_user().
Additionally drops the bad copy_from_user() test that would trigger a
memcpy() against userspace on failure.

Signed-off-by: Kees Cook <keescook@chromium.org>
lib/test_user_copy.c