All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luis Henriques <lhenriques@suse.de>
To: David Howells <dhowells@redhat.com>
Cc: Jarkko Sakkinen <jarkko@kernel.org>,
	 Eric Biggers <ebiggers@kernel.org>,
	 keyrings@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] keys: update key quotas in key_put()
Date: Mon, 05 Feb 2024 13:54:11 +0000	[thread overview]
Message-ID: <87il33f24c.fsf@suse.de> (raw)
In-Reply-To: <3007646.1707134664@warthog.procyon.org.uk> (David Howells's message of "Mon, 05 Feb 2024 12:04:24 +0000")

David Howells <dhowells@redhat.com> writes:

> Luis Henriques <lhenriques@suse.de> wrote:
>
>> Delaying key quotas update when key's refcount reaches 0 in key_put() has
>> been causing some issues in fscrypt testing, specifically in fstest
>> generic/581.  This commit fixes this test flakiness by dealing with the
>> quotas immediately, and leaving all the other clean-ups to the key garbage
>> collector.
>
> Okay, I'll accept this.
>

That's awesome, thanks a lot David.  And, as Eric requested, I'll send out
shortly a follow-up fscrypt-specific patch, which will make generic/581
fstest finally pass.

Cheers,
-- 
Luís


>> This is done by moving the updates to the qnkeys and qnbytes fields in
>> struct key_user from key_gc_unused_keys() into key_put().
>> Unfortunately, this also means that we need to switch to the
>> irq-version of the spinlock that protects these fields and use
>> spin_lock_{irqsave,irqrestore} in all the code that touches these
>> fields.
>
> ... Which shouldn't be that often.  It only happens when a key is created or
> finally let go of.
>
>> Signed-off-by: Luis Henriques <lhenriques@suse.de>
>
> Acked-by: David Howells <dhowells@redhat.com>
>
> Jarkko - could you pick this up?
>


  reply	other threads:[~2024-02-05 13:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 10:13 [PATCH v3] keys: update key quotas in key_put() Luis Henriques
2024-01-30 17:27 ` Jarkko Sakkinen
2024-02-05 12:04 ` David Howells
2024-02-05 13:54   ` Luis Henriques [this message]
2024-03-13 12:37     ` Luis Henriques
2024-03-18 21:14       ` Jarkko Sakkinen
2024-03-18 21:37         ` Jarkko Sakkinen
2024-03-18 21:38         ` Luis Henriques

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87il33f24c.fsf@suse.de \
    --to=lhenriques@suse.de \
    --cc=dhowells@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=jarkko@kernel.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.