You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I am writing a kernel module that patches a kernel function on ARM64 (android).
The problem is that as I write the 8 bytes I need to write, kernel crashes and reboots.
I have seen you are using update_mapping_prot but I don't understand how to use it to make RW the function code.
For example, let's say I want to change 8 bytes in function ip_forward.
I get the address to modify in a variable like this:
unsigned long *ff;
..........
ff=findcode();
printk("Found code at: %lx\n",ff);
to write it I do:
ff[0]=0xd503201fd503201f; // two nops
or
*ff = 0xd503201fd503201f; // two nops
how can I make the kernel code section where ip_forward is RW before the write?
The text was updated successfully, but these errors were encountered:
Hello!
I am writing a kernel module that patches a kernel function on ARM64 (android).
The problem is that as I write the 8 bytes I need to write, kernel crashes and reboots.
I have seen you are using update_mapping_prot but I don't understand how to use it to make RW the function code.
For example, let's say I want to change 8 bytes in function ip_forward.
I get the address to modify in a variable like this:
unsigned long *ff;
..........
ff=findcode();
printk("Found code at: %lx\n",ff);
to write it I do:
ff[0]=0xd503201fd503201f; // two nops
or
*ff = 0xd503201fd503201f; // two nops
how can I make the kernel code section where ip_forward is RW before the write?
The text was updated successfully, but these errors were encountered: