载于m_inode *>。 我正在寻找类似的东西。
外部/外部系统是否把这一信息储存到任何地方,或者在装上记忆时丢失了吗?
载于m_inode *>。 我正在寻找类似的东西。
外部/外部系统是否把这一信息储存到任何地方,或者在装上记忆时丢失了吗?
没有任何直接联系。 <代码>proc_exe_link(>>功能通过在编造档案的任务中寻找第一个可起诉的版本获取这一信息。 请注意:
struct dentry *dentry = NULL;
struct vfsmount *mnt = NULL;
struct vm_area_struct * vma;
down_read(¤t->mm->mmap_sem);
vma = current->mm->mmap;
while (vma) {
if ((vma->vm_flags & VM_EXECUTABLE) && vma->vm_file)
break;
vma = vma->vm_next;
}
if (vma) {
mnt = mntget(vma->vm_file->f_path.mnt);
dentry = dget(vma->vm_file->f_path.dentry);
}
up_read(¤t->mm->mmap_sem);
if (dentry) {
/* inode is dentry->d_inode */
}
当然,这并没有消失。 就在近期的欧伦特油轮中,跟踪该油轮是很复杂的。
近期的Libert kernel,身着“构造”号,首先需要用以下方法获得“构造毫米”:
mm = get_task_mm(task);
之后
exe_file = get_mm_exe_file(mm);
如今,你有排泄物档案的固定文件点,有结构文件,可以:
struct inode *inode = file->f_path.dentry->d_inode;
BTW,“获得_mm_exe_file()”的定义是
struct file *get_mm_exe_file(struct mm_struct *mm)
{
struct file *exe_file;
/* We need mmap_sem to protect against races with removal of
* VM_EXECUTABLE vmas */
down_read(&mm->mmap_sem);
exe_file = mm->exe_file;
if (exe_file)
get_file(exe_file);
up_read(&mm->mmap_sem);
return exe_file;
}
Can someone tell me where I can find the initial code, Linus Torvalds shared with hackers. I was thinking it will be a great place to learn about operating systems.
I d like to be able to diff files / directories directly from the Linux Kernel GIT repository without having to download full source. Specifically, I m interested in two potential solutions: The ...
For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...
According to the list of API changes in the 2.6 kernel series on LWN the .owner field of struct proc_dir_entry was removed in the 2.6.30 Kernel. So here s a couple of questions: Was it really ever ...
I m bit confused by the following statement in linux device drivers book. http://www.linuxdriver.co.il/ldd3/ 13.2. USB and Sysfs To help understand what this long device path means, we describe ...
After create a new system call, how to update the kernel? I tried these lines, make-kpkg clean fakeroot make-kpkg -initrd -append-to-version=-custom kernel_image kernel_headers But Ubuntu asked me ...
This may seem like a kind of amorphous question, but how can you get the most of the Linux Kernel Documentation directory? I noticed on the Linux Cross Reference that there is a DocBook directory. ...
I m building a an external module ( device driver ), i.e. it s not in the Linux kernel source tree, but in a separate unrelated source tree. I want to use ctags to browse variable / function ...