函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\util.c Create Date:2022-07-27 21:17:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:moyo_fill_path_info - Fill in "struct tomoyo_path_info" members.*@ptr: Pointer to "struct tomoyo_path_info" to fill in.* The caller sets "struct tomoyo_path_info"->name.

函数原型:void tomoyo_fill_path_info(struct tomoyo_path_info *ptr)

返回类型:void

参数:

类型参数名称
struct tomoyo_path_info *ptr
657  name等于name
658  len等于strlen - Find the length of a string*@s: The string to be sized
660  = tomoyo_const_part_length(name) 等于moyo_const_part_length - Evaluate the initial length without a pattern in a token.*@filename: The string to evaluate.* Returns the initial length without a pattern in @filename.
661  = tomoyo_strendswith(name, "/") 等于lenname[len - 1]恒等于'/'
662  = tomoyo_path_contains_pattern(name) 等于 = tomoyo_const_part_length(name) 小于len
663  = full_name_hash(name, strlen(name)) 等于Version 2: One word (32 or 64 bits) at a time.* If CONFIG_DCACHE_WORD_ACCESS is defined (meaning * exists, which describes major Linux platforms like x86 and ARM), then* this computes a different hash function much faster.
调用者
名称描述
tomoyo_argvmoyo_argv - Check argv[] in "struct linux_binbrm".*@index: Index number of @arg_ptr.*@arg_ptr: Contents of argv[@index].*@argc: Length of @argv.*@argv: Pointer to "struct tomoyo_argv".*@checked: Set to true if @argv[@index] was found.
tomoyo_envpmoyo_envp - Check envp[] in "struct linux_binbrm".*@env_name: The name of environment variable.*@env_value: The value of environment variable.*@envc: Length of @envp.*@envp: Pointer to "struct tomoyo_envp".
tomoyo_scan_exec_realpathmoyo_scan_exec_realpath - Check "exec.realpath" parameter of "struct tomoyo_condition".*@file: Pointer to "struct file".*@ptr: Pointer to "struct tomoyo_name_union".*@match: True if "exec.realpath=", false if "exec.realpath!=".
tomoyo_find_next_domainmoyo_find_next_domain - Find a domain.*@bprm: Pointer to "struct linux_binprm".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
tomoyo_env_permmoyo_env_perm - Check permission for environment variable's name.*@r: Pointer to "struct tomoyo_request_info".*@env: The name of environment variable.* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
tomoyo_add_slashmoyo_add_slash - Add trailing '/' if needed.*@buf: Pointer to "struct tomoyo_path_info".* Returns nothing.*@buf must be generated by tomoyo_encode() because this function does not* allocate memory for adding '/'.
tomoyo_get_realpathmoyo_get_realpath - Get realpath.*@buf: Pointer to "struct tomoyo_path_info".*@path: Pointer to "struct path".* Returns true on success, false otherwise.
tomoyo_path_permmoyo_path_perm - Check permission for "unlink", "rmdir", "truncate", "symlink", "append", "chroot" and "unmount".*@operation: Type of operation.*@path: Pointer to "struct path".*@target: Symlink's target if @operation is TOMOYO_TYPE_SYMLINK,
tomoyo_get_namemoyo_get_name - Allocate permanent memory for string data.*@name: The string to store into the permernent memory.* Returns pointer to "struct tomoyo_path_info" on success, NULL otherwise.
tomoyo_mount_aclmoyo_mount_acl - Check permission for mount() operation.*@r: Pointer to "struct tomoyo_request_info".*@dev_name: Name of device file. Maybe NULL.*@dir: Pointer to "struct path".*@type: Name of filesystem type.*@flags: Mount options.
tomoyo_unix_entrymoyo_unix_entry - Check permission for UNIX network operation.*@address: Pointer to "struct tomoyo_addr_info".* Returns 0 on success, negative value otherwise.
tomoyo_write_selfmoyo_write_self - write() for /sys/kernel/security/tomoyo/self_domain interface
tomoyo_find_domainmoyo_find_domain - Find a domain by the given name.*@domainname: The domainname to find.* Returns pointer to "struct tomoyo_domain_info" if found, NULL otherwise.* Caller holds tomoyo_read_lock().