Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\binfmt_em86.c Create Date:2022-07-28 20:27:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:load_em86

Proto:static int load_em86(struct linux_binprm *bprm)

Type:int

Parameter:

TypeParameterName
struct linux_binprm *bprm
35  elf_ex = *buf
37  If memcmp( ELF "magic number" , ELFMAG, SELFMAG) != 0 Then Return -ENOEXEC
41  If e_type != ET_EXEC && e_type != ET_DYN || Not ( e_machine == EM_386 || e_machine == Perhaps disused ) || Not mmap Then
44  Return -ENOEXEC
48  If interp_flags & BINPRM_FLAGS_PATH_INACCESSIBLE Then Return -ENOENT
51  allow_write_access(file)
52  fput(file)
53  file = NULL
58  interp = EM86_INTERP
59  i_name = EM86_I_NAME
60  i_arg = NULL
70  Arguments are '\0' separated strings found at the location bprm->p* points to; chop off the first by relocating brpm->p to right after* the first '\0' encountered.
71  retval = Like copy_strings, but get argv and its values from kernel memory.
72  If retval < 0 Then Return retval
73  argc++
74  If i_arg Then
75  retval = Like copy_strings, but get argv and its values from kernel memory.
76  If retval < 0 Then Return retval
77  argc++
79  retval = Like copy_strings, but get argv and its values from kernel memory.
80  If retval < 0 Then Return retval
81  argc++
88  file = open_exec(interp)
89  If IS_ERR(file) Then Return PTR_ERR(file)
92  file = file
94  retval = Fill the binprm structure from the inode.* Check permissions, then read the first BINPRM_BUF_SIZE bytes* This may be called multiple times for binary chains (scripts for example).
95  If retval < 0 Then Return retval
98  Return ycle the list of binary formats handler, until one recognizes the image