~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/user_events.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 /*
  3  * Copyright (c) 2021-2022, Microsoft Corporation.
  4  *
  5  * Authors:
  6  *   Beau Belgrave <beaub@linux.microsoft.com>
  7  */
  8 #ifndef _UAPI_LINUX_USER_EVENTS_H
  9 #define _UAPI_LINUX_USER_EVENTS_H
 10 
 11 #include <linux/types.h>
 12 #include <linux/ioctl.h>
 13 
 14 #define USER_EVENTS_SYSTEM "user_events"
 15 #define USER_EVENTS_MULTI_SYSTEM "user_events_multi"
 16 #define USER_EVENTS_PREFIX "u:"
 17 
 18 /* Create dynamic location entry within a 32-bit value */
 19 #define DYN_LOC(offset, size) ((size) << 16 | (offset))
 20 
 21 /* List of supported registration flags */
 22 enum user_reg_flag {
 23         /* Event will not delete upon last reference closing */
 24         USER_EVENT_REG_PERSIST          = 1U << 0,
 25 
 26         /* Event will be allowed to have multiple formats */
 27         USER_EVENT_REG_MULTI_FORMAT     = 1U << 1,
 28 
 29         /* This value or above is currently non-ABI */
 30         USER_EVENT_REG_MAX              = 1U << 2,
 31 };
 32 
 33 /*
 34  * Describes an event registration and stores the results of the registration.
 35  * This structure is passed to the DIAG_IOCSREG ioctl, callers at a minimum
 36  * must set the size and name_args before invocation.
 37  */
 38 struct user_reg {
 39 
 40         /* Input: Size of the user_reg structure being used */
 41         __u32   size;
 42 
 43         /* Input: Bit in enable address to use */
 44         __u8    enable_bit;
 45 
 46         /* Input: Enable size in bytes at address */
 47         __u8    enable_size;
 48 
 49         /* Input: Flags to use, if any */
 50         __u16   flags;
 51 
 52         /* Input: Address to update when enabled */
 53         __u64   enable_addr;
 54 
 55         /* Input: Pointer to string with event name, description and flags */
 56         __u64   name_args;
 57 
 58         /* Output: Index of the event to use when writing data */
 59         __u32   write_index;
 60 } __attribute__((__packed__));
 61 
 62 /*
 63  * Describes an event unregister, callers must set the size, address and bit.
 64  * This structure is passed to the DIAG_IOCSUNREG ioctl to disable bit updates.
 65  */
 66 struct user_unreg {
 67         /* Input: Size of the user_unreg structure being used */
 68         __u32   size;
 69 
 70         /* Input: Bit to unregister */
 71         __u8    disable_bit;
 72 
 73         /* Input: Reserved, set to 0 */
 74         __u8    __reserved;
 75 
 76         /* Input: Reserved, set to 0 */
 77         __u16   __reserved2;
 78 
 79         /* Input: Address to unregister */
 80         __u64   disable_addr;
 81 } __attribute__((__packed__));
 82 
 83 #define DIAG_IOC_MAGIC '*'
 84 
 85 /* Request to register a user_event */
 86 #define DIAG_IOCSREG _IOWR(DIAG_IOC_MAGIC, 0, struct user_reg *)
 87 
 88 /* Request to delete a user_event */
 89 #define DIAG_IOCSDEL _IOW(DIAG_IOC_MAGIC, 1, char *)
 90 
 91 /* Requests to unregister a user_event */
 92 #define DIAG_IOCSUNREG _IOW(DIAG_IOC_MAGIC, 2, struct user_unreg*)
 93 
 94 #endif /* _UAPI_LINUX_USER_EVENTS_H */
 95 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php