Re: [patch V2 01/16] x86/ptrace: Prevent truncation of bitmap size

From: Andy Lutomirski
Date: Tue Nov 12 2019 - 10:34:52 EST


On Mon, Nov 11, 2019 at 2:36 PM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>
> The active() callback of the IO bitmap regset divides the IO bitmap size by
> the word size (32/64 bit). As the I/O bitmap size is in bytes the active
> check fails for bitmap sizes of 1-3 bytes on 32bit and 1-7 bytes on 64bit.
>
> Use DIV_ROUND_UP() instead.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Reviewed-by: Ingo Molnar <mingo@xxxxxxxxxx>

Reviewed-by: Andy Lutomirski <luto@xxxxxxxxxx>