函数逻辑报告 |
Source Code:security\tomoyo\common.c |
Create Date:2022-07-27 21:06:17 |
Last Modify:2020-03-18 09:15:18 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:moyo_open_control - open() for /sys/kernel/security/tomoyo/ interface.*@type: Type of interface.*@file: Pointer to "struct file".* Returns 0 on success, negative value otherwise.
函数原型:int tomoyo_open_control(const u8 type, struct file *file)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
const u8 | type | |
struct file * | file |
2421 | Type of this interface. 等于type |
2423 | 当:type恒等于TOMOYO_DOMAINPOLICY |
2425 | write等于moyo_write_domain - Write domain policy.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock(). |
2426 | read等于moyo_read_domain - Read domain policy.*@head: Pointer to "struct tomoyo_io_buffer".* Caller holds tomoyo_read_lock(). |
2427 | 退出 |
2428 | 当:type恒等于TOMOYO_EXCEPTIONPOLICY |
2430 | write等于moyo_write_exception - Write exception policy.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock(). |
2431 | read等于moyo_read_exception - Read exception policy.*@head: Pointer to "struct tomoyo_io_buffer".* Caller holds tomoyo_read_lock(). |
2432 | 退出 |
2433 | 当:type恒等于TOMOYO_AUDIT |
2435 | poll等于moyo_poll_log - Wait for an audit log.*@file: Pointer to "struct file".*@wait: Pointer to "poll_table". Maybe NULL.* Returns EPOLLIN | EPOLLRDNORM when ready to read an audit log. |
2436 | read等于moyo_read_log - Read an audit log.*@head: Pointer to "struct tomoyo_io_buffer".* Returns nothing. |
2437 | 退出 |
2438 | 当:type恒等于TOMOYO_PROCESS_STATUS |
2440 | write等于moyo_write_pid: Specify PID to obtain domainname.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0. |
2442 | 退出 |
2443 | 当:type恒等于TOMOYO_VERSION |
2445 | read等于moyo_read_version: Get version.*@head: Pointer to "struct tomoyo_io_buffer".* Returns version information. |
2446 | Size of read buffer. 等于128 |
2447 | 退出 |
2448 | 当:type恒等于TOMOYO_STAT |
2450 | write等于moyo_write_stat - Set memory quota.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0. |
2451 | read等于moyo_read_stat - Read statistic data.*@head: Pointer to "struct tomoyo_io_buffer".* Returns nothing. |
2452 | Size of read buffer. 等于1024 |
2453 | 退出 |
2454 | 当:type恒等于TOMOYO_PROFILE |
2456 | write等于moyo_write_profile - Write profile table.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0 on success, negative value otherwise. |
2457 | read等于moyo_read_profile - Read profile table.*@head: Pointer to "struct tomoyo_io_buffer".* Returns nothing. |
2458 | 退出 |
2459 | 当:type恒等于TOMOYO_QUERY |
2461 | write等于moyo_write_answer - Write the supervisor's decision.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0 on success, -EINVAL otherwise. |
2462 | read等于moyo_read_query - Read access requests which violated policy in enforcing mode.*@head: Pointer to "struct tomoyo_io_buffer". |
2463 | 退出 |
2464 | 当:type恒等于TOMOYO_MANAGER |
2466 | write等于moyo_write_manager - Write manager policy.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock(). |
2467 | read等于moyo_read_manager - Read manager policy.*@head: Pointer to "struct tomoyo_io_buffer".* Caller holds tomoyo_read_lock(). |
2468 | 退出 |
2470 | 如果非f_mode按位与le is open for reading 的值则 |
2477 | 否则如果非poll则 |
2479 | 如果非Size of read buffer. 则Size of read buffer. 等于4096乘2 |
2481 | Buffer for reading. 等于分配内存并置零 |
2482 | 如果非Buffer for reading. 则 |
2487 | 如果非f_mode按位与le is open for writing 的值则 |
2492 | write = NULL |
2493 | 否则如果write则 |
2494 | Size of write buffer. 等于4096乘2 |
2495 | Buffer for writing. 等于分配内存并置零 |
2496 | 如果非Buffer for writing. 则 |
2508 | 如果type恒等于TOMOYO_QUERY则atomic_inc( & Number of "struct file" referring /sys/kernel/security/tomoyo/query* interface.) |
2511 | tomoyo_notify_gc(head, true) |
2512 | 返回:0 |
名称 | 描述 |
---|---|
tomoyo_open | moyo_open - open() for /sys/kernel/security/tomoyo/ interface.*@inode: Pointer to "struct inode".*@file: Pointer to "struct file".* Returns 0 on success, negative value otherwise. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |