From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Capturing all writes as fault on a memory mapped page.
Date: Wed, 28 May 2014 06:29:35 -0700 [thread overview]
Message-ID: <20140528132935.GA21480@kroah.com> (raw)
In-Reply-To: <CA+aCy1G==tXnY2nvKHUTGnKLKUqrN9EibLMeT-MFxoiwc3vu3Q@mail.gmail.com>
On Wed, May 28, 2014 at 06:47:24PM +0530, Pranay Srivastava wrote:
> Hi
>
> I need to capture all writes on page which is memory mapped by the
> user program.
For what and what are you going to do with them once you "capture" them?
Are you trying to capture them in the kernel or in userspace?
> I've tried setting the vm_page_prot by disabling the
> VM_WRITE flag but even then the page fault occurs only once during the
> first write. VM_SHARED is set to stop COW in the __do_fault.
>
> I was also trying to set_memory_ro(this may not be available for all
> archs?) however I can't do that while handling the fault since the
> page table entries are created later after the
> vm_operations_struct->fault has installed the page for the fault.
>
> I'm not having any clues on how to do this. Any help would be really
> helpful on this.
I don't think this is going to be possible, sorry, please go revisit
the reason you think you want to do this.
greg k-h
next prev parent reply other threads:[~2014-05-28 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-28 13:17 Capturing all writes as fault on a memory mapped page Pranay Srivastava
2014-05-28 13:29 ` Greg KH [this message]
2014-05-28 13:43 ` Pranay Srivastava
2014-05-28 14:25 ` Greg KH
2014-05-28 14:38 ` Pranay Srivastava
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140528132935.GA21480@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).