whats so bad about a ring3 stack

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
earlz

whats so bad about a ring3 stack

Post by earlz »

Well i was thinking about me being told "you need a tss entry to tell where the kernel stack is" but really cant i use the user stack then do a "software stack switch"
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re:whats so bad about a ring3 stack

Post by Colonel Kernel »

Ask yourself this question: "What does the CPU do when an interrupt occurs while it's running in ring 3?"

If you don't know the answer, consult the Intel manuals.
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
earlz

Re:whats so bad about a ring3 stack

Post by earlz »

irc it push's cs,eip,ss,esp(not in that order of course) and loads cs and eip from idt
I'm not talking about ints but rather irq's really but still I dont see any problem with that
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re:whats so bad about a ring3 stack

Post by Colonel Kernel »

Ask yourself this question: Why would the CPU bother pushing ss and esp if it wasn't planning to switch stacks...?

Also, what you call "irqs" and what I call "interrupts" are the same thing.
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
earlz

Re:whats so bad about a ring3 stack

Post by earlz »

yea gues you got a point there

and so im on my way to get a tss ;D
Post Reply