[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200702201417.42872.arnd.bergmann@de.ibm.com>
Date: Tue, 20 Feb 2007 14:17:40 +0100
From: Arnd Bergmann <arnd.bergmann@...ibm.com>
To: dedekind@...radead.org
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Christoph Hellwig <hch@...radead.org>,
Frank Haverkamp <haver@...t.ibm.com>,
Josh Boyer <jwboyer@...ux.vnet.ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH 03/44 take 2] [UBI] user-space API header
On Tuesday 20 February 2007 14:07, Artem Bityutskiy wrote:
>
> > This structure is not suitable for an ioctl call, because it has
> > incompatible layout between 32 and 64 bit processes. The easiest
> > fix for this would be to change the 'name' field to an array
> > instead of a pointer.
>
> Will be fixed thanks. Just out of curiosity, could you please provide an
> example when this may be a problem.
On a 64 bit process with a 32 bit user app calling this ioctl, the kernel
would read the pointer value from the 8 bytes at the end, which means that
it will read four bytes after the end of the structure and interpret
whatever it finds as a pointer, instead of using only the first four
bytes as the lower half.
Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists