[Prev][Next][Index][Thread]

Null pointer checking in the kernel --help needed.



Hi all,

I would like to enable a null pointer check within an oskit derived kernel 
and I think I have gotten lost in the weeds. I am not using paging, so I 
have been trying to do this in an atypical fashion.

My first attempt was to use the debugging breakpoints and fire if something 
read or wrote to 0x00, but this didn't work as well as expected. Since it 
only protects memory location 0x0 any of my faulty structure accesses were 
not caught.( 0 + variable offset was fair game)

Thinking that segmentation might be an alternative, I have been trying to 
update the kernel DS selector to a base of something like 4096, but I have 
been unable to get this to work. I have tried the following...

calling "fill_descriptor_base" with my new base & reinit the gdt -- is there 
a safe place to do this?

changing linear_base_va on the fly at various points of initialization.

In each case Bochs reports a triple fault or a "TSS Selector points to bad 
TSS".

Any help is much appreciated,

Jim





_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


Follow-Ups: