public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Problem with set_memory_rw
@ 2010-02-04  5:26 Oleg Kutkov
  2010-02-04  5:45 ` KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 5+ messages in thread
From: Oleg Kutkov @ 2010-02-04  5:26 UTC (permalink / raw)
  To: linux-kernel

Hello, this is my first post in a mailing list, so excuse me if 
something wrong...
I'm new in kernel and try to do some manipulation with memory pages.
For manipulating memory page attributes i used set_memory_rw(),
but function returning 0 and i can't continue writing to memory,
because page, that i want to change, is read only by default.
This is part of my code:


long unsigned addr;

addr = 0x0509940;              //this is addres in memory, that i  want 
to overwrite (read only, for default)

set_memory_rw(addr, 1);    //try to set rw permission on this addres for 
one memory page.


So, function return zero, this is error, as i can understand. If i try 
to write by this address - kernel write in log error messages, such as 
"Unable to handle kernel request at address 0x0509940".
This is kernel bug or something wrong in my code?

Thank for any help.


Best regards,
Oleg.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-02-04  9:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-04  5:26 Problem with set_memory_rw Oleg Kutkov
2010-02-04  5:45 ` KAMEZAWA Hiroyuki
     [not found]   ` <5e9821061002040006p258c2738y87a26c769c04bcfd@mail.gmail.com>
2010-02-04  8:09     ` Fwd: " Oleg Kutkov
2010-02-04  8:51       ` KAMEZAWA Hiroyuki
2010-02-04  9:12         ` Nick Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox