- 论坛徽章:
- 0
|
在include/linux/binfmts.h里发现了一个数据结构linux_binprm- /*
- * This structure is used to hold the arguments that are used when loading binaries.
- */
- struct linux_binprm{
- char buf[BINPRM_BUF_SIZE];
- #ifdef CONFIG_MMU
- struct vm_area_struct *vma;
- #else
- # define MAX_ARG_PAGES 32
- struct page *page[MAX_ARG_PAGES];
- #endif
- struct mm_struct *mm;
- unsigned long p; /* current top of mem */
- int sh_bang;
- struct file * file;
- int e_uid, e_gid;
- kernel_cap_t cap_inheritable, cap_permitted, cap_effective;
- void *security;
- int argc, envc;
- char * filename; /* Name of binary as seen by procps */
- char * interp; /* Name of the binary really executed. Most
- of the time same as filename, but could be
- different for binfmt_{misc,script} */
- unsigned interp_flags;
- unsigned interp_data;
- unsigned long loader, exec;
- unsigned long argv_len;
- };
复制代码 用current结构能不能获得类似linux_binprm相关的信息? |
|