linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Murzin <murzin.v@gmail.com>
To: Matvejchikov Ilya <matvejchikov@gmail.com>
Cc: linux-mm@kvack.org
Subject: Re: A question aboout virtual mapping of kernel and module pages
Date: Fri, 20 Dec 2013 03:41:30 +0100	[thread overview]
Message-ID: <20131220024126.GA1852@hp530> (raw)
In-Reply-To: <CAKh5naYHUUUPnSv4skmX=+88AB-L=M4ruQti5cX=1BRxZY2JRg@mail.gmail.com>

Hi Ilya!

On Fri, Dec 20, 2013 at 12:25:13AM +0400, Matvejchikov Ilya wrote:
> I'm using VMAP function to create memory writable mapping as it suggested
> in ksplice project. Here is the implementation of map_writable function:
> ... 
> 
> This function works well when I used it to map kernel's text addresses. All
> fine and I can rewrite read-only data well via the mapping.
> 
> Now, I need to modify kernel module's text. Given the symbol address inside
> the module, I use the same method. The mapping I've got seems to be valid.
> But all my changes visible only in that mapping and not in the module!
> 
> I suppose that in case of module mapping I get something like copy-on-write
> but I can't prove it.
> 

Looks like I-D cache aliasing... Have you flushed cashes after your
modifications were done?

Vladimir

> Can anyone explain me what's happend and why I can use it for mapping
> kernel and can't for modules?
> 
> http://stackoverflow.com/questions/20658357/virtual-mapping-of-kernel-and-module-pages

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-12-20  2:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19 20:25 Matvejchikov Ilya
2013-12-20  2:41 ` Vladimir Murzin [this message]
2013-12-20  8:25   ` Matvejchikov Ilya

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=20131220024126.GA1852@hp530 \
    --to=murzin.v@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=matvejchikov@gmail.com \
    /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