From: Ram Pai <linuxram@us.ibm.com>
To: linuxppc-dev@ozlabs.org
Cc: mpe@ellerman.id.au, hbabu@us.ibm.com, nacc@us.ibm.com
Subject: [PATCH] Endian swap ->count before handing over to the nx-842 compressor
Date: Fri, 30 Oct 2015 15:13:12 -0700 [thread overview]
Message-ID: <20151030221312.GA22547@ram.oc3035372033.ibm.com> (raw)
The nx-842 compressor overshoots the output buffer corrupting memory. Verified
that the following patch the issue on a LE system.
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
---
drivers/crypto/nx/nx-842-powernv.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/crypto/nx/nx-842-powernv.c b/drivers/crypto/nx/nx-842-powernv.c
index 3750e13..3b80ea7 100644
--- a/drivers/crypto/nx/nx-842-powernv.c
+++ b/drivers/crypto/nx/nx-842-powernv.c
@@ -66,7 +66,7 @@ static void setup_indirect_dde(struct data_descriptor_entry *dde,
unsigned int dde_count, unsigned int byte_count)
{
dde->flags = 0;
- dde->count = dde_count;
+ dde->count = cpu_to_be32(dde_count);
dde->index = 0;
dde->length = cpu_to_be32(byte_count);
dde->address = cpu_to_be64(nx842_get_pa(ddl));
--
1.7.1
next reply other threads:[~2015-10-30 22:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 22:13 Ram Pai [this message]
2015-11-02 1:24 ` [PATCH] Endian swap ->count before handing over to the nx-842 compressor Michael Ellerman
2015-11-02 18:46 ` Ram Pai
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=20151030221312.GA22547@ram.oc3035372033.ibm.com \
--to=linuxram@us.ibm.com \
--cc=hbabu@us.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=nacc@us.ibm.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).