lkml.org 
[lkml]   [2009]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 20/30] microblaze_mmu_v1: uaccess MMU update
Date
On Wednesday 29 April 2009, Michal Simek wrote:
> For powerpc I found these tree references. Where is the __get_user_bad definition?

> arch/powerpc/include/asm/uaccess.h:216:extern long __get_user_bad(void);
> arch/powerpc/include/asm/uaccess.h:263:         (x) = __get_user_bad();                         \
> arch/powerpc/include/asm/uaccess.h:269: default: (x) = __get_user_bad();                        \
>

As I tried to explain, the whole point is that there is no definition
at all, just a declaration.
Normally, the compiler will discard the 'default:' case of get_user,
so the function is not called. However, if you pass a variable of
a length other than 1, 2, or 4, the compiler will generate a function
call to __get_user_bad in the object file. When you try to link
the kernel afterwards, you will get an error message like

Unknown symbol __get_user_bad" for drivers/foo/bar.o

which tells you that some function in drivers/foo/bar.c calls
get_user with an invalid argument.

Arnd <><
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-04-29 18:01    [W:1.878 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site