Linux kernel open system call 분석

Retired DISLab
이동: 둘러보기, 찾기

목차

코드 분석

주요 자료구조

struct nameidata include/linux/namei.h

주요 함수

System Call

SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode) include/fs/open.c

VFS

do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode) : long fs/open.c
getname(const char __user * filename) : struct filename fs/namei.c
프로세스 주소 공간에서 파일 경로명을 읽음
getname_flags(const char __user *filename, int flags, int *empty) : struct filename fs/namei.c
get_unused_fd_flags(unsigned flags) : int fs/file.c
프로세스의 비어있는 파일 디스크립터를 fd 지역변수에 저장
__alloc_fd(struct files_struct *files, unsigned start, unsigned end, unsigned flags) : int fs/file.c
do_filp_open(int dfd, struct filename *pathname, const struct open_flags *op) : struct file fs/namei.c
path_openat(int dfd, struct filename *pathname, struct nameidata *nd, const struct open_flags *op, int flags) : struct file fs/namei.c
get_empty_filp(void) : struct file fs/file_table.c
kmem_cache_zalloc(filp_cachep, GFP_KERNEL) : void mm/slab.c
kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) : void include/linux/slab.h
do_tmpfile(int dfd, struct filename *pathname, struct nameidata *nd, int flags, const struct open_flags *op, struct file *file, int *opened) : int fs/namei.c
path_init(int dfd, const char *name, unsigned int flags, struct nameidata *nd, struct file **fp) : int fs/namei.c
link_path_walk(const char *name, struct nameidata *nd) : int fs/namei.c
fd_install(const char __user * filename) : struct filename fs/file.c

개인 도구
이름공간
변수
행위
둘러보기
구성원
연구
연구실
기타
도구모음
인쇄/내보내기