All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Jens Axboe <axboe@kernel.dk>, Eric Biggers <ebiggers@kernel.org>
Cc: Satya Tangirala <satyat@google.com>,
	linux-block <linux-block@vger.kernel.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 1/2] block/keyslot-manager: introduce devm_blk_ksm_init()
Date: Tue, 26 Jan 2021 10:57:55 +0100	[thread overview]
Message-ID: <CAPDyKFoU1ciLfDig5XkULK-CBkCsmsbAgpyo51O8LEsTr3Q+Sg@mail.gmail.com> (raw)
In-Reply-To: <3b1b6a94-f283-e8a3-8638-6475d0323c30@kernel.dk>

On Mon, 25 Jan 2021 at 22:16, Jens Axboe <axboe@kernel.dk> wrote:
>
> On 1/25/21 1:25 PM, Eric Biggers wrote:
> > 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?
>
> No objections from me, doesn't look like we have any real worries of
> conflicts.

Applied to my mmc for the next branch, by adding Jens' ack. Thanks everybody!

Kind regards
Uffe

  reply	other threads:[~2021-01-26 13:23 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
2021-01-25 21:16       ` Jens Axboe
2021-01-26  9:57         ` Ulf Hansson [this message]
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=CAPDyKFoU1ciLfDig5XkULK-CBkCsmsbAgpyo51O8LEsTr3Q+Sg@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=axboe@kernel.dk \
    --cc=ebiggers@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=satyat@google.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.