Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_open_execat

Proto:static struct file *do_open_execat(int fd, struct filename *name, int flags)

Type:struct file

Parameter:

TypeParameterName
intfd
struct filename *name
intflags
842  struct open_flags open_exec_flags = {open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC, acc_mode = MAY_EXEC, intent = ... in open , lookup_flags = llow links at the end , }
849  If (flags & ~(Do not follow symbolic links. | Allow empty relative pathname )) != 0 Then Return ERR_PTR( - EINVAL)
851  If flags & Do not follow symbolic links. Then lookup_flags &= ~llow links at the end
853  If flags & Allow empty relative pathname Then lookup_flags |= accept empty path [user_... only]
856  file = do_filp_open(fd, name, & open_exec_flags)
857  If IS_ERR(file) Then Go to out
860  err = -EACCES
861  If Not S_ISREG(i_mode) Then Go to exit
864  If path_noexec( & f_path) Then Go to exit
867  err = deny_write_access(file)
868  If err Then Go to exit
871  If pointer to actual string [0] != '\0' Then snotify_open - file was opened
874  out :
875  Return file
877  exit :
878  fput(file)
879  Return ERR_PTR(err)
Caller
NameDescribe
open_exec
__do_execve_filesys_execve() executes a new program.