I would like to know the size in bytes that each piece of data uses in the stack. How does the privilege level affect the answer?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Short answer:
If the interrupt is in a higher privelege level, SS and ESP are pushed to the stack, each one consuming 4 bytes. For the same level this step is skipped.
Then EFLAGS, CS and EIP are pushed to the stack, each one using 4 bytes too. So you will most likely have 20 bytes on the stack.
There are many complicted execptions and rules for task gates, faults, context switches etc, so long answer in pseudo code from x86/x64 Instruction Set Reference: