손지언

d

...@@ -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));
......
...@@ -30,4 +30,4 @@ __attribute__((section(".modinfo"))) = ...@@ -30,4 +30,4 @@ __attribute__((section(".modinfo"))) =
30 "depends="; 30 "depends=";
31 31
32 32
33 -MODULE_INFO(srcversion, "A0F99FC71D5DD93F3F8D53C"); 33 +MODULE_INFO(srcversion, "F027612343C6A28CC173B86");
......