函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:proc_keys_show

函数原型:static int proc_keys_show(struct seq_file *m, void *v)

返回类型:int

参数:

类型参数名称
struct seq_file *m
void *v
153  _p等于v
154  key等于rb_entry(_p, structkey, serial_node)
163  struct keyring_search_context ctx = {index_key = index_key, cred = f_cred, cmp = See if the key we're looking at is the target key., Raw match data = key, Type of lookup for this search. = Direct lookup by description. , flags = (Skip state checks | Search child keyrings also ), }
173  key_ref等于make_key_ref(key, 0)
178  如果 access permissions 按位与possessor can view a key's attributes
179  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
180  skey_ref等于Search the process keyrings attached to the supplied cred for the first* matching key under RCU conditions (the caller must be holding the RCU read* lock)
181  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
182  如果非是错误
184  key_ref等于make_key_ref(key, 1)
189  rc等于key_task_permission - Check a key can be used*@key_ref: The key to check.*@cred: The credentials to use.*@perm: The permissions to check for.* Check to see whether permission is granted to use a key in the desired way,
190  如果rc小于0则返回:0
193  now等于ktime_get_real_seconds - Get the seconds portion of CLOCK_REALTIME* Returns the wall clock seconds since 1970. This replaces the* get_seconds() interface which is not y2038 safe on 32bit systems.
195  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
198  expiry等于READ_ONCE( time at which key expires (or 0) )
199  如果expiry恒等于0则
200  memcpy(xbuf, "perm", 5)
201  否则如果now大于等于expiry
202  memcpy(xbuf, "expd", 5)
203  否则
204  timo等于expirynow
206  如果timo小于60则输出格式化串
208  否则如果timo小于60乘60则输出格式化串
210  否则如果timo小于60乘60乘24则输出格式化串
212  否则如果timo小于60乘60乘24乘7则输出格式化串
214  否则输出格式化串
218  state等于key_read_state(key)
223  flags等于READ_ONCE( status flags (change with bitops) )
224  seq_printf(m, "%08x %c%c%c%c%c%c%c %5d %4s %08x %5d %5d %-9.9s ", key serial number , state != KEY_IS_UNINSTANTIATED ? 'I' : '-', come up with a suitable timeout value (flags, 'R', set if key had been revoked ), come up with a suitable timeout value (flags, 'D', set if key type has been deleted ), come up with a suitable timeout value (flags, 'Q', set if key consumes quota ), come up with a suitable timeout value (flags, 'U', set if key is being constructed in userspace ), state < 0 ? 'N' : '-', come up with a suitable timeout value (flags, 'i', set if key has been invalidated ), _read - get a refcount's value*@r: the refcount* Return: the refcount's value, xbuf, access permissions , m_kuid_munged - Create a uid from a kuid user-namespace pair.*@targ: The user namespace we want a uid in.*@kuid: The kernel internal uid to start with.* Map @kuid into the user-namespace specified by @targ and* return the resulting uid., m_kgid_munged - Create a gid from a kgid user-namespace pair.*@targ: The user namespace we want a gid in.*@kgid: The kernel internal gid to start with.* Map @kgid into the user-namespace specified by @targ and* return the resulting gid., name)
242  如果describedescribe(key, m)
244  seq_putc(m, '\n')
246  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
247  返回:0