blob: e1c9eea6015b56b3a671813d0dfe2bc2f6d1cf61 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#ifndef _LINUX_IPC_H
3#define _LINUX_IPC_H
4
Robert P. J. Day0a3021f2007-07-15 23:39:57 -07005#include <linux/spinlock.h>
Eric W. Biederman1efdb692012-02-07 16:54:11 -08006#include <linux/uidgid.h>
NeilBrown0eb71a92018-06-18 12:52:50 +10007#include <linux/rhashtable-types.h>
David Howells607ca462012-10-13 10:46:48 +01008#include <uapi/linux/ipc.h>
Elena Reshetova9405c032017-09-08 16:17:45 -07009#include <linux/refcount.h>
Cedric Le Goaterb119f132006-10-04 02:15:19 -070010
Linus Torvalds1da177e2005-04-16 15:20:36 -070011/* used by in-kernel data structures */
Davidlohr Bueso60f3e002017-05-08 15:57:06 -070012struct kern_ipc_perm {
Linus Torvalds1da177e2005-04-16 15:20:36 -070013 spinlock_t lock;
Rafael Aquini72a8ff22014-01-27 17:07:02 -080014 bool deleted;
Nadia Derbey7ca7e562007-10-18 23:40:48 -070015 int id;
Linus Torvalds1da177e2005-04-16 15:20:36 -070016 key_t key;
Eric W. Biederman1efdb692012-02-07 16:54:11 -080017 kuid_t uid;
18 kgid_t gid;
19 kuid_t cuid;
20 kgid_t cgid;
Davidlohr Bueso60f3e002017-05-08 15:57:06 -070021 umode_t mode;
Linus Torvalds1da177e2005-04-16 15:20:36 -070022 unsigned long seq;
23 void *security;
Manfred Sprauldba4cdd2017-07-12 14:34:41 -070024
Guillaume Knispel0cfb6ae2017-09-08 16:17:55 -070025 struct rhash_head khtnode;
26
Manfred Sprauldba4cdd2017-07-12 14:34:41 -070027 struct rcu_head rcu;
Elena Reshetova9405c032017-09-08 16:17:45 -070028 refcount_t refcount;
Kees Cook3859a272016-10-28 01:22:25 -070029} ____cacheline_aligned_in_smp __randomize_layout;
Linus Torvalds1da177e2005-04-16 15:20:36 -070030
Linus Torvalds1da177e2005-04-16 15:20:36 -070031#endif /* _LINUX_IPC_H */