Commit 7f23292d5a6525a133d7cb8f2f33df39dd069822

Authored by David Gibson
Committed by Paul Mackerras
1 parent 457e04ca5c

[PATCH] powerpc: Keep fixing merged ipcbuf.h

Oops, replacing the two u64s in struct ipc64_perm with __u32s changed
the alignment of that structure, which could mess up userspace.
Revert to using two unsigned long longs (which is what ppc32 had
originally).  ppc64 orignally had two unsigned longs, but long long is
the same size on 64 bit, so this should be ok there too.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

Showing 1 changed file with 2 additions and 1 deletions Inline Diff

include/asm-powerpc/ipcbuf.h
1 #ifndef _ASM_POWERPC_IPCBUF_H 1 #ifndef _ASM_POWERPC_IPCBUF_H
2 #define _ASM_POWERPC_IPCBUF_H 2 #define _ASM_POWERPC_IPCBUF_H
3 3
4 /* 4 /*
5 * The ipc64_perm structure for the powerpc is identical to 5 * The ipc64_perm structure for the powerpc is identical to
6 * kern_ipc_perm as we have always had 32-bit UIDs and GIDs in the 6 * kern_ipc_perm as we have always had 32-bit UIDs and GIDs in the
7 * kernel. Note extra padding because this structure is passed back 7 * kernel. Note extra padding because this structure is passed back
8 * and forth between kernel and user space. Pad space is left for: 8 * and forth between kernel and user space. Pad space is left for:
9 * - 1 32-bit value to fill up for 8-byte alignment 9 * - 1 32-bit value to fill up for 8-byte alignment
10 * - 2 miscellaneous 64-bit values 10 * - 2 miscellaneous 64-bit values
11 * 11 *
12 * This program is free software; you can redistribute it and/or 12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License 13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 14 * as published by the Free Software Foundation; either version
15 * 2 of the License, or (at your option) any later version. 15 * 2 of the License, or (at your option) any later version.
16 */ 16 */
17 17
18 #include <linux/types.h> 18 #include <linux/types.h>
19 19
20 struct ipc64_perm 20 struct ipc64_perm
21 { 21 {
22 __kernel_key_t key; 22 __kernel_key_t key;
23 __kernel_uid_t uid; 23 __kernel_uid_t uid;
24 __kernel_gid_t gid; 24 __kernel_gid_t gid;
25 __kernel_uid_t cuid; 25 __kernel_uid_t cuid;
26 __kernel_gid_t cgid; 26 __kernel_gid_t cgid;
27 __kernel_mode_t mode; 27 __kernel_mode_t mode;
28 unsigned int seq; 28 unsigned int seq;
29 unsigned int __pad1; 29 unsigned int __pad1;
30 __u32 __unused[4]; 30 unsigned long long __unused1;
31 unsigned long long __unused2;
31 }; 32 };
32 33
33 #endif /* _ASM_POWERPC_IPCBUF_H */ 34 #endif /* _ASM_POWERPC_IPCBUF_H */
34 35