github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/dev_tlk_device.txt (about)

     1  # Copyright 2016 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  # Open Trusted Execution driver for /dev/tlk_device
     5  # Reference source code:
     6  # https://android.googlesource.com/kernel/tegra/+/android-tegra-dragon-3.18-marshmallow-dr-dragon/security/tlk_driver/ote_protocol.h
     7  
     8  # This was generated on unknown tree.
     9  meta noextract
    10  meta arches["386", "amd64", "arm", "arm64"]
    11  
    12  include <linux/ioctl.h>
    13  include <linux/types.h>
    14  include <security/tlk_driver/ote_protocol.h>
    15  
    16  resource fd_tlk[fd]
    17  resource te_session_id[int32]
    18  
    19  openat$tlk_device(fd const[AT_FDCWD], file ptr[in, string["/dev/tlk_device"]], flags flags[open_flags]) fd_tlk
    20  
    21  ioctl$TE_IOCTL_OPEN_CLIENT_SESSION(fd fd_tlk, cmd const[TE_IOCTL_OPEN_CLIENT_SESSION], arg ptr[inout, te_opensession])
    22  ioctl$TE_IOCTL_CLOSE_CLIENT_SESSION(fd fd_tlk, cmd const[TE_IOCTL_CLOSE_CLIENT_SESSION], arg ptr[inout, te_closesession])
    23  ioctl$TE_IOCTL_LAUNCH_OPERATION(fd fd_tlk, cmd const[TE_IOCTL_LAUNCH_OPERATION], arg ptr[inout, te_launchop])
    24  ioctl$TE_IOCTL_SS_CMD(fd fd_tlk, cmd const[TE_IOCTL_SS_CMD], arg flags[te_ss_cmd_flags])
    25  
    26  te_ss_cmd_flags = TE_IOCTL_SS_CMD_GET_NEW_REQ, TE_IOCTL_SS_CMD_REQ_COMPLETE
    27  te_oper_param_type_flags = TE_PARAM_TYPE_NONE, TE_PARAM_TYPE_INT_RO, TE_PARAM_TYPE_INT_RW, TE_PARAM_TYPE_MEM_RO, TE_PARAM_TYPE_MEM_RW, TE_PARAM_TYPE_PERSIST_MEM_RO, TE_PARAM_TYPE_PERSIST_MEM_RW, TE_PARAM_TYPE_FLAGS_PHYS_LIST
    28  
    29  # Values of time_low, time_mid, time_hi_and_version, clock_seq_and_node don't seem to mean anything.
    30  te_service_id {
    31  	unused_time_low			int32
    32  	unused_time_mid			int16
    33  	unused_time_hi_and_version	int16
    34  	unused_clock_seq_and_node	array[int8, 8]
    35  }
    36  
    37  te_opensession {
    38  	dest_uuid	te_service_id
    39  	operation	te_operation
    40  	answer		ptr[out, te_answer]
    41  }
    42  
    43  te_closesession {
    44  	session_id	te_session_id
    45  	answer		ptr[out, te_answer]
    46  }
    47  
    48  te_answer {
    49  	result		int32
    50  	session_id	te_session_id
    51  	result_origin	int32
    52  }
    53  
    54  te_launchop {
    55  	session_id	te_session_id
    56  	operation	te_operation
    57  	answer		int64
    58  }
    59  
    60  te_operation {
    61  	unused_command		int32
    62  	status			int32
    63  	list_head		ptr[in, te_oper_param]
    64  	unused_list_tail	ptr[in, te_oper_param]
    65  	list_count		int32
    66  	unused_interface_side	int32
    67  }
    68  
    69  te_int_mem_union [
    70  	int	int32
    71  	Mem	te_mem
    72  ]
    73  
    74  te_mem {
    75  	base	vma
    76  	len	int32
    77  }
    78  
    79  te_oper_param {
    80  	index		int32
    81  	type		flags[te_oper_param_type_flags, int32]
    82  	u		te_int_mem_union
    83  	next_ptr_user	ptr[in, te_oper_param, opt]
    84  }