Function report |
Source Code:fs\binfmt_elf.c |
Create Date:2022-07-28 20:28:21 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:create_elf_tables
Proto:static int create_elf_tables(struct linux_binprm *bprm, struct elf64_hdr *exec, unsigned long load_addr, unsigned long interp_load_addr)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct linux_binprm * | bprm | |
struct elf64_hdr * | exec | |
unsigned long | load_addr | |
unsigned long | interp_load_addr |
170 | elf_addr_t |
170 | sp |
171 | elf_addr_t |
171 | u_platform |
172 | elf_addr_t |
172 | u_base_platform |
173 | elf_addr_t |
173 | u_rand_bytes |
174 | k_platform = ELF_PLATFORM |
178 | elf_addr_t * elf_info |
179 | ei_index = 0 |
180 | 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.() |
189 | p = arch_align_stack(p) |
197 | u_platform = NULL |
198 | If k_platform Then |
201 | u_platform = STACK_ALLOC(p, len) |
202 | If __copy_to_user(u_platform, k_platform, len) Then Return -EFAULT |
210 | u_base_platform = NULL |
211 | If k_base_platform Then |
214 | u_base_platform = STACK_ALLOC(p, len) |
215 | If __copy_to_user(u_base_platform, k_base_platform, len) Then Return -EFAULT |
222 | get_random_bytes(k_rand_bytes, size of k_rand_bytes ) |
223 | u_rand_bytes = STACK_ALLOC(p, size of k_rand_bytes ) |
225 | If __copy_to_user(u_rand_bytes, k_rand_bytes, size of k_rand_bytes ) Then Return -EFAULT |
229 | elf_info = saved_auxv |
244 | ARCH_DLINFO |
247 | update AT_VECTOR_SIZE_BASE if the number of NEW_AUX_ENT() changes (system page size , ELF_EXEC_PAGESIZE) |
248 | update AT_VECTOR_SIZE_BASE if the number of NEW_AUX_ENT() changes (quency at which times() increments , CLOCKS_PER_SEC) |
249 | update AT_VECTOR_SIZE_BASE if the number of NEW_AUX_ENT() changes (program headers for program , load_addr + Program header table file offset ) |
250 | update AT_VECTOR_SIZE_BASE if the number of NEW_AUX_ENT() changes (size of program header entry , size of elf_phdr ) |
251 | update AT_VECTOR_SIZE_BASE if the number of NEW_AUX_ENT() changes (umber of program headers , e_phnum) |
252 | update AT_VECTOR_SIZE_BASE if the number of NEW_AUX_ENT() changes (ase address of interpreter , interp_load_addr) |
254 | update AT_VECTOR_SIZE_BASE if the number of NEW_AUX_ENT() changes (ry point of program , Entry point virtual address ) |
259 | update AT_VECTOR_SIZE_BASE if the number of NEW_AUX_ENT() changes (secure mode boolean , secureexec) |
260 | update AT_VECTOR_SIZE_BASE if the number of NEW_AUX_ENT() changes (address of 16 random bytes , (elf_addr_t)(unsignedlong)u_rand_bytes) |
265 | If k_platform Then |
269 | If k_base_platform Then |
273 | If interp_flags & BINPRM_FLAGS_EXECFD Then |
282 | ei_index += 2 |
287 | p = STACK_ROUND(sp, items) |
307 | If Write a simple value into user space, with less checking(argc, sp++) Then Return -EFAULT |
314 | If Write a simple value into user space, with less checking((elf_addr_t)p, sp++) Then Return -EFAULT |
321 | If Write a simple value into user space, with less checking(0, sp++) Then Return -EFAULT |
329 | If Write a simple value into user space, with less checking((elf_addr_t)p, sp++) Then Return -EFAULT |
336 | If Write a simple value into user space, with less checking(0, sp++) Then Return -EFAULT |
341 | If copy_to_user(sp, elf_info, ei_index * size of elf_addr_t ) Then Return -EFAULT |
343 | Return 0 |
Name | Describe |
---|---|
load_elf_binary |
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 |