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, 08 Aug 2023 11:12:09 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     axboe@...nel.dk, linux-kernel@...r.kernel.org, mingo@...hat.com,
        dvhart@...radead.org, dave@...olabs.net, andrealmeid@...lia.com,
        Andrew Morton <akpm@...ux-foundation.org>, urezki@...il.com,
        hch@...radead.org, lstoakes@...il.com,
        Arnd Bergmann <arnd@...db.de>, linux-api@...r.kernel.org,
        linux-mm@...ck.org, linux-arch@...r.kernel.org,
        malteskarupke@....de
Subject: Re: [PATCH  v2 11/14] futex: Implement FUTEX2_NUMA

On Tue, Aug 08 2023 at 10:54, Peter Zijlstra wrote:
> On Mon, Aug 07, 2023 at 11:11:04PM +0200, Thomas Gleixner wrote:
>> On Mon, Aug 07 2023 at 14:18, Peter Zijlstra wrote:
>> >  /**
>> >   * futex_hash - Return the hash bucket in the global hash
>> >   * @key:	Pointer to the futex key for which the hash is calculated
>> > @@ -114,10 +137,29 @@ late_initcall(fail_futex_debugfs);
>> >   */
>> >  struct futex_hash_bucket *futex_hash(union futex_key *key)
>> >  {
>> > -	u32 hash = jhash2((u32 *)key, offsetof(typeof(*key), both.offset) / 4,
>> > +	u32 hash = jhash2((u32 *)key,
>> > +			  offsetof(typeof(*key), both.offset) / sizeof(u32),
>> >  			  key->both.offset);
>> > +	int node = key->both.node;
>> > +
>> > +	if (node == -1) {
>> 
>> NUMA_NO_NODE please all over the place.
>
> Ah, so our (futex2) ABI states this needs to be -1, but in theory
> someone could come along and change the kernel internal NUMA_NO_NODE to
> something else.
>
> That is, I explicitly chose not to use it. I can of course, because as
> of now these values do match.

Fair enough, but can we at least have a proper define in the futex2 ABI
please?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ