[dm-devel] Re: dm-ioctl on amd64 with 32bit userspace
Alasdair G Kergon
agk at redhat.com
Thu Sep 20 15:32:10 UTC 2007
On Mon, Sep 17, 2007 at 06:57:26PM +0200, Guido Guenther wrote:
> - if (new_name < (char *) (param + 1) ||
> + if (new_name < (char *) ((void*)(param + 1) - 4) ||
Does this (untested) also work for you?
+ if (new_name < (char *) (align_ptr(param + 1) - 4) ||
I think that's slightly better as it should leave the 32-bit
case unchanged.
One day, we'll fix all this properly by making the structure size in the
interface architecture-independent as it should have been in the first
place...
[http://www.kernel.org/pub/linux/kernel/people/agk/patches/2.6/editing/dm-ioctl-fix-compat-bounds-test.patch
but wait for it to resync]
Alasdair
--
agk at redhat.com
More information about the dm-devel
mailing list