Re: [patch V2 10/16] x86/ioperm: Remove bitmap if all permissions dropped
From: Andy Lutomirski
Date: Tue Nov 12 2019 - 12:43:26 EST
On Mon, Nov 11, 2019 at 2:35 PM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> If ioperm() results in a bitmap with all bits set (no permissions to any
> I/O port), then handling that bitmap on context switch and exit to user
> mode is pointless. Drop it.
>
> Move the bitmap exit handling to the ioport code and reuse it for both the
> thread exit path and dropping it. This allows to reuse this code for the
> upcoming iopl() emulation.
Acked-by: Andy Lutomirski <luto@xxxxxxxxxx>