Skip to content

Commit

Permalink
usercopy: ARM NOMMU has no 64-bit get_user
Browse files Browse the repository at this point in the history
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: 4c5d7bc ("usercopy: Add tests for all get_user() sizes")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
  • Loading branch information
Arnd Bergmann authored and Kees Cook committed Feb 22, 2017
1 parent 4c5d7bc commit 4deaa6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/test_user_copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) && \
Expand Down

0 comments on commit 4deaa6f

Please sign in to comment.