函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sanity_check_segment_list

函数原型:int sanity_check_segment_list(struct kimage *image)

返回类型:int

参数:

类型参数名称
struct kimage *image
151  nr_segments等于nr_segments
152  total_pages等于0
153  nr_pages等于totalram_pages()
168 i小于nr_segments循环
171  mstart等于mem
172  mend等于mstartmemsz
173  如果mstart大于mend则返回:负EADDRNOTAVAIL
175  如果mstart按位与PAGE_MASK的反或mend按位与PAGE_MASK的反则返回:负EADDRNOTAVAIL
177  如果mend大于等于Maximum address we can reach in physical address mode 则返回:负EADDRNOTAVAIL
186 i小于nr_segments循环
190  mstart等于mem
191  mend等于mstartmemsz
192 j小于i循环
195  pstart等于mem
196  pend等于pstartmemsz
198  如果mend大于pstartmstart小于pend则返回:负EINVAL
208 i小于nr_segments循环
209  如果bufsz大于memsz则返回:负EINVAL
218 i小于nr_segments循环
219  如果PAGE_COUNT(memsz)大于nr_pages除2则返回:负EINVAL
222  total_pages加等于PAGE_COUNT(memsz)
225  如果total_pages大于nr_pages除2则返回:负EINVAL
238  如果 Flags to indicate special processing 恒等于KEXEC_TYPE_CRASH
239 i小于nr_segments循环
242  mstart等于mem
243  mend等于mstartmemsz减1
245  如果mstart小于phys_to_boot_phys(start)或mend大于phys_to_boot_phys(end)则返回:负EADDRNOTAVAIL
251  返回:0
调用者
名称描述
kimage_alloc_init
kimage_file_alloc_init