1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _LINUX_IPC_H
3#define _LINUX_IPC_H
4
5#include <linux/spinlock_types.h>
6#include <linux/uidgid.h>
7#include <linux/rhashtable-types.h>
8#include <uapi/linux/ipc.h>
9#include <linux/refcount.h>
10
11/* used by in-kernel data structures */
12struct kern_ipc_perm {
13	spinlock_t	lock;
14	bool		deleted;
15	int		id;
16	key_t		key;
17	kuid_t		uid;
18	kgid_t		gid;
19	kuid_t		cuid;
20	kgid_t		cgid;
21	umode_t		mode;
22	unsigned long	seq;
23	void		*security;
24
25	struct rhash_head khtnode;
26
27	struct rcu_head rcu;
28	refcount_t refcount;
29} ____cacheline_aligned_in_smp __randomize_layout;
30
31#endif /* _LINUX_IPC_H */
32