pr.h (1088B)
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2#ifndef _UAPI_PR_H 3#define _UAPI_PR_H 4 5#include <linux/types.h> 6 7enum pr_type { 8 PR_WRITE_EXCLUSIVE = 1, 9 PR_EXCLUSIVE_ACCESS = 2, 10 PR_WRITE_EXCLUSIVE_REG_ONLY = 3, 11 PR_EXCLUSIVE_ACCESS_REG_ONLY = 4, 12 PR_WRITE_EXCLUSIVE_ALL_REGS = 5, 13 PR_EXCLUSIVE_ACCESS_ALL_REGS = 6, 14}; 15 16struct pr_reservation { 17 __u64 key; 18 __u32 type; 19 __u32 flags; 20}; 21 22struct pr_registration { 23 __u64 old_key; 24 __u64 new_key; 25 __u32 flags; 26 __u32 __pad; 27}; 28 29struct pr_preempt { 30 __u64 old_key; 31 __u64 new_key; 32 __u32 type; 33 __u32 flags; 34}; 35 36struct pr_clear { 37 __u64 key; 38 __u32 flags; 39 __u32 __pad; 40}; 41 42#define PR_FL_IGNORE_KEY (1 << 0) /* ignore existing key */ 43 44#define IOC_PR_REGISTER _IOW('p', 200, struct pr_registration) 45#define IOC_PR_RESERVE _IOW('p', 201, struct pr_reservation) 46#define IOC_PR_RELEASE _IOW('p', 202, struct pr_reservation) 47#define IOC_PR_PREEMPT _IOW('p', 203, struct pr_preempt) 48#define IOC_PR_PREEMPT_ABORT _IOW('p', 204, struct pr_preempt) 49#define IOC_PR_CLEAR _IOW('p', 205, struct pr_clear) 50 51#endif /* _UAPI_PR_H */