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: <20241028110035.GQ9767@noisy.programming.kicks-ass.net>
Date: Mon, 28 Oct 2024 12:00:35 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	linux-kernel@...r.kernel.org,
	André Almeida <andrealmeid@...lia.com>,
	Darren Hart <dvhart@...radead.org>,
	Davidlohr Bueso <dave@...olabs.net>, Ingo Molnar <mingo@...hat.com>,
	Juri Lelli <juri.lelli@...hat.com>,
	Valentin Schneider <vschneid@...hat.com>,
	Waiman Long <longman@...hat.com>
Subject: Re: [RFC PATCH 2/3] futex: Add basic infrastructure for local task
 local hash.

On Mon, Oct 28, 2024 at 11:58:18AM +0100, Thomas Gleixner wrote:
> On Mon, Oct 28 2024 at 11:30, Sebastian Andrzej Siewior wrote:
> > On 2024-10-27 13:19:54 [+0100], Thomas Gleixner wrote:
> >> So T1 and T2 create their local hash and the subsequent usage will fail
> >> because they operate on different hashs. You have the same problem
> >> vs. your allocation scheme when two threads do prctl(ALLOC). We really
> >> want to make this as simple as possible.
> >
> > So I moved this to struct signal_struct and limited allocation to the
> > group leader.
> >
> > You want automated creation of this? For everyone or with a hint? This
> > is 64 bytes per slot due to the cache alignment but event without this
> > struct takes 56 bytes on PREEMPT_RT and 24 bytes on non-RT. So the four
> > slots are 256 bytes. Assuming 2.5k tasks it takes 625 KiB. Maybe not
> > that much.
> >
> > Let me post v2 the signal_struct and then think about auto ON.
> 
> It only affects actual futex users. A lot of executables never use
> them. For ease of testing, can you please make this automatic so there
> is no need to modify a test case?
> 
> Aside of that for RT we really want it automatically enabled and as
> Linus suggested back then probably for NUMA too.
> 
> Stick a trace point or a debugfs counter into the allocation so you can
> observe how many of those are actually allocated and used concurrently.

Ideally it would re-hash and auto-scale to something like 4*nr_threads,
but I realize that's probably a pain in the arse to make happen.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ