From: arvid.brodin@enea.com (Arvid Brodin)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Is it possible to relocate a kernel page in physical memory?
Date: Fri, 19 Aug 2011 19:35:08 +0200 [thread overview]
Message-ID: <4E4E9ECC.8030803@enea.com> (raw)
I want to do memory checks (? la memtest86) on a running system. I know using
ECC memory would be a better approach, but unfortunately that is not an option
in this case. Also, this seems like an excellent opportunity to learn more
about the memory system in Linux.
This is on a AVR32 embedded system, BTW.
One approach is to use the AVR32's built-in SRAM pages to store and run kernel
code that periodically takes a spinlock and checks a small part of the physical
memory, before writing back its original value. This has numerous problems,
among others that the SRAM pages are also used by the power management code on
these processors. And of course, it's not exactly portable...
Another approach is to run the test as a part of the normal kernel. For memory
allocated by user processes, this should be pretty straight-forward (I think):
just copy the page data to another physical page and modify the page tables
(right?). When in comes to the kernel, I might be able to skip testing of the
(read-only) text segment by doing md5summing over it instead (would this have
any drawbacks)? But how would one test writable pages allocated by the kernel?
Is there a way to "relocate" a kernel page in physical memory?
--
Arvid Brodin
Enea Services Stockholm AB
next reply other threads:[~2011-08-19 17:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-19 17:35 Arvid Brodin [this message]
2011-08-19 18:05 ` Is it possible to relocate a kernel page in physical memory? Jeff Haran
2011-08-19 18:50 ` Arvid Brodin
2011-08-19 19:04 ` Jeff Haran
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=4E4E9ECC.8030803@enea.com \
--to=arvid.brodin@enea.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.