Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kexec_core.c Create Date:2022-07-28 11:02:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:sanity_check_segment_list

Proto:int sanity_check_segment_list(struct kimage *image)

Type:int

Parameter:

TypeParameterName
struct kimage *image
151  nr_segments = nr_segments
152  total_pages = 0
153  nr_pages = totalram_pages()
168  When i < nr_segments cycle
171  mstart = mem
172  mend = mstart + memsz
173  If mstart > mend Then Return -EADDRNOTAVAIL
175  If mstart & ~PAGE_MASK || mend & ~PAGE_MASK Then Return -EADDRNOTAVAIL
177  If mend >= Maximum address we can reach in physical address mode Then Return -EADDRNOTAVAIL
186  When i < nr_segments cycle
190  mstart = mem
191  mend = mstart + memsz
192  When j < i cycle
195  pstart = mem
196  pend = pstart + memsz
198  If mend > pstart && mstart < pend Then Return -EINVAL
208  When i < nr_segments cycle
209  If bufsz > memsz Then Return -EINVAL
218  When i < nr_segments cycle
219  If PAGE_COUNT(memsz) > nr_pages / 2 Then Return -EINVAL
222  total_pages += PAGE_COUNT(memsz)
225  If total_pages > nr_pages / 2 Then Return -EINVAL
238  If Flags to indicate special processing == KEXEC_TYPE_CRASH Then
239  When i < nr_segments cycle
242  mstart = mem
243  mend = mstart + memsz - 1
251  Return 0
Caller
NameDescribe
kimage_alloc_init
kimage_file_alloc_init