This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] aarch64: Fix ipc_perm definition for ILP32
- From: Yury Norov <ynorov at caviumnetworks dot com>
- To: Steve Ellcey <sellcey at cavium dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Wed, 23 Aug 2017 11:47:23 +0300
- Subject: Re: [PATCH] aarch64: Fix ipc_perm definition for ILP32
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Yuri dot Norov at cavium dot com;
- References: <1503423981.28672.31.camel@cavium.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hi Steve,
On Tue, Aug 22, 2017 at 10:46:21AM -0700, Steve Ellcey wrote:
> Here is another aarch64 ILP32 patch. The mode field in ipc_perm in ILP32
> should be a 16 bit field, not a 32 bit one. This was out-of-sync with what the
> kernel had. This was causing sysvipc/test-sysvsem to fail in ILP32 mode.
> This change is only needed for ILP32 so it doesn't need to go in until we add
> that ABI but I am sending out for review and comments.
>
> 2017-08-22 Yury Norov <ynorov@caviumnetworks.com>
> Steve Ellcey <sellcey@cavium.com>
>
> * sysdeps/unix/sysv/linux/aarch64/bits/ipc.h (ipc_perm):
> Ifdef and pad the mode field for ILP32.
>
>
> diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/ipc.h b/sysdeps/unix/sysv/linu
> x/aarch64/bits/ipc.h
> index cd1f06e..cd05b74 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/bits/ipc.h
> +++ b/sysdeps/unix/sysv/linux/aarch64/bits/ipc.h
> @@ -46,7 +46,12 @@ struct ipc_perm
> __gid_t gid; /* Owner's group ID. */
> __uid_t cuid; /* Creator's user ID. */
> __gid_t cgid; /* Creator's group ID. */
> +#ifdef __LP64
This is my typo. It should be
#ifdef __LP64__
> unsigned int mode; /* Read/write permission. */
> +#else
> + unsigned short int mode; /* Read/write permission. */
> + unsigned short int __pad0;
> +#endif
> unsigned short int __seq; /* Sequence number. */
> unsigned short int __pad1;
> __syscall_ulong_t __glibc_reserved1;