Re: [PATCH 4/4] asm-generic: uaccess: fix access_ok() prototype
From: Mike Frysinger
Date: Tue Jun 16 2009 - 06:35:15 EST
On Sun, Jun 14, 2009 at 16:17, Arnd Bergmann wrote:
> On Sunday 14 June 2009, Mike Frysinger wrote:
>> @@ -37,14 +37,14 @@ static inline void set_fs(mm_segment_t fs)
>> Â#define VERIFY_READ Â Â0
>> Â#define VERIFY_WRITE Â 1
>> -#define access_ok(type, addr, size) __access_ok((unsigned long)(addr),(size))
>> +#define access_ok(type, addr, size) __access_ok((addr), (size))
>> Â * The architecture should really override this if possible, at least
> Upon actually testing this change, it turns out that this causes more
> trouble because of having to pass down pointers that may have 'const'
> or 'volatile' modifiers. I'm sure there is a way to do this correctly,
> but most architectures seem to cope well with 'unsigned long' here,
> and your patch 3/4 solves the original problem nicely.
yeah, i ended up making the Blackfin access_ok replacement cast the
first argument to an unsigned long to avoid those warnings ;). i
guess we can just leave this alone for a rainy day ...
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/