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]
Date:   Tue, 12 Nov 2019 10:22:46 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>, 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>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [patch V2 08/16] x86/ioperm: Add bitmap sequence number

On Mon, Nov 11, 2019 at 11:03:22PM +0100, Thomas Gleixner wrote:
> Add a globally unique sequence number which is incremented when ioperm() is
> changing the I/O bitmap of a task. Store the new sequence number in the
> io_bitmap structure and compare it along with the actual struct pointer
> with the one which was last loaded on a CPU. Only update the bitmap if
> either of the two changes. That should further reduce the overhead of I/O
> bitmap scheduling when there are only a few I/O bitmap users on the system.

> +	/* Update the sequence number to force an update in switch_to() */
> +	iobm->sequence = atomic64_add_return(1, &io_bitmap_sequence);

> +		if (tss->last_bitmap != iobm ||
> +		    tss->last_sequence != iobm->sequence)
> +			switch_to_update_io_bitmap(tss, iobm);

Initially I wondered why we need a globally unique sequence number if we
already check the struct iobitmap pointer. That ought to make the
sequence number per-object.

However, that breaks for memory re-use. So yes, we need that thing to be
global.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ