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