lkml.org 
[lkml]   [2010]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectProblem with set_memory_rw()
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.



\
 
 \ /
  Last update: 2010-02-03 22:01    [W:0.027 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site