Hi,

ninjaboy <[EMAIL PROTECTED]> writes:

> 2008/7/18 Robert P. J. Day <[EMAIL PROTECTED]>:
>>
>>  from <linux/compiler.h>:
>>
>>    extern void __chk_user_ptr(const volatile void __user *);
>>    extern void __chk_io_ptr(const volatile void __iomem *);
>>
>>  ok, so ... where are those routines defined?  i've grep'ped and i
>> don't see the definitions.  am i missing something?
>
> They are not defined, this is a trick to take an error at compile
> time, where there is probably an if(sizeof(something) > {1,2,4,8}).

This is not a linker-trap.

I have this in include/linux/compiler.h:

#ifdef __CHECKER__
[...]
extern void __chk_user_ptr(const volatile void __user *);
extern void __chk_io_ptr(const volatile void __iomem *);
[...]
#else
[...]
# define __chk_user_ptr(x) (void)0
# define __chk_io_ptr(x) (void)0
[...]
#endif

If sparse sees this, it will check the argument types.  In normal
compile runs, this will just be thrown out.

        Hannes, wild guessing

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to