* [PATCH v06 19/36] uapi linux/omapfb.h: use __kernel_size_t instead of size_t [not found] <20170806164428.2273-1-mikko.rapeli@iki.fi> @ 2017-08-06 16:44 ` Mikko Rapeli 2017-08-07 15:00 ` Arnd Bergmann 2017-08-08 23:11 ` Dmitry V. Levin 0 siblings, 2 replies; 3+ messages in thread From: Mikko Rapeli @ 2017-08-06 16:44 UTC (permalink / raw) To: linux-kernel, linux-api Cc: Mikko Rapeli, linux-omap, Tomi Valkeinen, Aaro Koskinen Fixes userspace compilation error: error: unknown type name ‘size_t’ Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi> Cc: linux-omap@vger.kernel.org Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Aaro Koskinen <aaro.koskinen@iki.fi> --- include/uapi/linux/omapfb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/omapfb.h b/include/uapi/linux/omapfb.h index 7c97bc00ac6d..b637a924618f 100644 --- a/include/uapi/linux/omapfb.h +++ b/include/uapi/linux/omapfb.h @@ -181,7 +181,7 @@ struct omapfb_memory_read { __u16 y; __u16 w; __u16 h; - size_t buffer_size; + __kernel_size_t buffer_size; void __user *buffer; }; -- 2.13.3 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v06 19/36] uapi linux/omapfb.h: use __kernel_size_t instead of size_t 2017-08-06 16:44 ` [PATCH v06 19/36] uapi linux/omapfb.h: use __kernel_size_t instead of size_t Mikko Rapeli @ 2017-08-07 15:00 ` Arnd Bergmann 2017-08-08 23:11 ` Dmitry V. Levin 1 sibling, 0 replies; 3+ messages in thread From: Arnd Bergmann @ 2017-08-07 15:00 UTC (permalink / raw) To: Mikko Rapeli Cc: Linux Kernel Mailing List, Linux API, linux-omap, Tomi Valkeinen, Aaro Koskinen On Sun, Aug 6, 2017 at 6:44 PM, Mikko Rapeli <mikko.rapeli@iki.fi> wrote: > Fixes userspace compilation error: > > error: unknown type name ‘size_t’ > > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi> > Cc: linux-omap@vger.kernel.org > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> > Cc: Aaro Koskinen <aaro.koskinen@iki.fi> Acked-by: Arnd Bergmann <arnd@arndb.de> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v06 19/36] uapi linux/omapfb.h: use __kernel_size_t instead of size_t 2017-08-06 16:44 ` [PATCH v06 19/36] uapi linux/omapfb.h: use __kernel_size_t instead of size_t Mikko Rapeli 2017-08-07 15:00 ` Arnd Bergmann @ 2017-08-08 23:11 ` Dmitry V. Levin 1 sibling, 0 replies; 3+ messages in thread From: Dmitry V. Levin @ 2017-08-08 23:11 UTC (permalink / raw) To: Mikko Rapeli Cc: linux-kernel, linux-api, linux-omap, Tomi Valkeinen, Aaro Koskinen [-- Attachment #1: Type: text/plain, Size: 1440 bytes --] On Sun, Aug 06, 2017 at 06:44:10PM +0200, Mikko Rapeli wrote: > Fixes userspace compilation error: > > error: unknown type name ‘size_t’ > > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi> > Cc: linux-omap@vger.kernel.org > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> > Cc: Aaro Koskinen <aaro.koskinen@iki.fi> > --- > include/uapi/linux/omapfb.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/uapi/linux/omapfb.h b/include/uapi/linux/omapfb.h > index 7c97bc00ac6d..b637a924618f 100644 > --- a/include/uapi/linux/omapfb.h > +++ b/include/uapi/linux/omapfb.h > @@ -181,7 +181,7 @@ struct omapfb_memory_read { > __u16 y; > __u16 w; > __u16 h; > - size_t buffer_size; > + __kernel_size_t buffer_size; > void __user *buffer; > }; You generally cannot replace size_t with __kernel_size_t in a header that affects x32, but this case is really bad one: the kernel treats struct omapfb_memory_read.buffer_size as __kernel_size_t, while x32 userspace treats it as size_t. As result, the offset of struct omapfb_memory_read.buffer on x32 is different between the kernel and userspace. In other words, the whole thing seems to be totally broken on x32 already and it's not important whether you use __kernel_size_t or __kernel_uapi_size_t as a type of struct omapfb_memory_read.buffer_size. This deserves a word in the commit message, though. -- ldv [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-08 23:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170806164428.2273-1-mikko.rapeli@iki.fi>
2017-08-06 16:44 ` [PATCH v06 19/36] uapi linux/omapfb.h: use __kernel_size_t instead of size_t Mikko Rapeli
2017-08-07 15:00 ` Arnd Bergmann
2017-08-08 23:11 ` Dmitry V. Levin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox