Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1704887 > unrolled thread
| Started by | Mikko Rapeli <mikko.rapeli@iki.fi> |
|---|---|
| First post | 2017-08-06 19:10 +0200 |
| Last post | 2017-08-09 01:20 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v06 19/36] uapi linux/omapfb.h: use __kernel_size_t instead of size_t Mikko Rapeli <mikko.rapeli@iki.fi> - 2017-08-06 19:10 +0200
Re: [PATCH v06 19/36] uapi linux/omapfb.h: use __kernel_size_t instead of size_t Arnd Bergmann <arnd@arndb.de> - 2017-08-07 17:10 +0200
Re: [PATCH v06 19/36] uapi linux/omapfb.h: use __kernel_size_t instead of size_t "Dmitry V. Levin" <ldv@altlinux.org> - 2017-08-09 01:20 +0200
| From | Mikko Rapeli <mikko.rapeli@iki.fi> |
|---|---|
| Date | 2017-08-06 19:10 +0200 |
| Subject | [PATCH v06 19/36] uapi linux/omapfb.h: use __kernel_size_t instead of size_t |
| Message-ID | <ubxdT-50T-1@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-08-07 17:10 +0200 |
| Subject | Re: [PATCH v06 19/36] uapi linux/omapfb.h: use __kernel_size_t instead of size_t |
| Message-ID | <ubRPk-1xo-27@gated-at.bofh.it> |
| In reply to | #1704887 |
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>
[toc] | [prev] | [next] | [standalone]
| From | "Dmitry V. Levin" <ldv@altlinux.org> |
|---|---|
| Date | 2017-08-09 01:20 +0200 |
| Subject | Re: [PATCH v06 19/36] uapi linux/omapfb.h: use __kernel_size_t instead of size_t |
| Message-ID | <uclX4-70m-15@gated-at.bofh.it> |
| In reply to | #1704887 |
[Multipart message — attachments visible in raw view] — view raw
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web