LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-26-2010, 08:51 AM   #1
bushlyamax
LQ Newbie
 
Registered: Apr 2010
Posts: 1

Rep: Reputation: 0
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?
 
Old 05-12-2010, 06:05 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
What's the change of memory areas or code segment, virtual or physical address?
 
Old 05-12-2010, 06:13 PM   #3
fruttenboel
Member
 
Registered: Jul 2008
Location: Tilburg NL
Distribution: Slackware 14.2 ciurrent, kernel 3.18.11
Posts: 270

Rep: Reputation: 48
Quote:
Originally Posted by bushlyamax View Post
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.
 
Old 05-12-2010, 06:20 PM   #4
fruttenboel
Member
 
Registered: Jul 2008
Location: Tilburg NL
Distribution: Slackware 14.2 ciurrent, kernel 3.18.11
Posts: 270

Rep: Reputation: 48
Quote:
Originally Posted by bushlyamax View Post
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).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Segmentation Fault in Shared Memory the_satsuma_man Programming 3 03-03-2009 03:39 PM
Segmentation Fault, Should I try new memory M$ISBS Linux - Hardware 10 07-04-2006 04:49 PM
Memory fault(coredump) error Gigantor Programming 5 10-31-2005 03:11 AM
Memory Fault Error ims_mca Linux - Software 0 03-09-2005 03:17 AM
Memory fault russoue Programming 14 11-13-2004 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration