From: "Horia Geantă" <horia.geanta@freescale.com>
To: Kim Phillips <kim.phillips@linaro.org>
Cc: <yashpal.dutta@freescale.com>, <linux-crypto@vger.kernel.org>,
<stable@vger.kernel.org>
Subject: Re: [PATCH v4] crypto: caam - map src buffer before access
Date: Tue, 24 Sep 2013 12:07:20 +0300 [thread overview]
Message-ID: <52415648.90103@freescale.com> (raw)
In-Reply-To: <20130923135134.23a7462d143b8e2a1f0cc165@linaro.org>
On 9/23/2013 9:51 PM, Kim Phillips wrote:
> On Sat, 21 Sep 2013 14:26:35 +0530
> Yashpal Dutta <yashpal.dutta@freescale.com> wrote:
>
>> KMap the buffers before copying trailing bytes during hmac into a session
>> temporary buffer. This is required if pinned buffer from user-space is send
>> during hmac and is safe even if hmac request is generated from within kernel.
> it may be "safe" but it adversely affects performance for AF_ALG users,
> no?
>
> why does ocf-linux need this, and not AF_ALG? Is a patch to ocf-linux
> more appropriate here?
SW hashing (crypto/ahash.c, crypto/shash.c) do the kmap/kunmap.
Crypto engine drivers should do this too. Either by themselves or
(probably better) try to use existing support in crypto/scatterwalk.c
At the interface level, AF_ALG issues get_user_pages via
af_alg_make_sg(), similar to what ocf-linux does.
>
>> Cc:stable@vger.kernel.org
> fyi, this violates the following rule in
> Documentation/stable_kernel_rules.txt:
>
> - It or an equivalent fix must already exist in Linus' tree (upstream).
AFAICT, rules are more flexible, at least that's my understanding.
Adding a Cc:stable in the signed-off area is more convenient, since it
provides for automatic inclusion in -stable tree (once patch reaches
Linus' tree):
- To have the patch automatically included in the stable tree, add the tag
Cc: stable@vger.kernel.org
in the sign-off area. Once the patch is merged it will be applied to
the stable tree without anything else needing to be done by the author
or subsystem maintainer.
Horia
prev parent reply other threads:[~2013-09-24 9:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-21 8:56 [PATCH v4] crypto: caam - map src buffer before access Yashpal Dutta
2013-09-23 18:51 ` Kim Phillips
2013-09-24 9:07 ` Horia Geantă [this message]
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=52415648.90103@freescale.com \
--to=horia.geanta@freescale.com \
--cc=kim.phillips@linaro.org \
--cc=linux-crypto@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=yashpal.dutta@freescale.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 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).