system call hacking in linux for arm
Question: I am trying to write a kernel module that will replace system calls for linux 4.9. All the solutions on the Internet are specific to x86 but I am working on Beaglebone Black that has an arm cortex A8. This is what I have done so far. static unsigned long *sys_call_table; // this is a global The module when insmoded appears as a device in /dev which the user can open and give an ioctl command. In ioctl I use sys_call_table=(void*)kallsyms_lookup_name("sys_call_table"); which obtains the same address as given in System.map file. But the moment I try to change system call using *(sys_call_table + __NR_open) = (unsigned long)custom_open; It gives errors. they are [ 155.354417] Unable to handle kernel paging request at virtual address c01079f8 [ 155.361959] pgd = de6c0000…