函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:do_kexec_load

函数原型:static int do_kexec_load(unsigned long entry, unsigned long nr_segments, struct kexec_segment __user *segments, unsigned long flags)

返回类型:int

参数:

类型参数名称
unsigned longentry
unsigned longnr_segments
struct kexec_segment __user *segments
unsigned longflags
113  如果flags按位与kexec flags for different usage scenarios
114  dest_image等于kexec_crash_image
115  如果kexec_crash_imagearch_kexec_unprotect_crashkres()
117  否则
118  dest_image等于kexec_image
121  如果nr_segments恒等于0则
123  kimage_free(xchg(dest_image, NULL))
124  返回:0
126  如果flags按位与kexec flags for different usage scenarios
132  kimage_free(xchg( & kexec_crash_image, NULL))
135  ret等于kimage_alloc_init( & image, entry, nr_segments, segments, flags)
136  如果ret则返回:ret
139  如果flags按位与KEXEC_PRESERVE_CONTEXTpreserve_context等于1
142  ret等于A architecture hook called to validate the* proposed image and prepare the control pages* as needed
143  如果ret则转到:out
150  ret等于kimage_crash_copy_vmcoreinfo(image)
151  如果ret则转到:out
154 i小于nr_segments循环
155  ret等于kimage_load_segment(image, & segment[i])
156  如果ret则转到:out
160  kimage_terminate(image)
163  image等于xchg(dest_image, image)
165  out :
166  如果flags按位与kexec flags for different usage scenarios kexec_crash_imageProtection mechanism for crashkernel reserved memory after* the kdump kernel is loaded.* Provide an empty default implementation here -- architecture* code may override this
169  kimage_free(image)
170  返回:ret
调用者
名称描述
SYSCALL_DEFINE4
COMPAT_SYSCALL_DEFINE4