Re: [PATCH] Use __kernel_long_t in struct mq_attr

2013-12-26 Thread H.J. Lu
On Thu, Dec 26, 2013 at 10:03 AM, H. Peter Anvin wrote: > On 12/26/2013 09:59 AM, H.J. Lu wrote: >> >>> but it would seem to give the wrong types when __BITS_PER_LONG in >>> userspace is 32. >>> >> >> For x32, __BITS_PER_LONG is 64, not 32. If __BITS_PER_LONG >> is 32, my patch doesn't change an

Re: [PATCH] Use __kernel_long_t in struct mq_attr

2013-12-26 Thread H. Peter Anvin
On 12/26/2013 09:59 AM, H.J. Lu wrote: > >> but it would seem to give the wrong types when __BITS_PER_LONG in >> userspace is 32. >> > > For x32, __BITS_PER_LONG is 64, not 32. If __BITS_PER_LONG > is 32, my patch doesn't change anything. If it works before, > it still works. If it is broken

Re: [PATCH] Use __kernel_long_t in struct mq_attr

2013-12-26 Thread H.J. Lu
On Thu, Dec 26, 2013 at 9:53 AM, H. Peter Anvin wrote: > On 12/26/2013 07:54 AM, H.J. Lu wrote: >> On Wed, Dec 25, 2013 at 08:58:34AM -0800, H.J. Lu wrote: >>> Both x32 and x86-64 use the same struct mq_attr for system calls. But >>> x32 long is 32-bit. This patch replaces long with __kernel_long

Re: [PATCH] Use __kernel_long_t in struct mq_attr

2013-12-26 Thread H. Peter Anvin
On 12/26/2013 07:54 AM, H.J. Lu wrote: > On Wed, Dec 25, 2013 at 08:58:34AM -0800, H.J. Lu wrote: >> Both x32 and x86-64 use the same struct mq_attr for system calls. But >> x32 long is 32-bit. This patch replaces long with __kernel_long_t in >> struct mq_attr. >> > > Here is the updated patch wh

Re: [PATCH] Use __kernel_long_t in struct mq_attr

2013-12-26 Thread H.J. Lu
ng_t only if __BITS_PER_LONG == 64. H.J. >From fc117a05dd0a4a9ec7e6ae286aac9433609ce155 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 25 Dec 2013 08:56:22 -0800 Subject: [PATCH] Use __kernel_long_t in struct mq_attr Both x32 and x86-64 use the same struct mq_attr for system calls. But

[PATCH] Use __kernel_long_t in struct mq_attr

2013-12-25 Thread H.J. Lu
Both x32 and x86-64 use the same struct mq_attr for system calls. But x32 long is 32-bit. This patch replaces long with __kernel_long_t in struct mq_attr. Signed-off-by: H.J. Lu --- include/uapi/linux/mqueue.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includ