Linux kernel open system call 분석
(버전 사이의 차이)
(→VFS) |
(→VFS) |
||
9번째 줄: | 9번째 줄: | ||
==== VFS ==== | ==== VFS ==== | ||
<tab2 sep=semicolon> | <tab2 sep=semicolon> | ||
− | [[do_sys_open]](int dfd, const char __user *filename, int flags, umode_t mode) : | + | [[do_sys_open]](int dfd, const char __user *filename, int flags, umode_t mode) : long ;{{sp4}} ; [http://lxr.free-electrons.com/source/fs/open.c#L975 fs/open.c] |
− | {{sp2}}[[getname]](const char __user * filename) : struct filename ; ; [http://lxr.free-electrons.com/source/fs/ | + | {{sp2}}[[getname]](const char __user * filename) : struct filename ; ; [http://lxr.free-electrons.com/source/fs/namei.c#L209 fs/namei.c] |
− | {{sp2}}{{sp2}}[[getname_flags]](const char __user *filename, int flags, int *empty) : struct filename ; ; [http://lxr.free-electrons.com/source/fs/ | + | {{sp2}}{{sp2}}[[getname_flags]](const char __user *filename, int flags, int *empty) : struct filename ; ; [http://lxr.free-electrons.com/source/fs/namei.c#L133 fs/namei.c] |
− | {{sp2}}[[get_unused_fd_flags]](unsigned flags) : int ;; [http://lxr.free-electrons.com/source/ | + | {{sp2}}[[get_unused_fd_flags]](unsigned flags) : int ;; [http://lxr.free-electrons.com/source/fs/file.c#L516 fs/file.c] |
− | {{sp2}}{{sp2}}[[__alloc_fd]]( | + | {{sp2}}{{sp2}}[[__alloc_fd]](struct files_struct *files, unsigned start, unsigned end, unsigned flags) : int ; ; [http://lxr.free-electrons.com/source/fs/file.c#L453 fs/file.c] |
− | {{sp2}}[[do_filp_open]](int dfd, struct filename *pathname, const struct open_flags *op) : struct file ; ; [http://lxr.free-electrons.com/source/ | + | {{sp2}}[[do_filp_open]](int dfd, struct filename *pathname, const struct open_flags *op) : struct file ; ; [http://lxr.free-electrons.com/source/fs/namei.c#L3223 fs/namei.c] |
− | {{sp2}}{{sp2}}[[path_openat]](const | + | {{sp2}}{{sp2}}[[path_openat]](int dfd, struct filename *pathname, struct nameidata *nd, const struct open_flags *op, int flags) : struct file ; ; [http://lxr.free-electrons.com/source/fs/namei.c#L3152 fs/namei.c] |
− | {{sp2}}{{sp2}}{{sp2}}[[get_empty_filp]]( | + | {{sp2}}{{sp2}}{{sp2}}[[get_empty_filp]](void) : struct file ; ; [http://lxr.free-electrons.com/source/fs/file_table.c#L104 fs/file_table.c] |
− | {{sp2}}{{sp2}}{{sp2}}[[do_tmpfile]]( | + | {{sp2}}{{sp2}}{{sp2}}[[do_tmpfile]](int dfd, struct filename *pathname, struct nameidata *nd, int flags, const struct open_flags *op, struct file *file, int *opened) : int ; ; [http://lxr.free-electrons.com/source/fs/namei.c#L3091 fs/namei.c] |
− | {{sp2}}{{sp2}}{{sp2}}[[path_init]](const char | + | {{sp2}}{{sp2}}{{sp2}}[[path_init]](int dfd, const char *name, unsigned int flags, struct nameidata *nd, struct file **fp) |
− | {{sp2}}{{sp2}}{{sp2}}[[link_path_walk]](const char | + | : int ; ; [http://lxr.free-electrons.com/source/fs/namei.c#L1808 fs/namei.c] |
+ | {{sp2}}{{sp2}}{{sp2}}[[link_path_walk]](const char *name, struct nameidata *nd) : int ; ; [http://lxr.free-electrons.com/source/fs/namei.c#L1728 fs/namei.c] | ||
{{sp2}}[[fd_install]](const char __user * filename) : struct filename ; ; [http://lxr.free-electrons.com/source/fs/read_write.c#L374 fs/file.c] | {{sp2}}[[fd_install]](const char __user * filename) : struct filename ; ; [http://lxr.free-electrons.com/source/fs/read_write.c#L374 fs/file.c] | ||
</tab2> | </tab2> |
2014년 4월 30일 (수) 03:02 판
목차 |
코드 분석
주요 자료구조
struct nameidata | include/linux/namei.h |
주요 함수
System Call
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 | |
__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 | |
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 |