Re: Being more anal about iospace accesses..
From: Chris Wedgwood
Date: Wed Sep 15 2004 - 13:43:06 EST
On Wed, Sep 15, 2004 at 10:07:29AM -0700, Linus Torvalds wrote:
> C doesn't. gcc does. It's a documented extension, and it acts like
> if it was done on a byte.
[...]
> It's a singularly good feature.
I dunno about that. Maybe it is, but it has some gotchas.
Recently when doing a sparsification of code I noticed there are
places which essentially do things like:
void *foo;
[...]
foo += bar * n;
Part of the fix (cleanup) was to change the 'void *foo' to
'gratuitous_typedef_t __user *foo' --- which silently breaks the math
if you don't explicitly check for this.
--cw
-
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/