Function report |
Source Code:kernel\kexec_file.c |
Create Date:2022-07-28 11:04:13 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:SYSCALL_DEFINE5
Proto:SYSCALL_DEFINE5(kexec_file_load, int, kernel_fd, int, initrd_fd, unsigned long, cmdline_len, const char __user *, cmdline_ptr, unsigned long, flags)
Type:
Parameter:Nothing
374 | ret = 0 |
378 | If Not Check operation authority || kexec_load_disabled Then Return -EPERM |
382 | If prefix, newline flags != (prefix, newline flags & List of defined/legal kexec file flags ) Then Return -EINVAL |
385 | image = NULL |
387 | If Not mutex_trylock - try to acquire the mutex, without waiting*@lock: the mutex to be acquired* Try to acquire the mutex atomically Then Return -EBUSY |
390 | dest_image = kexec_image |
391 | If prefix, newline flags & KEXEC_FILE_ON_CRASH Then |
392 | dest_image = kexec_crash_image |
393 | If kexec_crash_image Then arch_kexec_unprotect_crashkres() |
405 | If prefix, newline flags & KEXEC_FILE_ON_CRASH Then kimage_free(xchg( & kexec_crash_image, NULL)) |
408 | ret = kimage_file_alloc_init( & image, kernel_fd, initrd_fd, cmdline_ptr, cmdline_len, prefix, newline flags ) |
413 | ret = A architecture hook called to validate the* proposed image and prepare the control pages* as needed |
421 | ret = kimage_crash_copy_vmcoreinfo(image) |
429 | When i < nr_segments cycle |
433 | pr_debug("Loading segment %d: buf=0x%p bufsz=0x%zx mem=0x%lx memsz=0x%zx\n", i, buf, bufsz, mem, memsz) |
437 | ret = kimage_load_segment(image, & segment[i]) |
442 | kimage_terminate(image) |
449 | exchange : |
450 | image = xchg(dest_image, image) |
451 | out : |
456 | kimage_free(image) |
457 | Return ret |
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 |