All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Eric Biggers <ebiggers@google.com>
Subject: Re: [PATCH 0/7] crypto: switch to static calls for CRC-T10DIF
Date: Mon, 11 Jan 2021 21:56:48 +0100	[thread overview]
Message-ID: <X/y7kOIJSKQs1FCv@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAMj1kXHLBDUGZbc7dw0bd5K4ecPLmnDYMwrPA7yGzA0VNaJWgw@mail.gmail.com>

On Mon, Jan 11, 2021 at 07:36:20PM +0100, Ard Biesheuvel wrote:
> On Mon, 11 Jan 2021 at 18:27, Ard Biesheuvel <ardb@kernel.org> wrote:
> > On Mon, 11 Jan 2021 at 17:52, Ard Biesheuvel <ardb@kernel.org> wrote:

> > > Special request to Peter to take a look at patch #2, and in particular,
> > > whether synchronize_rcu_tasks() is sufficient to ensure that a module
> > > providing the target of a static call can be unloaded safely.
> >
> > It seems I may have managed to confuse myself slightly here: without
> > an upper bound on the size of the input of the crc_t10dif() routine, I
> > suppose we can never assume that all its callers have finished.
> >
> 
> Replying to self again - apologies.
> 
> I think this is actually correct after all: synchronize_rcu_tasks()
> guarantees that all tasks have passed through a 'safe state', i.e.,
> voluntary schedule(), return to userland, etc, which guarantees that
> no task could be executing the old static call target after
> synchronize_rcu_tasks() returns.

Right, I think it should work.

My initial question was why you'd want to support the unreg at all.
AFAICT these implementations are tiny, why bother having them as a
module, or if you insist having them as a module, why allowing removal?

  reply	other threads:[~2021-01-11 20:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 16:52 [PATCH 0/7] crypto: switch to static calls for CRC-T10DIF Ard Biesheuvel
2021-01-11 16:52 ` [PATCH 1/7] crypto: crc-t10dif - turn library wrapper for shash into generic library Ard Biesheuvel
2021-01-11 16:52 ` [PATCH 2/7] crypto: lib/crc-t10dif - add static call support for optimized versions Ard Biesheuvel
2021-01-11 16:52 ` [PATCH 3/7] crypto: generic/crc-t10dif - expose both arch and generic shashes Ard Biesheuvel
2021-01-11 16:52 ` [PATCH 4/7] crypto: x86/crc-t10dif - convert to static call library API Ard Biesheuvel
2021-01-12  0:01   ` kernel test robot
2021-01-12  0:01     ` kernel test robot
2021-01-11 16:52 ` [PATCH 5/7] crypto: arm/crc-t10dif " Ard Biesheuvel
2021-01-11 16:52 ` [PATCH 6/7] crypto: arm64/crc-t10dif - convert to static call API Ard Biesheuvel
2021-01-11 16:52 ` [PATCH 7/7] crypto: powerpc/crc-t10dif " Ard Biesheuvel
2021-01-11 17:27 ` [PATCH 0/7] crypto: switch to static calls for CRC-T10DIF Ard Biesheuvel
2021-01-11 18:36   ` Ard Biesheuvel
2021-01-11 20:56     ` Peter Zijlstra [this message]
2021-01-11 21:01       ` Ard Biesheuvel
2021-01-11 21:05 ` Eric Biggers
2021-01-11 21:31   ` Ard Biesheuvel
2021-01-28  8:19     ` Ard Biesheuvel

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=X/y7kOIJSKQs1FCv@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=ardb@kernel.org \
    --cc=ebiggers@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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.