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: <CAHk-=wj-UanKTT-NZKLVjK3mgQsC0Ptv8mK8AM7LfZhj2dVCUA@mail.gmail.com>
Date: Fri, 23 Aug 2024 08:05:43 +0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: paul@...l-moore.com, linux-security-module@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH] cred: separate the refcount from frequently read fields

On Thu, 22 Aug 2024 at 21:15, Mateusz Guzik <mjguzik@...il.com> wrote:
>
> The refcount shares the cacheline with uid, gid and other frequently
> read fields.

So moving the refcount around looks sensible, but I don't see why you
moved 'non_rcu' away from the rcu head union.

Isn't 'non_rcu' accessed exactly when the refcount is accessed too? So
putting it in the same cacheline with ->usage would seem to make
sense, and you literally moved the RCU head there.

Why not move it as a union, and keep the non-rcu bit with the RCU head?

Yes, it is rarely actually written to and as such can be "mostly
read-only", but since it is both read and written next to refcounts,
why do that?

Did I miss some common use?

               Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ