162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 262306a36Sopenharmony_ci#ifndef __ASM_GENERIC_IPCBUF_H 362306a36Sopenharmony_ci#define __ASM_GENERIC_IPCBUF_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#include <linux/posix_types.h> 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci/* 862306a36Sopenharmony_ci * The generic ipc64_perm structure: 962306a36Sopenharmony_ci * Note extra padding because this structure is passed back and forth 1062306a36Sopenharmony_ci * between kernel and user space. 1162306a36Sopenharmony_ci * 1262306a36Sopenharmony_ci * ipc64_perm was originally meant to be architecture specific, but 1362306a36Sopenharmony_ci * everyone just ended up making identical copies without specific 1462306a36Sopenharmony_ci * optimizations, so we may just as well all use the same one. 1562306a36Sopenharmony_ci * 1662306a36Sopenharmony_ci * Pad space is left for: 1762306a36Sopenharmony_ci * - 32-bit mode_t on architectures that only had 16 bit 1862306a36Sopenharmony_ci * - 32-bit seq 1962306a36Sopenharmony_ci * - 2 miscellaneous 32-bit values 2062306a36Sopenharmony_ci */ 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_cistruct ipc64_perm { 2362306a36Sopenharmony_ci __kernel_key_t key; 2462306a36Sopenharmony_ci __kernel_uid32_t uid; 2562306a36Sopenharmony_ci __kernel_gid32_t gid; 2662306a36Sopenharmony_ci __kernel_uid32_t cuid; 2762306a36Sopenharmony_ci __kernel_gid32_t cgid; 2862306a36Sopenharmony_ci __kernel_mode_t mode; 2962306a36Sopenharmony_ci /* pad if mode_t is u16: */ 3062306a36Sopenharmony_ci unsigned char __pad1[4 - sizeof(__kernel_mode_t)]; 3162306a36Sopenharmony_ci unsigned short seq; 3262306a36Sopenharmony_ci unsigned short __pad2; 3362306a36Sopenharmony_ci __kernel_ulong_t __unused1; 3462306a36Sopenharmony_ci __kernel_ulong_t __unused2; 3562306a36Sopenharmony_ci}; 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#endif /* __ASM_GENERIC_IPCBUF_H */ 38