Re: 2.6.4-mm1

Andi Kleen
2004-03-12T13:32:14Z

Joe Thornber <thornber@redhat.com> writes:

> Fix ioctl breakage on x86-64.
> --- diff/include/linux/dm-ioctl.h 2004-03-11 10:20:28.000000000 +0000
> +++ source/include/linux/dm-ioctl.h 2004-03-12 09:44:58.000000000 +0000
> @@ -187,23 +187,37 @@ enum {
> DM_TABLE_STATUS_CMD,
> };
>
> +/*
> + * The dm_ioctl struct passed into the ioctl is just the header
> + * on a larger chunk of memory. On x86-64 the dm-ioctl struct
> + * will be padded to an 8 byte boundary so the size will be
> + * different, which would change the ioctl code - yes I really
> + * messed up. This hack forces x86-64 to have the correct ioctl
> + * code.
> + */
> +#ifdef CONFIG_X86_64
> +typedef char ioctl_struct[308];
> +#else
> +typedef struct dm_ioctl ioctl_struct;
> +#endif

That's bad because it will break binary compatibility for existing
x86-64 systems. Don't add that please. Either emulate it properly
or I will just declare the 32bit DM emulation broken and users will
have to live with that.

-Andi