函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:aa_simple_write_to_buffer - common routine for getting policy from user*@userbuf: user buffer to copy data from (NOT NULL)*@alloc_size: size of user buffer (REQUIRES: @alloc_size >= @copy_size)*@copy_size: size of data to copy from user buffer*@pos:

函数原型:static struct aa_loaddata *aa_simple_write_to_buffer(const char __user *userbuf, size_t alloc_size, size_t copy_size, loff_t *pos)

返回类型:struct aa_loaddata

参数:

类型参数名称
const char __user *userbuf
size_talloc_size
size_tcopy_size
loff_t *pos
423  AA_BUG(copy_size > alloc_size)
425  如果pos不等于0则返回:错误号
430  data等于aa_loaddata_alloc(alloc_size)
431  如果是错误则返回:data
434  he original size of the payload 等于copy_size
435  如果copy_from_user(Pointer to payload. If @compressed_size > 0, then this is the* compressed version of the payload, else it is the uncompressed* version (with the size indicated by @size)., userbuf, copy_size)则
436  kvfree() - Free memory.*@addr: Pointer to allocated memory.* kvfree frees memory allocated by any of vmalloc(), kmalloc() or kvmalloc().* It is slightly more efficient to use kfree() or vfree() if you are certain* that you know which one to use.
437  返回:错误号
440  返回:data
调用者
名称描述
policy_update
profile_remove.remove file hook fn to remove loaded policy