Function report |
Source Code:fs\binfmt_elf_fdpic.c |
Create Date:2022-07-28 20:29:04 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:present useful information to the program by shovelling it onto the new* process's stack
Proto:static int create_elf_fdpic_tables(struct linux_binprm *bprm, struct mm_struct *mm, struct elf_fdpic_params *exec_params, struct elf_fdpic_params *interp_params)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct linux_binprm * | bprm | |
struct mm_struct * | mm | |
struct elf_fdpic_params * | exec_params | |
struct elf_fdpic_params * | interp_params |
502 | cred = current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.() |
505 | platform_len = 0 |
507 | __user * u_platform |
517 | sp = arch_align_stack(p) |
533 | k_platform = ELF_PLATFORM |
534 | u_platform = NULL |
536 | If k_platform Then |
538 | sp -= platform_len |
539 | u_platform = sp |
540 | If __copy_to_user(u_platform, k_platform, platform_len) != 0 Then Return -EFAULT |
549 | u_base_platform = NULL |
551 | If k_base_platform Then |
553 | sp -= platform_len |
554 | u_base_platform = sp |
555 | If __copy_to_user(u_base_platform, k_base_platform, platform_len) != 0 Then Return -EFAULT |
559 | sp &= ~7UL |
562 | len = sizeof(structelf32_fdpic_loadmap) |
563 | len += sizeof(structelf32_fdpic_loadseg) * number of segments |
567 | If copy_to_user((void__user * )sp, loadmap to be passed to userspace , len) != 0 Then Return -EFAULT |
570 | exec_fdpic_loadmap = sp |
572 | If loadmap to be passed to userspace Then |
573 | len = sizeof(structelf32_fdpic_loadmap) |
574 | len += sizeof(structelf32_fdpic_loadseg) * number of segments |
579 | If copy_to_user((void__user * )sp, loadmap to be passed to userspace , len) != 0 Then Return -EFAULT |
583 | interp_fdpic_loadmap = sp |
589 | nitems = 1 + rce 16 byte _final_ alignment here for generality + If k_platform Then 1 Else 0 + If k_base_platform Then 1 Else 0 + ries in ARCH_DLINFO: |
592 | If interp_flags & BINPRM_FLAGS_EXECFD Then nitems++ |
615 | nr = 0 |
618 | If k_platform Then |
619 | nr = 0 |
621 | put the ELF interpreter info on the stack (string identifying CPU for optimizations , (elf_addr_t)(unsignedlong)u_platform) |
625 | If k_base_platform Then |
626 | nr = 0 |
632 | If interp_flags & BINPRM_FLAGS_EXECFD Then |
633 | nr = 0 |
638 | nr = 0 |
639 | csp -= rce 16 byte _final_ alignment here for generality * 2 * sizeof(unsignedlong) |
646 | put the ELF interpreter info on the stack (program headers for program , mapped PT_PHDR user address ) |
649 | put the ELF interpreter info on the stack (ase address of interpreter , mapped ELF header user address ) |
660 | nr = 0 |
661 | csp -= ries in ARCH_DLINFO: * 2 * sizeof(unsignedlong) |
666 | ARCH_DLINFO |
671 | csp -= (envc + 1) * sizeof(elf_caddr_t) |
673 | csp -= (argc + 1) * sizeof(elf_caddr_t) |
678 | Write a simple value into user space, with less checking(argc, (unsignedlong__user * )csp) |
704 | Write a simple value into user space, with less checking((elf_caddr_t)(unsignedlong)p, envp++) |
713 | start_stack = sp |
714 | Return 0 |
Name | Describe |
---|---|
load_elf_fdpic_binary | load an fdpic binary into various bits of memory |
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 |