]> git.baikalelectronics.ru Git - kernel.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)
commit00dde5aa2318d31e0a5ad27fede55e0aa8cd3e35
tree64e6e91e1728dc333ea1a267c31f8076d95bb0ef
parent40da4f87b836bef23443cb14605bc958679ddbdf
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