Re: [PATCH 3/5] perf_counter: rework ioctl()s

From: Peter Zijlstra
Date: Tue May 12 2009 - 02:27:47 EST


On Tue, 2009-05-12 at 16:22 +1000, Paul Mackerras wrote:
> Peter Zijlstra writes:
>
> > Hmm, are you saying that the 3rd argument to unlocked_ioctl is actually
> > (void __user *) instead of unsigned long?
>
> He's saying (correctly) that using _IOR or _IOW implies that the ioctl
> is going to read or write the memory location pointed to by the 3rd
> argument to unlocked_ioctl. If the 3rd argument is just a number, not
> an address, I believe you should use _IO.

Oh, somewhat confusing all this. Would be good to spell out these things
somewhere. Documentation/ioctl/ seems less than helpful.

--
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/