]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: nx - Fixing NX data alignment with nx_sg list
authorLeonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com>
Thu, 23 Apr 2015 20:40:30 +0000 (17:40 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Aug 2015 03:52:16 +0000 (20:52 -0700)
commitb2b6e1667f52af6477f4a360cefe8c463dfb60fa
treea29e8f2ac4a7f292b91206a6b22ddeca13a8bd8d
parentc0e0ec977861b29059691d51a68bf563d3bc218a
crypto: nx - Fixing NX data alignment with nx_sg list

commit c3365ce130e50176533debe1cabebcdb8e61156c upstream.

In NX we need to pass always a 16 multiple size nx_sg_list to
co processor. Trim function handle with this assuring all nx_sg_lists
are 16 multiple size, although data was not being considerated when
crop was done. It was causing an unalignment between size of the list
and data, corrupting csbcpb fields returning a -23 H_ST_PARM error, or
invalid operation.

This patch fix this recalculating how much data should be put back
in to_process variable what assures the size of sg_list will be
correct with size of the data.

Signed-off-by: Leonidas S. Barbosa <leosilva@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/nx/nx.c