lkdtm/usercopy: Moves the KERNEL_DS test to non-canonical
authorKees Cook <keescook@chromium.org>
Sat, 6 Apr 2019 15:52:11 +0000 (08:52 -0700)
committerKees Cook <keescook@chromium.org>
Sun, 7 Apr 2019 17:38:31 +0000 (10:38 -0700)
commit2bf8496f6e9b7e9a557f65eb95eab16fea7958c7
tree057dce6a506b6507436b2d8225198a0e269df0e8
parent8c2ffd9174779014c3fe1f96d9dc3641d9175f00
lkdtm/usercopy: Moves the KERNEL_DS test to non-canonical

The prior implementation of the KERNEL_DS fault checking would work on
any unmapped kernel address, but this was narrowed to the non-canonical
range instead. This adjusts the LKDTM test to match.

Fixes: 00c42373d397 ("x86-64: add warning for non-canonical user access address dereferences")
Signed-off-by: Kees Cook <keescook@chromium.org>
drivers/misc/lkdtm/usercopy.c