Set interrupt on / dev / mem access

Is there a way to set an interrupt at a specific physical address in / dev / mem on ARM Linux. So if the application tried to write to the selected address rather than write an operation, does it call my function?


Clarifications The
technique Sam introduced here (write_mem () and read_mem ()) does not work. I'll add more details in case someone can provide an answer.

I want to manage I / O communication between an application and a physical address. Unfortunately, the application manages I / O directly without using the driver (by mapping the physical memory of the assigned value to the mapped memory, for example * value-in-mappedaddress = 0x1F). I want to monitor and even change the values ​​that the application writes to physical memory.

There are three ways for me:

  • Setting a hardware breakpoint in physical memory (I cannot debug the application)

  • Changing the page table, so every time the application requests mapped memory, I send my write request to a different location.

  • Directly modify the values ​​in the mapped address by setting a software breakpoint at the mapped address (the application uses mmap2 () to map the application)

So now I have to use one of these ways, which so far has had no success on any of them.

+3
c ++ linux arm kernel embedded-linux


source to share


No one has answered this question yet

Check out similar questions:

2416
How do you set, clear, and switch one bit?
1101
How to chmod a folder and all its subfolders and files in Linux Ubuntu Terminal?
40
Linux Direct Memory Access
23
User space and kernel space driver
4
ARM nested interrupt handling
3
Python mmap inconsistent behavior with / dev / mem
1
Linux driver for mmap
0
mmap cannot open / dev / mem after multiple calls
0
How to call a function in a kernel module interrupt



All Articles
Loading...
X
Show
Funny
Dev
Pics