Should I turn off interrupt?
How many situation I should concern?
Is there any documents for this?
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.
If you have to change
(E)SPtogether withSS(and usually you have to), then if interrupts are enabled, it must be done using either a singleLSS (E)SP, ...instruction or two instructionsMOV SS, ...+MOV (E)SP, ...(in exactly this order). If you first change(E)SPand thenSS, or if you first changeSS, then execute some other instructions and only then change(E)SP, you must do all that with disabled interrupts (e.g. withCLI) because otherwise you’ll have a window within which the pairSS:(E)SPwill be incorrect/inconsistent and any interrupt that occurs at that time will likely corrupt memory.You can read about all this in intel and AMD CPU manuals.