ring3 expectation considered harmful?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
jerryleecooper
Member
Member
Posts: 233
Joined: Mon Aug 06, 2007 6:32 pm
Location: Canada

ring3 expectation considered harmful?

Post by jerryleecooper »

By optimizing my kernel I have found a bug, my mouse module, which runs at ring 3 suddenly started "crashing", it gave me a pagefault. That's because its codesize is bigger than one page. All my other modules are less than one page big. So I guess the processor doesn't check the tlb for the first page when iret-ing, expecting the code to be both present and be of the correct ring-space, hence the "considered harmful" famous quote?
As you see, Im just an hobbyist trying figurying things out.
User avatar
jerryleecooper
Member
Member
Posts: 233
Joined: Mon Aug 06, 2007 6:32 pm
Location: Canada

Post by jerryleecooper »

I have just found the bug, it has nothing to do with whatever I have said. Sorry to mislead you. The bug was that the code wasnt aligned to a page boundary because of my silly filesystem! :oops: :oops: :oops:
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

This is *not* the correct subforum for bugs in your kernel. Try OS Development.
User avatar
jerryleecooper
Member
Member
Posts: 233
Joined: Mon Aug 06, 2007 6:32 pm
Location: Canada

Post by jerryleecooper »

JamesM wrote:This is *not* the correct subforum for bugs in your kernel. Try OS Development.
I will be more careful about that. :oops:


About the bug I supposedly corrected, it's still here. Im envisaging switching to ELF for my binaries, right now im just using plain vanila binaries which are statically linked with a.o , the C library.
Post Reply