lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrX=T+d2ygrcGKMJpb+Dwz-E8cGWLB8=67eV-gXjd77Dhw@mail.gmail.com>
Date:   Tue, 12 Nov 2019 08:02:34 -0800
From:   Andy Lutomirski <luto@...nel.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
        Linus Torvalds <torvalds@...uxfoundation.org>,
        Andy Lutomirski <luto@...nel.org>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Willy Tarreau <w@....eu>, Juergen Gross <jgross@...e.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [patch V2 07/16] x86/ioperm: Move iobitmap data into a struct

On Mon, Nov 11, 2019 at 2:35 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> No point in having all the data in thread_struct, especially as upcoming
> changes add more.
>
> Make the bitmap in the new struct accessible as array of longs and as array
> of characters via a union, so both the bitmap functions and the update
> logic can avoid type casts.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
> V2: New patch
> ---
>  arch/x86/include/asm/iobitmap.h  |   15 ++++++++
>  arch/x86/include/asm/processor.h |   21 +++++------
>  arch/x86/kernel/cpu/common.c     |    2 -
>  arch/x86/kernel/ioport.c         |   69 +++++++++++++++++++--------------------
>  arch/x86/kernel/process.c        |   38 +++++++++++----------
>  arch/x86/kernel/ptrace.c         |   12 ++++--
>  6 files changed, 89 insertions(+), 68 deletions(-)
>
> --- /dev/null
> +++ b/arch/x86/include/asm/iobitmap.h
> @@ -0,0 +1,15 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _ASM_X86_IOBITMAP_H
> +#define _ASM_X86_IOBITMAP_H
> +
> +#include <asm/processor.h>
> +
> +struct io_bitmap {
> +       unsigned int            io_bitmap_max;
> +       union {
> +               unsigned long   bits[IO_BITMAP_LONGS];
> +               unsigned char   bitmap_bytes[IO_BITMAP_BYTES];
> +       };

Now that you have bytes and longs, can you rename io_bitmap_max so
it's obvious which one it refers to?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ