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: <Z_l-gjmdztcvkBWZ@kernel.org>
Date: Fri, 11 Apr 2025 23:41:38 +0300
From: Jarkko Sakkinen <jarkko@...nel.org>
To: David Howells <dhowells@...hat.com>
Cc: keyrings@...r.kernel.org, Jarkko Sakkinen <jarkko.sakkinen@...nsys.com>,
	stable@...r.kernel.org, Lukas Wunner <lukas@...ner.de>,
	Ignat Korchagin <ignat@...udflare.com>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	"David S. Miller" <davem@...emloft.net>,
	Peter Huewe <peterhuewe@....de>, Jason Gunthorpe <jgg@...pe.ca>,
	Paul Moore <paul@...l-moore.com>, James Morris <jmorris@...ei.org>,
	"Serge E. Hallyn" <serge@...lyn.com>,
	James Bottomley <James.Bottomley@...senpartnership.com>,
	Mimi Zohar <zohar@...ux.ibm.com>, linux-crypto@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-integrity@...r.kernel.org,
	linux-security-module@...r.kernel.org
Subject: Re: [PATCH v8] KEYS: Add a list for unreferenced keys

On Fri, Apr 11, 2025 at 11:37:25PM +0300, Jarkko Sakkinen wrote:
> > This is going to enable and disable interrupts twice and that can be
> > expensive, depending on the arch.  I wonder if it would be better to do:
> > 
> > 			local_irq_save(flags);
> > 			spin_lock(&key_graveyard_lock);
> > 			list_add_tail(&key->graveyard_link, &key_graveyard);
> > 			spin_unlock(&key_graveyard_lock);
> > 			schedule_work(&key_gc_work);
> > 			local_irq_restore(flags);
> 
> I like this but shouldn't this also comprehend the quota update before
> (just asking for completeness sake)?

"This brings me on to another though:  Should key_serial_lock be a seqlock?
And should the gc use RCU + read_seqlock() and insertion
write_seqlock()?"
https://lore.kernel.org/keyrings/797521.1743602083@warthog.procyon.org.uk/

I think that should be done too (because it made whole a lot of sense)
as a separate patch. I'd just prefer move slowly and in baby steps for
better quality, and keep that as a separate follow-up patch.

It makes obviously sense given rare writes.

BR, Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ