In linux 0.11 kernel, the keyboard interrupt handler is a trap gate, i.e. does not disable interrupt from INTR pin,
_keyboard_interrupt:
push eax
...
in al,60h // read scan code
call key_table[eax*4]
reset keyboard
...
mov al, 20h
out 20h, al // send EOI to 8259A interrupt controller
call _do_tty_interrupt
...
pop eax
iretd
While CPU is processing in _do_tty_interrupt after sending EOI to 8259A interrupt controller, another keyboard interrupt may be asserted. Can keyboard interrupt be interrupted (nested) by further keyboard interrupt?
They keyboard has a buffer in it, failure to read the key from the buffer will prevent any subsequent IRQs from the keyboard, there is no need to disable the interrupt.
If another interrupt occurs during
_do_tty_interrupt
the PIC tells the CPU about it and a new interrupt handler is executed once the CPU saves state information on the stack again.