Re: [PATCH] crypto: do not free algorithm before using

2018-11-22 Thread Herbert Xu
On Fri, Nov 23, 2018 at 09:05:55AM +0800, PanBian wrote: > > Thanks for your explanation! But I find that the function > crypto_init_spawn just lets spawn->alg point to the algorithm without > increasing the reference count, i.e., alg->cra_refcnt. So I am confused > about how this can protect the

Re: [PATCH] crypto: do not free algorithm before using

2018-11-22 Thread PanBian
On Thu, Nov 22, 2018 at 10:44:41PM +0800, Herbert Xu wrote: > On Thu, Nov 22, 2018 at 06:00:16PM +0800, Pan Bian wrote: > > In multiple functions, the algorithm fields are read after its reference > > is dropped through crypto_mod_put. In this case, the algorithm memory > > may be freed, resulting

[PATCH AUTOSEL 4.14 06/21] crypto: simd - correctly take reqsize of wrapped skcipher into account

2018-11-22 Thread Sasha Levin
From: Ard Biesheuvel [ Upstream commit 508a1c4df085a547187eed346f1bfe5e381797f1 ] The simd wrapper's skcipher request context structure consists of a single subrequest whose size is taken from the subordinate skcipher. However, in simd_skcipher_init(), the reqsize that is retrieved is not from t

[PATCH AUTOSEL 4.19 14/36] crypto: simd - correctly take reqsize of wrapped skcipher into account

2018-11-22 Thread Sasha Levin
From: Ard Biesheuvel [ Upstream commit 508a1c4df085a547187eed346f1bfe5e381797f1 ] The simd wrapper's skcipher request context structure consists of a single subrequest whose size is taken from the subordinate skcipher. However, in simd_skcipher_init(), the reqsize that is retrieved is not from t

Re: [PATCH net-next] cxgb4: use new fw interface to get the VIN and smt index

2018-11-22 Thread Jason Gunthorpe
On Thu, Nov 22, 2018 at 10:53:49AM -0800, David Miller wrote: > From: Jason Gunthorpe > Date: Wed, 21 Nov 2018 19:46:24 -0700 > > > On Wed, Nov 21, 2018 at 01:40:24PM +0530, Ganesh Goudar wrote: > >> From: Santosh Rastapur > >> > >> If the fw supports returning VIN/VIVLD in FW_VI_CMD save it >

Re: [PATCH net-next] cxgb4: use new fw interface to get the VIN and smt index

2018-11-22 Thread David Miller
From: Jason Gunthorpe Date: Wed, 21 Nov 2018 19:46:24 -0700 > On Wed, Nov 21, 2018 at 01:40:24PM +0530, Ganesh Goudar wrote: >> From: Santosh Rastapur >> >> If the fw supports returning VIN/VIVLD in FW_VI_CMD save it >> in port_info structure else retrieve these from viid and save >> them in p

Re: [PATCH] crypto: do not free algorithm before using

2018-11-22 Thread Herbert Xu
On Thu, Nov 22, 2018 at 06:00:16PM +0800, Pan Bian wrote: > In multiple functions, the algorithm fields are read after its reference > is dropped through crypto_mod_put. In this case, the algorithm memory > may be freed, resulting in use-after-free bugs. This patch delays the > put operation until

[PATCH] crypto: do not free algorithm before using

2018-11-22 Thread Pan Bian
In multiple functions, the algorithm fields are read after its reference is dropped through crypto_mod_put. In this case, the algorithm memory may be freed, resulting in use-after-free bugs. This patch delays the put operation until the algorithm is never used. Signed-off-by: Pan Bian --- crypto

[PATCH 1/1] cavium: Update firmware for CNN55XX crypto driver

2018-11-22 Thread Nagadheeraj, Rottela
Firmware upgraded to v10 Signed-off-by: Nagadheeraj Rottela --- WHENCE | 2 +- cavium/cnn55xx_se.fw | Bin 27698 -> 35010 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/WHENCE b/WHENCE index a188c0d..ed10d5b 100644 --- a/WHENCE +++ b/WHENCE @@ -3586,7 +3586,7