函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:COMPAT_SYSCALL_DEFINE4

函数原型:COMPAT_SYSCALL_DEFINE4(kexec_load, compat_ulong_t, entry, compat_ulong_t, nr_segments, struct compat_kexec_segment __user *, segments, compat_ulong_t, flags)

返回类型:

参数:

271  __userksegments
274  result等于Exec Kernel system call: for obvious reasons only root may call it
275  如果result则返回:result
281  如果prefix, newline flags 按位与KEXEC_ARCH_MASK的值恒等于These values match the ELF architecture values.* Unless there is a good reason that should continue to be the case.则返回:负EINVAL
284  ksegments等于compat_alloc_user_space(nr_segments * out的长度)
285 i小于nr_segments循环
286  result等于copy_from_user( & in, & segments[i], in的长度)
287  如果result则返回:负EFAULT
290  buf等于A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already.
291  bufsz等于bufsz
292  mem等于 User space sees this as a (void *) ...
293  memsz等于memsz
295  result等于copy_to_user( & ksegments[i], & out, out的长度)
296  如果result则返回:负EFAULT
308  如果非mutex_trylock - try to acquire the mutex, without waiting*@lock: the mutex to be acquired* Try to acquire the mutex atomically则返回:负EBUSY
311  result等于do_kexec_load(entry, nr_segments, ksegments, prefix, newline flags )
313  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
315  返回:result