linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Satya Tangirala <satyat@google.com>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-scsi@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH 1/2] block/keyslot-manager: introduce devm_blk_ksm_init()
Date: Mon, 25 Jan 2021 12:25:20 -0800	[thread overview]
Message-ID: <YA8pMDqHsKZA0zfR@sol.localdomain> (raw)
In-Reply-To: <CAA+FYZerh02JXSKghCKuG29ATdYU_=2O93moGnLgD6Jv2v2auQ@mail.gmail.com>

On Mon, Jan 25, 2021 at 12:14:00PM -0800, Satya Tangirala wrote:
> On Thu, Jan 21, 2021 at 12:23 AM Eric Biggers <ebiggers@kernel.org> wrote:
> >
> > From: Eric Biggers <ebiggers@google.com>
> >
> > Add a resource-managed variant of blk_ksm_init() so that drivers don't
> > have to worry about calling blk_ksm_destroy().
> >
> > Note that the implementation uses a custom devres action to call
> > blk_ksm_destroy() rather than switching the two allocations to be
> > directly devres-managed, e.g. with devm_kmalloc().  This is because we
> > need to keep zeroing the memory containing the keyslots when it is
> > freed, and also because we want to continue using kvmalloc() (and there
> > is no devm_kvmalloc()).
> >
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
[..]
> > diff --git a/include/linux/keyslot-manager.h b/include/linux/keyslot-manager.h
> > index 18f3f5346843f..443ad817c6c57 100644
> > --- a/include/linux/keyslot-manager.h
> > +++ b/include/linux/keyslot-manager.h
> > @@ -85,6 +85,9 @@ struct blk_keyslot_manager {
> >
> >  int blk_ksm_init(struct blk_keyslot_manager *ksm, unsigned int num_slots);
> >
> > +int devm_blk_ksm_init(struct device *dev, struct blk_keyslot_manager *ksm,
> > +                     unsigned int num_slots);
> > +
> >  blk_status_t blk_ksm_get_slot_for_key(struct blk_keyslot_manager *ksm,
> >                                       const struct blk_crypto_key *key,
> >                                       struct blk_ksm_keyslot **slot_ptr);
> > --
>
> Looks good to me. Please feel free to add
> Reviewed-by: Satya Tangirala <satyat@google.com>

Thanks Satya.  Jens, any objection to this patch going in through the MMC tree?

- Eric

  reply	other threads:[~2021-01-25 20:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21  8:21 [PATCH 0/2] Resource-managed blk_ksm_init() Eric Biggers
2021-01-21  8:21 ` [PATCH 1/2] block/keyslot-manager: introduce devm_blk_ksm_init() Eric Biggers
2021-01-25 20:14   ` Satya Tangirala
2021-01-25 20:25     ` Eric Biggers [this message]
2021-01-25 21:16       ` Jens Axboe
2021-01-26  9:57         ` Ulf Hansson
2021-01-21  8:21 ` [PATCH 2/2] scsi: ufs: use devm_blk_ksm_init() Eric Biggers
2021-01-25 20:18   ` Satya Tangirala
2021-01-26  9:57   ` Ulf Hansson
2021-01-27  3:01     ` Martin K. Petersen
2021-01-21 12:50 ` [PATCH 0/2] Resource-managed blk_ksm_init() Ulf Hansson
2021-01-25 21:14   ` Jens Axboe
2021-01-25 21:21     ` Eric Biggers
2021-01-25 21:23       ` Jens Axboe

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=YA8pMDqHsKZA0zfR@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=satyat@google.com \
    --cc=ulf.hansson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).