Re: ioctl get_info: Bad address
Brought to you by:
aeb,
bencollins
From: Stefan R. <st...@s5...> - 2011-08-09 20:33:07
|
On Aug 09 Stefan Richter wrote: > +#ifdef CONFIG_COMPAT > +static inline void __user *u64_to_uptr(__u64 value) > +{ > + if (is_compat_task()) > + return compat_ptr(value); > + else > + return (void __user *)(unsigned long)value; > +} > + > +static inline __u64 uptr_to_u64(void __user *ptr) > +{ > + if (is_compat_task()) > + return ptr_to_compat(ptr); > + else > + return (__u64)(unsigned long)ptr; > +} [...] > gcc 4.4.5 x86-64 makes this of it: > > size before size after delta > --------------------------------------------------------------- > CONFIG_CC_OPTIMIZE_FOR_SIZE=y > core-cdev.s 342946 352407 +9461 > core-cdev.o 126544 130600 +4056 > firewire-core.ko 454874 458930 +4056 > --------------------------------------------------------------- > CONFIG_CC_OPTIMIZE_FOR_SIZE=n > core-cdev.s 369209 379158 +9949 > core-cdev.o 133488 137616 +4128 > firewire-core.ko 481898 486002 +4104 > > Is it worthwhile? PS: Same result if the "inline"s are omitted. CONFIG_OPTIMIZE_INLINING=n -- Stefan Richter -=====-==-== =--- -=--= http://arcgraph.de/sr/ |