函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_write_profile - Write profile table.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0 on success, negative value otherwise.

函数原型:static int tomoyo_write_profile(struct tomoyo_io_buffer *head)

返回类型:int

参数:

类型参数名称
struct tomoyo_io_buffer *head
676  data等于Buffer for writing.
681  如果sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments恒等于1则返回:0
684  i等于转换字符串为无符号整形
685  如果cp不等于'-'则返回:负EINVAL
687  data等于cp加1
688  profile等于moyo_assign_profile - Create a new profile.*@ns: Pointer to "struct tomoyo_policy_namespace".*@profile: Profile number to create.* Returns pointer to "struct tomoyo_profile" on success, NULL otherwise.
689  如果非profile则返回:负EINVAL
691  cp等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for
692  如果非cp则返回:负EINVAL
694  cp自加等于'\0'
695  如果非字符串比较
696  DEFINE_SPINLOCK(lock)
697  new_comment等于tomoyo_get_name(cp)
701  如果非new_comment则返回:负ENOMEM
703  加自旋锁
704  old_comment等于comment
705  comment等于new_comment
706  自旋锁解锁
707  moyo_put_name - Drop reference on "struct tomoyo_name".*@name: Pointer to "struct tomoyo_path_info". Maybe NULL.* Returns nothing.
708  返回:0
710  如果非字符串比较
711 i小于TOMOYO_MAX_PREF循环moyo_set_uint - Set value for specified preference.*@i: Pointer to "unsigned int".*@string: String to check.*@find: Name of keyword.* Returns nothing.
714  返回:0
716  返回:moyo_set_mode - Set mode for specified profile.*@name: Name of functionality.*@value: Mode for @name.*@profile: Pointer to "struct tomoyo_profile".* Returns 0 on success, negative value otherwise.