函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kexec_add_buffer - place a buffer in a kexec segment*@kbuf: Buffer contents and memory parameters.* This function assumes that kexec_mutex is held.* On successful return, @kbuf->mem will have the physical address of* the buffer in memory.

函数原型:int kexec_add_buffer(struct kexec_buf *kbuf)

返回类型:int

参数:

类型参数名称
struct kexec_buf *kbuf
668  如果非 If set, we are using file mode kexec syscall 则返回:负EINVAL
671  如果nr_segments大于等于The artificial cap on the number of segments passed to kexec_load. 则返回:负EINVAL
681  如果非链表为空
682  WARN_ON(1)
683  返回:负EINVAL
687  memsz等于@a is a power of 2 value (memsz, PAGE_SIZE)
688  buf_align等于两数取大(buf_align, PAGE_SIZE)
691  ret等于kexec_locate_mem_hole - find free memory for the purgatory or the next kernel*@kbuf: Parameters for the memory search.* On success, kbuf->mem will have the start address of the memory region found.* Return: 0 on success, negative errno on error.
692  如果ret则返回:ret
696  ksegment等于segment[nr_segments]
697  kbuf等于buffer
698  bufsz等于bufsz
699  mem等于mem
700  memsz等于memsz
701  nr_segments自加
702  返回:0
调用者
名称描述
bzImage64_load
kexec_elf_loadkexec_elf_load - load ELF executable image*@lowest_load_addr: On return, will be the address where the first PT_LOAD* section will be loaded in memory.* Return:* 0 on success, negative value on failure.
crash_load_segments