Re: [PATCH v06 21/36] uapi linux/kexec.h: use __kernel_size_t instead of size_t

2017-08-08 Thread Dmitry V. Levin
On Sun, Aug 06, 2017 at 06:44:12PM +0200, Mikko Rapeli wrote:
> Fixes userspace compilation error:
> 
> error: unknown type name ‘size_t’
>   size_t bufsz;
> 
> Signed-off-by: Mikko Rapeli 
> Cc: ke...@lists.infradead.org
> Cc: Eric Biederman 
> ---
>  include/uapi/linux/kexec.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/uapi/linux/kexec.h b/include/uapi/linux/kexec.h
> index aae5ebf2022b..f964d83b2757 100644
> --- a/include/uapi/linux/kexec.h
> +++ b/include/uapi/linux/kexec.h
> @@ -51,9 +51,9 @@
>   */
>  struct kexec_segment {
>   const void *buf;
> - size_t bufsz;
> + __kernel_size_t bufsz;
>   const void *mem;
> - size_t memsz;
> + __kernel_size_t memsz;

No, this is definitely wrong as it breaks x32.
I submitted an alternative fix some time ago, see
http://lkml.kernel.org/r/2017024646.gc14...@altlinux.org


-- 
ldv


signature.asc
Description: PGP signature


Re: [PATCH v06 21/36] uapi linux/kexec.h: use __kernel_size_t instead of size_t

2017-08-08 Thread Dmitry V. Levin
On Sun, Aug 06, 2017 at 06:44:12PM +0200, Mikko Rapeli wrote:
> Fixes userspace compilation error:
> 
> error: unknown type name ‘size_t’
>   size_t bufsz;
> 
> Signed-off-by: Mikko Rapeli 
> Cc: ke...@lists.infradead.org
> Cc: Eric Biederman 
> ---
>  include/uapi/linux/kexec.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/uapi/linux/kexec.h b/include/uapi/linux/kexec.h
> index aae5ebf2022b..f964d83b2757 100644
> --- a/include/uapi/linux/kexec.h
> +++ b/include/uapi/linux/kexec.h
> @@ -51,9 +51,9 @@
>   */
>  struct kexec_segment {
>   const void *buf;
> - size_t bufsz;
> + __kernel_size_t bufsz;
>   const void *mem;
> - size_t memsz;
> + __kernel_size_t memsz;

No, this is definitely wrong as it breaks x32.
I submitted an alternative fix some time ago, see
http://lkml.kernel.org/r/2017024646.gc14...@altlinux.org


-- 
ldv


signature.asc
Description: PGP signature


Re: [PATCH v06 21/36] uapi linux/kexec.h: use __kernel_size_t instead of size_t

2017-08-07 Thread Arnd Bergmann
On Sun, Aug 6, 2017 at 6:44 PM, Mikko Rapeli  wrote:
> Fixes userspace compilation error:
>
> error: unknown type name ‘size_t’
>   size_t bufsz;
>
> Signed-off-by: Mikko Rapeli 
> Cc: ke...@lists.infradead.org
> Cc: Eric Biederman 

Acked-by: Arnd Bergmann 


Re: [PATCH v06 21/36] uapi linux/kexec.h: use __kernel_size_t instead of size_t

2017-08-07 Thread Arnd Bergmann
On Sun, Aug 6, 2017 at 6:44 PM, Mikko Rapeli  wrote:
> Fixes userspace compilation error:
>
> error: unknown type name ‘size_t’
>   size_t bufsz;
>
> Signed-off-by: Mikko Rapeli 
> Cc: ke...@lists.infradead.org
> Cc: Eric Biederman 

Acked-by: Arnd Bergmann 


[PATCH v06 21/36] uapi linux/kexec.h: use __kernel_size_t instead of size_t

2017-08-06 Thread Mikko Rapeli
Fixes userspace compilation error:

error: unknown type name ‘size_t’
  size_t bufsz;

Signed-off-by: Mikko Rapeli 
Cc: ke...@lists.infradead.org
Cc: Eric Biederman 
---
 include/uapi/linux/kexec.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/kexec.h b/include/uapi/linux/kexec.h
index aae5ebf2022b..f964d83b2757 100644
--- a/include/uapi/linux/kexec.h
+++ b/include/uapi/linux/kexec.h
@@ -51,9 +51,9 @@
  */
 struct kexec_segment {
const void *buf;
-   size_t bufsz;
+   __kernel_size_t bufsz;
const void *mem;
-   size_t memsz;
+   __kernel_size_t memsz;
 };
 
 #endif /* __KERNEL__ */
-- 
2.13.3



[PATCH v06 21/36] uapi linux/kexec.h: use __kernel_size_t instead of size_t

2017-08-06 Thread Mikko Rapeli
Fixes userspace compilation error:

error: unknown type name ‘size_t’
  size_t bufsz;

Signed-off-by: Mikko Rapeli 
Cc: ke...@lists.infradead.org
Cc: Eric Biederman 
---
 include/uapi/linux/kexec.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/kexec.h b/include/uapi/linux/kexec.h
index aae5ebf2022b..f964d83b2757 100644
--- a/include/uapi/linux/kexec.h
+++ b/include/uapi/linux/kexec.h
@@ -51,9 +51,9 @@
  */
 struct kexec_segment {
const void *buf;
-   size_t bufsz;
+   __kernel_size_t bufsz;
const void *mem;
-   size_t memsz;
+   __kernel_size_t memsz;
 };
 
 #endif /* __KERNEL__ */
-- 
2.13.3