[PATCHv4] MTD: New ioctl calls for >4GiB device support
Arnd Bergmann
arnd at arndb.de
Tue Mar 31 06:51:03 EDT 2009
On Tuesday 31 March 2009, Kevin Cernekee wrote:
> +struct mtd_oob_buf64 {
> + uint64_t start;
> + uint32_t res0;
> + uint32_t length;
> + unsigned char __user *ptr;
> + uint32_t res1[8];
> +};
Does this have to use an indirect pointer? We normally try to avoid
ioctl interfaces like this, because they are hard to trace and you
need a compat wrapper. You might be able to at least avoid the wrapper
by defining the data structure with a __u64 to take the pointer.
If you leave the data structure the way it is, you should at least
move the compat_ioctl handling into mtdchar.c from compat_ioctl.c.
It will simplify your code and help reduce the size of the common
ioctl handling.
Arnd <><
More information about the linux-mtd
mailing list