include/uapi/linux/tee.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/tee.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/tee.h- Extension
.h- Size
- 16158 bytes
- Lines
- 482
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/ioctl.hlinux/types.h
Detected Declarations
struct tee_ioctl_version_datastruct tee_ioctl_shm_alloc_datastruct tee_ioctl_buf_datastruct tee_ioctl_paramstruct tee_ioctl_open_session_argstruct tee_ioctl_invoke_argstruct tee_ioctl_cancel_argstruct tee_ioctl_close_session_argstruct tee_iocl_supp_recv_argstruct tee_iocl_supp_send_argstruct tee_ioctl_shm_register_datastruct tee_ioctl_shm_register_fd_datastruct tee_ioctl_object_invoke_arg
Annotated Snippet
struct tee_ioctl_version_data {
__u32 impl_id;
__u32 impl_caps;
__u32 gen_caps;
};
/**
* TEE_IOC_VERSION - query version of TEE
*
* Takes a tee_ioctl_version_data struct and returns with the TEE version
* data filled in.
*/
#define TEE_IOC_VERSION _IOR(TEE_IOC_MAGIC, TEE_IOC_BASE + 0, \
struct tee_ioctl_version_data)
/**
* struct tee_ioctl_shm_alloc_data - Shared memory allocate argument
* @size: [in/out] Size of shared memory to allocate
* @flags: [in/out] Flags to/from allocation.
* @id: [out] Identifier of the shared memory
*
* The flags field should currently be zero as input. Updated by the call
* with actual flags as defined by TEE_IOCTL_SHM_* above.
* This structure is used as argument for TEE_IOC_SHM_ALLOC below.
*/
struct tee_ioctl_shm_alloc_data {
__u64 size;
__u32 flags;
__s32 id;
};
/**
* TEE_IOC_SHM_ALLOC - allocate shared memory
*
* Allocates shared memory between the user space process and secure OS.
*
* Returns a file descriptor on success or < 0 on failure
*
* The returned file descriptor is used to map the shared memory into user
* space. The shared memory is freed when the descriptor is closed and the
* memory is unmapped.
*/
#define TEE_IOC_SHM_ALLOC _IOWR(TEE_IOC_MAGIC, TEE_IOC_BASE + 1, \
struct tee_ioctl_shm_alloc_data)
/**
* struct tee_ioctl_buf_data - Variable sized buffer
* @buf_ptr: [in] A __user pointer to a buffer
* @buf_len: [in] Length of the buffer above
*
* Used as argument for TEE_IOC_OPEN_SESSION, TEE_IOC_INVOKE,
* TEE_IOC_SUPPL_RECV, and TEE_IOC_SUPPL_SEND below.
*/
struct tee_ioctl_buf_data {
__u64 buf_ptr;
__u64 buf_len;
};
/*
* Attributes for struct tee_ioctl_param, selects field in the union
*/
#define TEE_IOCTL_PARAM_ATTR_TYPE_NONE 0 /* parameter not used */
/*
* These defines value parameters (struct tee_ioctl_param_value)
*/
#define TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT 1
#define TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_OUTPUT 2
#define TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT 3 /* input and output */
/*
* These defines shared memory reference parameters (struct
* tee_ioctl_param_memref)
*/
#define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT 5
#define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT 6
#define TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT 7 /* input and output */
/*
* These defines userspace buffer parameters.
*/
#define TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_INPUT 8
#define TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_OUTPUT 9
#define TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_INOUT 10 /* input and output */
/*
* These defines object reference parameters.
*/
#define TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF_INPUT 11
#define TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF_OUTPUT 12
Annotation
- Immediate include surface: `linux/ioctl.h`, `linux/types.h`.
- Detected declarations: `struct tee_ioctl_version_data`, `struct tee_ioctl_shm_alloc_data`, `struct tee_ioctl_buf_data`, `struct tee_ioctl_param`, `struct tee_ioctl_open_session_arg`, `struct tee_ioctl_invoke_arg`, `struct tee_ioctl_cancel_arg`, `struct tee_ioctl_close_session_arg`, `struct tee_iocl_supp_recv_arg`, `struct tee_iocl_supp_send_arg`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.