From: "Horia Geantă" <horia.geanta@freescale.com>
To: <Yashpal.Dutta@freescale.com>
Cc: <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH] drivers/crypto:caam:Map src buffer before access in CAAM driver
Date: Wed, 11 Sep 2013 15:54:28 +0300 [thread overview]
Message-ID: <52306804.1070602@freescale.com> (raw)
In-Reply-To: <1378879346-24500-1-git-send-email-Yashpal.Dutta@freescale.com>
On 9/11/2013 9:02 AM, Yashpal.Dutta@freescale.com wrote:
> From: Yashpal Dutta <yashpal.dutta@freescale.com>
>
> KMap the buffers before copying trailing bytes during hmac in CAAM driver into a
> session temporary buffer. This is required if pinned buffer from user-space
> is send to CAAM driver during hmac and is safe even if hmac request is generated
> from within kernel.
>
> Signed-off-by: Yashpal Dutta <yashpal.dutta@freescale.com>
> ---
Subject not consistent with previous caam driver commits. Prefix should
be "crypto: caam - ".
I would drop the "in CAAM driver" since it's redundant - the prefix
already mentions this.
> @@ -124,15 +139,15 @@ static inline void sg_copy(u8 *dest, struct scatterlist *sg, unsigned int len)
> int cpy_index = 0, next_cpy_index = current_sg->length;
>
> while (next_cpy_index < len) {
> - memcpy(dest + cpy_index, (u8 *) sg_virt(current_sg),
> - current_sg->length);
> + sg_map_copy(dest + cpy_index, current_sg, current_sg->length,
> + current_sg->offset);
CHECK: Alignment should match open parenthesis
#49: FILE: drivers/crypto/caam/sg_sw_sec4.h:143:
+ sg_map_copy(dest + cpy_index, current_sg,
current_sg->length,
+ current_sg->offset);
> current_sg = scatterwalk_sg_next(current_sg);
> cpy_index = next_cpy_index;
> next_cpy_index += current_sg->length;
> }
> if (cpy_index < len)
> - memcpy(dest + cpy_index, (u8 *) sg_virt(current_sg),
> - len - cpy_index);
> + sg_map_copy(dest + cpy_index, current_sg, len-cpy_index,
> + current_sg->offset);
CHECK: Alignment should match open parenthesis
#58: FILE: drivers/crypto/caam/sg_sw_sec4.h:150:
+ sg_map_copy(dest + cpy_index, current_sg, len-cpy_index,
+ current_sg->offset);
prev parent reply other threads:[~2013-09-11 12:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 6:02 [PATCH] drivers/crypto:caam:Map src buffer before access in CAAM driver Yashpal.Dutta
2013-09-11 12:54 ` 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=52306804.1070602@freescale.com \
--to=horia.geanta@freescale.com \
--cc=Yashpal.Dutta@freescale.com \
--cc=linux-crypto@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.