mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* /dev/mem and highmem
@ 2003-03-03 16:00 Nicolas George
  2003-03-06 16:22 ` Nicolas George
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas George @ 2003-03-03 16:00 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 988 bytes --]

Is there any hope to have access to the highmem through /dev/mem, or a
similar device? Or did I miss an already existing method?

Rationale:

These days, bad RAM seems to become dramatically frequent. We have here
a PC with a few bad bits (switching to ECC is in project), but memtest86
did not find them. Recently, sshd started to segfault. Using cmp -lb
with an uncorrupted version we found the bad bit in the file, and then
looked for it in the phyical memory with `xxd /dev/mem | grep'. We found
it, disabled the area using mem= boot parameter.

Now this PC has a crontab that will write pseudo-random data in the
disabled area, and later read it back and compare it with the original
to find all bad bits.

Then I have another PC with bad RAM, I also discovered a file affected,
and tried the same method. Unfortunately the grep failed. The reason is
likely to be that the file was in highmem.

PS: please Cc me the answers.

Regards,

-- 
  Nicolas George

[-- Attachment #2: Type: application/pgp-signature, Size: 185 bytes --]

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

* Re: /dev/mem and highmem
  2003-03-03 16:00 /dev/mem and highmem Nicolas George
@ 2003-03-06 16:22 ` Nicolas George
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas George @ 2003-03-06 16:22 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 903 bytes --]

Le tridi 13 ventôse, an CCXI, Nicolas George a écrit :
> Is there any hope to have access to the highmem through /dev/mem, or a
> similar device? Or did I miss an already existing method?

Since nobody answered, I suppose that at least I did not miss something
obvious. Si I tried to write it.

What I understoud is that the way to access the byte at physical address
a is to kmap(mem_map[o >> PAGE_SHIFT]), and access at offet
o % PAGE_SHIFT (and then kunmap it). Perharps it is very ix86-centered.
Since it did not crash my PC, and it gave the same data as /dev/mem, I
think I was not totally wrong.

The code is available at <URL:
http://www.eleves.ens.fr/home/george/info/prg/highmem.c >. The write
part is not yet done, but since it is very similar to read, it should be
really straightforward. Nevertheless I will wait a bit before trying it.

Regards,

-- 
  Nicolas George

[-- Attachment #2: Type: application/pgp-signature, Size: 185 bytes --]

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

end of thread, other threads:[~2003-03-06 16:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-03 16:00 /dev/mem and highmem Nicolas George
2003-03-06 16:22 ` Nicolas George

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

all inboxes | Powered by JetHome®