函数逻辑报告 |
Source Code:security\tomoyo\common.c |
Create Date:2022-07-27 21:06:34 |
Last Modify:2020-03-18 09:15:18 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:moyo_write_control - write() for /sys/kernel/security/tomoyo/ interface.*@head: Pointer to "struct tomoyo_io_buffer".*@buffer: Pointer to buffer to read from.*@buffer_len: Size of @buffer.* Returns @buffer_len on success, negative value otherwise.
函数原型:ssize_t tomoyo_write_control(struct tomoyo_io_buffer *head, const char __user *buffer, const int buffer_len)
返回类型:ssize_t
参数:
类型 | 参数 | 名称 |
---|---|---|
struct tomoyo_io_buffer * | head | |
const char __user * | buffer | |
const int | buffer_len |
2658 | error等于buffer_len |
2659 | avail_len等于buffer_len |
2660 | cp0等于Buffer for writing. |
2667 | 如果mutex_lock_interruptible( & Exclusive lock for this structure. )则返回:负EINTR |
2669 | read_user_buf_avail等于0 |
2670 | idx等于moyo_read_lock - Take lock for protecting policy.* Returns index number for tomoyo_read_unlock(). |
2675 | 如果 Bytes available for writing. 大于等于Size of write buffer. 减1则 |
2676 | len等于Size of write buffer. 乘2 |
2679 | 如果非cp则 |
2683 | memmove(cp, cp0, Bytes available for writing. ) |
2684 | 释放内存 |
2685 | Buffer for writing. 等于cp |
2687 | Size of write buffer. 等于len |
2693 | buffer自加 |
2694 | avail_len自减 |
2695 | cp0[ Bytes available for writing. ++]等于c |
2696 | 如果c不等于'\n'则继续下一循环 |
2698 | cp0[ Bytes available for writing. - 1]等于'\0' |
2699 | Bytes available for writing. 等于0 |
2700 | tomoyo_normalize_line(cp0) |
2701 | 如果非字符串比较则 |
2702 | ns等于tomoyo_kernel_namespace |
2703 | The position currently writing to. = NULL |
2705 | 继续下一循环 |
2711 | 退出 |
2717 | 如果非字符串比较则 |
2718 | print_transition_related_only = true |
2719 | 继续下一循环 |
2722 | 默认 |
2725 | 转到:out |
2736 | 当:Type of this interface. 恒等于TOMOYO_STAT |
2737 | 当:Type of this interface. 恒等于TOMOYO_PROFILE |
2738 | 当:Type of this interface. 恒等于TOMOYO_MANAGER |
2740 | 退出 |
2741 | 默认 |
2742 | 退出 |
2744 | 退出 |
2747 | out : |
2750 | 返回:error |
名称 | 描述 |
---|---|
tomoyo_write | moyo_write - write() for /sys/kernel/security/tomoyo/ interface.*@file: Pointer to "struct file".*@buf: Pointer to buffer.*@count: Size of @buf.*@ppos: Unused.* Returns @count on success, negative value otherwise. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |