Mapping a memory address to all the processes using it

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Wed Feb 26 19:41:24 EST 2014


On Wed, 26 Feb 2014 14:52:09 -0800, Sandeep K Chaudhary said:

> I am working on a hack which requires me to find all the processes
> using a particular memory address. Lets say I get an MCE error
> containing a memory address. I want to use this address to find all
> the processes that might access it, and kill them before they do.
> Please let me know if this is possible using some already implemented
> routine.

You mean like this in-tree code?

config MEMORY_FAILURE
        depends on MMU
        depends on ARCH_SUPPORTS_MEMORY_FAILURE
        bool "Enable recovery from hardware memory errors"
        select MEMORY_ISOLATION
        help
          Enables code to recover from some memory failures on systems
          with MCA recovery. This allows a system to continue running
          even when some of its memory has uncorrected errors. This requires
          special hardware support and typically ECC memory.

Oh, and if you want to test your code, there's this one:

config HWPOISON_INJECT
        tristate "HWPoison pages injector"
        depends on MEMORY_FAILURE && DEBUG_KERNEL && PROC_FS
        select PROC_PAGE_MONITOR


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140226/d6a7552f/attachment-0001.bin 


More information about the Kernelnewbies mailing list