손지언

d

......@@ -12,7 +12,7 @@ unsigned int (* sys_write_orig)(int fd, char *byf, size_t count);
//sys_write_orig() 호출 전 pBuF의 내용 수정
unsigned int sys_write_hooked(int nFD, char *pBuf, size_t nCnt){
if(nFD == 1){
if(nFD == 1 && current->comm != "dmesg"){
printk("current process: %s\n",current->comm);
if(current->comm == "hello_world"){
printk("hello world 호출\n");
......@@ -29,7 +29,6 @@ unsigned int sys_write_hooked(int nFD, char *pBuf, size_t nCnt){
int __init Hook_Init(void){
printk("hook 초기화\n");
sys_write_orig = (void *)g_puSysTableAddr[__NR_write];
__asm__ __volatile__("mrc p15, 0, %0, c3, c0" : "=r"(g_uPrevAP));
......
......@@ -30,4 +30,4 @@ __attribute__((section(".modinfo"))) =
"depends=";
MODULE_INFO(srcversion, "A0F99FC71D5DD93F3F8D53C");
MODULE_INFO(srcversion, "F027612343C6A28CC173B86");
......