^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef __ASM_GENERIC_IPCBUF_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define __ASM_GENERIC_IPCBUF_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #include <linux/posix_types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * The generic ipc64_perm structure:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * Note extra padding because this structure is passed back and forth
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) * between kernel and user space.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) * ipc64_perm was originally meant to be architecture specific, but
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) * everyone just ended up making identical copies without specific
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) * optimizations, so we may just as well all use the same one.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) * Pad space is left for:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) * - 32-bit mode_t on architectures that only had 16 bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) * - 32-bit seq
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) * - 2 miscellaneous 32-bit values
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) struct ipc64_perm {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) __kernel_key_t key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) __kernel_uid32_t uid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) __kernel_gid32_t gid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) __kernel_uid32_t cuid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) __kernel_gid32_t cgid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) __kernel_mode_t mode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) /* pad if mode_t is u16: */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) unsigned char __pad1[4 - sizeof(__kernel_mode_t)];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) unsigned short seq;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) unsigned short __pad2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) __kernel_ulong_t __unused1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) __kernel_ulong_t __unused2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) #endif /* __ASM_GENERIC_IPCBUF_H */