Function report |
Source Code:kernel\kexec_file.c |
Create Date:2022-07-28 11:04:06 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:In file mode list of segments is prepared by kernel. Copy relevant* data from user space, do error checking, prepare segment list
Proto:static int kimage_file_prepare_segments(struct kimage *image, int kernel_fd, int initrd_fd, const char __user *cmdline_ptr, unsigned long cmdline_len, unsigned flags)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct kimage * | image | |
int | kernel_fd | |
int | initrd_fd | |
const char __user * | cmdline_ptr | |
unsigned long | cmdline_len | |
unsigned | flags |
246 | ret = kernel_read_file_from_fd(kernel_fd, & Additional fields for file based kexec syscall , & size, INT_MAX, READING_KEXEC_IMAGE) |
250 | kernel_buf_len = size |
265 | If Not (flags & KEXEC_FILE_NO_INITRAMFS) Then |
266 | ret = kernel_read_file_from_fd(initrd_fd, & initrd_buf, & size, INT_MAX, READING_KEXEC_INITRAMFS) |
271 | initrd_buf_len = size |
274 | If cmdline_len Then |
275 | cmdline_buf = memdup_user(cmdline_ptr, cmdline_len) |
276 | If IS_ERR(cmdline_buf) Then |
282 | cmdline_buf_len = cmdline_len |
285 | If cmdline_buf[cmdline_len - 1] != '\0' Then |
290 | ima_kexec_cmdline(cmdline_buf, cmdline_buf_len - 1) |
306 | out : |
310 | Return ret |
Name | Describe |
---|---|
kimage_file_alloc_init |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |