Showing
5 changed files
with
2 additions
and
3 deletions
... | @@ -12,7 +12,7 @@ unsigned int (* sys_write_orig)(int fd, char *byf, size_t count); | ... | @@ -12,7 +12,7 @@ unsigned int (* sys_write_orig)(int fd, char *byf, size_t count); |
12 | 12 | ||
13 | //sys_write_orig() 호출 전 pBuF의 내용 수정 | 13 | //sys_write_orig() 호출 전 pBuF의 내용 수정 |
14 | unsigned int sys_write_hooked(int nFD, char *pBuf, size_t nCnt){ | 14 | unsigned int sys_write_hooked(int nFD, char *pBuf, size_t nCnt){ |
15 | - if(nFD == 1){ | 15 | + if(nFD == 1 && current->comm != "dmesg"){ |
16 | printk("current process: %s\n",current->comm); | 16 | printk("current process: %s\n",current->comm); |
17 | if(current->comm == "hello_world"){ | 17 | if(current->comm == "hello_world"){ |
18 | printk("hello world 호출\n"); | 18 | printk("hello world 호출\n"); |
... | @@ -29,7 +29,6 @@ unsigned int sys_write_hooked(int nFD, char *pBuf, size_t nCnt){ | ... | @@ -29,7 +29,6 @@ unsigned int sys_write_hooked(int nFD, char *pBuf, size_t nCnt){ |
29 | 29 | ||
30 | int __init Hook_Init(void){ | 30 | int __init Hook_Init(void){ |
31 | 31 | ||
32 | - printk("hook 초기화\n"); | ||
33 | sys_write_orig = (void *)g_puSysTableAddr[__NR_write]; | 32 | sys_write_orig = (void *)g_puSysTableAddr[__NR_write]; |
34 | 33 | ||
35 | __asm__ __volatile__("mrc p15, 0, %0, c3, c0" : "=r"(g_uPrevAP)); | 34 | __asm__ __volatile__("mrc p15, 0, %0, c3, c0" : "=r"(g_uPrevAP)); | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type
-
Please register or login to post a comment