16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 28a1ab315SDavid Howells #ifndef __ASM_GENERIC_IPCBUF_H 38a1ab315SDavid Howells #define __ASM_GENERIC_IPCBUF_H 48a1ab315SDavid Howells 5*5b009673SMasahiro Yamada #include <linux/posix_types.h> 6*5b009673SMasahiro Yamada 78a1ab315SDavid Howells /* 88a1ab315SDavid Howells * The generic ipc64_perm structure: 98a1ab315SDavid Howells * Note extra padding because this structure is passed back and forth 108a1ab315SDavid Howells * between kernel and user space. 118a1ab315SDavid Howells * 128a1ab315SDavid Howells * ipc64_perm was originally meant to be architecture specific, but 138a1ab315SDavid Howells * everyone just ended up making identical copies without specific 148a1ab315SDavid Howells * optimizations, so we may just as well all use the same one. 158a1ab315SDavid Howells * 168a1ab315SDavid Howells * Pad space is left for: 178a1ab315SDavid Howells * - 32-bit mode_t on architectures that only had 16 bit 188a1ab315SDavid Howells * - 32-bit seq 198a1ab315SDavid Howells * - 2 miscellaneous 32-bit values 208a1ab315SDavid Howells */ 218a1ab315SDavid Howells 228a1ab315SDavid Howells struct ipc64_perm { 238a1ab315SDavid Howells __kernel_key_t key; 248a1ab315SDavid Howells __kernel_uid32_t uid; 258a1ab315SDavid Howells __kernel_gid32_t gid; 268a1ab315SDavid Howells __kernel_uid32_t cuid; 278a1ab315SDavid Howells __kernel_gid32_t cgid; 288a1ab315SDavid Howells __kernel_mode_t mode; 298a1ab315SDavid Howells /* pad if mode_t is u16: */ 308a1ab315SDavid Howells unsigned char __pad1[4 - sizeof(__kernel_mode_t)]; 318a1ab315SDavid Howells unsigned short seq; 328a1ab315SDavid Howells unsigned short __pad2; 33071ed245SH.J. Lu __kernel_ulong_t __unused1; 34071ed245SH.J. Lu __kernel_ulong_t __unused2; 358a1ab315SDavid Howells }; 368a1ab315SDavid Howells 378a1ab315SDavid Howells #endif /* __ASM_GENERIC_IPCBUF_H */ 38