Created
February 10, 2016 20:48
-
-
Save jamietanna/6bfde28c8b1e872e1e49 to your computer and use it in GitHub Desktop.
Find the current process name in Kernel-mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct file *exe_file; | |
struct mm_struct *mm = current->mm; | |
if(mm) { | |
struct file *exe_file; | |
exe_file = get_mm_exe_file(mm); | |
if(exe_file) { | |
printk("open(): process called is %s\n", exe_file->f_path.dentry->d_name.name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment