From: Arnd Bergmann Date: Wed, 22 Feb 2017 19:21:22 +0000 (-0800) Subject: usercopy: ARM NOMMU has no 64-bit get_user X-Git-Tag: v4.11-rc1~84^2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=4deaa6fd00be2bf408dd06cdf0c40a1b59237879;p=linux.git usercopy: ARM NOMMU has no 64-bit get_user On a NOMMU ARM kernel, we get this link error: ERROR: "__get_user_bad" [lib/test_user_copy.ko] undefined! The problem is that the extended get_user/put_user definitions were only added for the normal (MMU based) case. We could add it for NOMMU as well, but it seems easier to just not call it, since no other code needs it. Fixes: 4c5d7bc63775 ("usercopy: Add tests for all get_user() sizes") Signed-off-by: Arnd Bergmann Signed-off-by: Kees Cook --- diff --git a/lib/test_user_copy.c b/lib/test_user_copy.c index 6f335a3d4ae2..1a8d71a68531 100644 --- a/lib/test_user_copy.c +++ b/lib/test_user_copy.c @@ -30,7 +30,8 @@ * As there doesn't appear to be anything that can safely determine * their capability at compile-time, we just have to opt-out certain archs. */ -#if BITS_PER_LONG == 64 || (!defined(CONFIG_AVR32) && \ +#if BITS_PER_LONG == 64 || (!(defined(CONFIG_ARM) && !defined(MMU)) && \ + !defined(CONFIG_AVR32) && \ !defined(CONFIG_BLACKFIN) && \ !defined(CONFIG_M32R) && \ !defined(CONFIG_M68K) && \