|
From: | Paolo Bonzini |
Subject: | Re: KVM_MEM_READONLY slot flag not working properly |
Date: | Thu, 18 Mar 2021 18:54:22 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 18/03/21 18:40, Lorenzo Susini wrote:
Well I'm sorry but I didn't know IDT was marked as read only by Linux. If it is read only, how can you register any new interrupt handler? I guess it's a way of securing stuff against malicious attacks. I was taking for granted that the IDT was written when registering a new irq handler, given that when an interrupt is raised, the new specified handler has to be called and its address should be retrieved in some way, that is by storing it in the IDT.
There's a list of handlers for each IDT entry. This is because the IDT entrypoint has to do more stuff before and after calling the function (and also it has to return with IRET instead of RET). So the IDT entry does not point directly to the function that you register.
(Also some interrupts may be shared by multiple devices, in which case you can have more than one handler).
I'm sorry, I'm a student and I'm trying to understand things, Thank you, Lorenzo
No problem. :) Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |