Re: [v2 PATCH] crypto: sun4i-ss - Fix sparse endianness markers

2020-10-07 Thread Corentin Labbe
On Thu, Oct 08, 2020 at 04:52:38PM +1100, Herbert Xu wrote: > On Thu, Sep 24, 2020 at 03:27:38PM +0200, Corentin Labbe wrote: > > > > This is an example on next-20200923+BigEndian > > alg: ahash: sha1 test failed (wrong result) on test vector \"random: > > psize=194 ksize=0\", cfg=\"random: inplac

[PATCH] lib/mpi: Remove unused scalar_copied

2020-10-07 Thread Herbert Xu
On Mon, Sep 28, 2020 at 01:24:38PM -0500, Gustavo A. R. Silva wrote: > > I'm reporting the following bug detected by Coverity: > > The _scalar_copied_ variable is set to 0 at > > lib/mpi/ec.c:1255: > 1255 int scalar_copied = 0; > > and it is never updated before reaching the cod

Re: [v2 PATCH] crypto: sun4i-ss - Fix sparse endianness markers

2020-10-07 Thread Herbert Xu
On Thu, Sep 24, 2020 at 03:27:38PM +0200, Corentin Labbe wrote: > > This is an example on next-20200923+BigEndian > alg: ahash: sha1 test failed (wrong result) on test vector \"random: > psize=194 ksize=0\", cfg=\"random: inplace may_sleep use_finup > src_divs=[98.25%@+1124, 1.75%@+5] iv_offset=1

Re: [PATCH] crypto: xor - Remove unused variable count in do_xor_speed

2020-10-07 Thread Herbert Xu
On Tue, Oct 06, 2020 at 12:58:48PM -0700, Nathan Chancellor wrote: > Clang warns: > > crypto/xor.c:101:4: warning: variable 'count' is uninitialized when used > here [-Wuninitialized] > count++; > ^ > crypto/xor.c:86:17: note: initialize the vari

Re: [PATCH] crypto: qat - fix function parameters descriptions

2020-10-07 Thread Herbert Xu
On Wed, Sep 30, 2020 at 11:17:47PM +0100, Giovanni Cabiddu wrote: > Fix description of function parameters. This is to fix the following > warnings when compiling the driver with W=1: > > drivers/crypto/qat/qat_common/adf_sriov.c:133: warning: Function > parameter or member 'numvfs' not descr

Re: [PATCH] crypto: qat - drop input parameter from adf_enable_aer()

2020-10-07 Thread Herbert Xu
On Wed, Sep 30, 2020 at 11:22:11PM +0100, Giovanni Cabiddu wrote: > Remove pointer to struct pci_driver from function adf_enable_aer() as it > is possible to get it directly from pdev->driver. > > Signed-off-by: Giovanni Cabiddu > Reviewed-by: Fiona Trahe > Reviewed-by: Wojciech Ziemba > Review

Re: [PATCH] X.509: fix error return value on the failed path

2020-10-07 Thread Herbert Xu
On Mon, Oct 05, 2020 at 10:46:28PM +0800, Tianjia Zhang wrote: > When memory allocation fails, an appropriate return value > should be set. > > Fixes: 215525639631 ("X.509: support OSCCA SM2-with-SM3 certificate > verification") > Signed-off-by: Tianjia Zhang > --- > crypto/asymmetric_keys/publ

Re: [RFC 1/1] net/tls(TLS_SW): Handle -ENOSPC error return from device/AES-NI

2020-10-07 Thread Herbert Xu
Jakub Kicinski wrote: > > Why would the driver return EBUSY from an async API? What's the caller > supposed to do with that? The Crypto API offers two modes for callers to deal with congestion. If the request can be safely dropped (e.g., IPsec) then ENOSPC will be returned and should be dealt wit

Re: [RFC 1/1] net/tls(TLS_SW): Handle -ENOSPC error return from device/AES-NI

2020-10-07 Thread Jakub Kicinski
On Wed, 7 Oct 2020 15:19:47 -0400 Pooja Trivedi wrote: > When an -ENOSPC error code is returned by the crypto device or AES-NI > layer, TLS SW path sets an EBADMSG on the socket causing the > application to fail. In an attempt to address the -ENOSPC in the TLS > SW path, changes were made in tls_s

Re: WARNING: at kernel/workqueue.c:1473 __queue_work+0x3b8/0x3d0

2020-10-07 Thread Corentin Labbe
On Mon, Oct 05, 2020 at 01:09:10PM -0400, Daniel Jordan wrote: > On Thu, Oct 01, 2020 at 07:50:22PM +0200, Corentin Labbe wrote: > > On Tue, Mar 03, 2020 at 04:30:17PM -0500, Daniel Jordan wrote: > > > Barring other ideas, Corentin, would you be willing to boot with > > > > > > trace_event=ini

[RFC 1/1] net/tls(TLS_SW): Handle -ENOSPC error return from device/AES-NI

2020-10-07 Thread Pooja Trivedi
When an -ENOSPC error code is returned by the crypto device or AES-NI layer, TLS SW path sets an EBADMSG on the socket causing the application to fail. In an attempt to address the -ENOSPC in the TLS SW path, changes were made in tls_sw_sendpage path to trim current payload off the plain and encry

[PATCH] crypto: qat - remove unused function

2020-10-07 Thread Giovanni Cabiddu
Remove unused function qat_dh_get_params(). This is to fix the following warning when compiling the driver with CC=clang W=1 drivers/crypto/qat/qat_common/qat_asym_algs.c:207:34: warning: unused function 'qat_dh_get_params' [-Wunused-function] Signed-off-by: Giovanni Cabiddu Reviewed-by: Fi

Re: [DISCUSSION PATCH 00/41] random: possible ways towards NIST SP800-90B compliance

2020-10-07 Thread Nicolai Stange
Eric Biggers writes: > On Fri, Oct 02, 2020 at 02:38:36PM +0200, Torsten Duwe wrote: >> >> Would some maintainer please comment on potential problems or >> shortcomings? >> > > Well, very people are experts in the Linux RNG *and* have time to review large > patchsets, especially when three peopl

Re: [BUG][PATCH v3] crypto: arm64: Use x16 with indirect branch to bti_c

2020-10-07 Thread Dave Martin
On Tue, Oct 06, 2020 at 11:33:26AM -0500, Jeremy Linton wrote: > The AES code uses a 'br x7' as part of a function called by > a macro. That branch needs a bti_j as a target. This results > in a panic as seen below. Using x16 (or x17) with an indirect > branch keeps the target bti_c. > > Bad mod