Receive a signal for every page error

I want to install a signal handler in my application so that the kernel sends a signal whenever it handles the page failure trap. Of course, I can use a signal handler SIGSEGV, but I'm really interested in catching page errors that occur when copying to write. For example, after a fork (and not after exec), the original process will receive a page error if it tries to write to a page. I want to be notified of such page errors. How can I achieve this?

+3
source share
2 answers

page errors are interrupts handled by do_page_fault ()

http://www.stillhq.com/pdfdb/000446/data.pdf

. , . , . , , .

: ? , , .

+2

- , , userfaultfd(). , - Tenex Linux, , .

0

All Articles