LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   memory fault control (https://www.linuxquestions.org/questions/linux-kernel-70/memory-fault-control-804264/)

bushlyamax 04-26-2010 08:51 AM

memory fault control
 
I'm writing kernel module for searching main memory faults. These control is realized by checking Crc32 checksums of code segments. So I use such algorithm:
- go through the list of active tasks
- for each task go through list of vm_area_struct structures
- check if these VMA is code segment
- check if area is fully loaded in main memory
- translate address from user virtual address space to kernel
- find checksum of these area
- compare with checksum computed at previous circle
After long working period my module got result that everything has changed)) So, generally, there is small problem: all these memory areas turned out to be mutable!) As I think, code segments shouldn't change because of there is no overlays in kernel or program realization.

Can somebody explain me the reason of these fact?

nini09 05-12-2010 06:05 PM

What's the change of memory areas or code segment, virtual or physical address?

fruttenboel 05-12-2010 06:13 PM

Quote:

Originally Posted by bushlyamax (Post 3948090)
I'm writing kernel module for searching main memory faults. These control is realized by checking Crc32 checksums of code segments. So I use such algorithm:

Can somebody explain me the reason of these fact?

Sounds complicated. And: if your system does not crash, memory won't be VERT faulty ...

I use MemTest86 which I have burned to a CD-ROM (what a waste! The CD is 99.9% empty!) and let it run for a night. It runs based on its own small DOSsy OS.

fruttenboel 05-12-2010 06:20 PM

Quote:

Originally Posted by bushlyamax (Post 3948090)
I'm writing kernel module for searching main memory faults. These control is realized by checking Crc32 checksums of code segments. So I use such algorithm:

As I think, code segments shouldn't change because of there is no overlays in kernel or program realization.

Can somebody explain me the reason of these fact?

It's been over 10 years that I programmed in assembly so I may be totally wrong here...

In Real Mode, ASM is fun. In Protected Mode it is less fun.

Linux runs in PM so, AFAIK, there are no Code Segments anymore. Just descriptors and lookup tables. The value you load into the CS register is used as an index in the memory management controller register (of which I forgot the name and am too lazy to look it up in my AMD K6 programming manual).


All times are GMT -5. The time now is 05:58 AM.