Re: [PATCH 12/13] crypto: hisilicon/zip - Use temporary sqe when doing work

2020-05-08 Thread Zhou Wang
On 2020/5/9 11:42, Song Bao Hua wrote: >> -Original Message- >> From: linux-crypto-ow...@vger.kernel.org >> [mailto:linux-crypto-ow...@vger.kernel.org] On Behalf Of Shukun Tan >> Sent: Friday, May 8, 2020 6:58 PM >> To: herb...@gondor.apana.org.au; da...@davemloft.net >> Cc: linux-crypto@v

Re: [PATCH 13/13] crypto: hisilicon/zip - Make negative compression not an error

2020-05-08 Thread Zhou Wang
On 2020/5/9 11:25, Song Bao Hua wrote: >> -Original Message- >> From: linux-crypto-ow...@vger.kernel.org >> [mailto:linux-crypto-ow...@vger.kernel.org] On Behalf Of Shukun Tan >> Sent: Friday, May 8, 2020 6:58 PM >> To: herb...@gondor.apana.org.au; da...@davemloft.net >> Cc: linux-crypto@v

RE: [PATCH 12/13] crypto: hisilicon/zip - Use temporary sqe when doing work

2020-05-08 Thread Song Bao Hua
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > [mailto:linux-crypto-ow...@vger.kernel.org] On Behalf Of Shukun Tan > Sent: Friday, May 8, 2020 6:58 PM > To: herb...@gondor.apana.org.au; da...@davemloft.net > Cc: linux-crypto@vger.kernel.org; Xu Zaibo ; Wangzhou (B) > >

RE: [PATCH 13/13] crypto: hisilicon/zip - Make negative compression not an error

2020-05-08 Thread Song Bao Hua
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > [mailto:linux-crypto-ow...@vger.kernel.org] On Behalf Of Shukun Tan > Sent: Friday, May 8, 2020 6:58 PM > To: herb...@gondor.apana.org.au; da...@davemloft.net > Cc: linux-crypto@vger.kernel.org; Xu Zaibo ; Wangzhou (B) > >

Re: [PATCH 3/4] crypto: hisilicon/zip - constify struct debugfs_reg32

2020-05-08 Thread Zhou Wang
On 2020/5/9 6:35, Rikard Falkeborn wrote: > hzip_dfx_regs is never changed and can be made const. > > This allows the compiler to put it in the text section instead of the > data section. > > Before: >textdata bss dec hex filename > 152366160 480 218765574 > d

Re: [PATCH] crypto: blake2b - Fix clang optimization for ARMv7-M

2020-05-08 Thread Nathan Chancellor
On Fri, May 08, 2020 at 11:31:07PM +0200, Arnd Bergmann wrote: > On Wed, May 6, 2020 at 7:12 AM Nathan Chancellor > wrote: > > > - > > > +#ifdef CONFIG_CC_IS_CLANG > > > > Given your comment in the bug: > > > > "The code is written to assume no loops are unrolled" > > > > Does it make sense to mak

[PATCH 2/4] crypto: hisilicon/hpre - constify struct debugfs_reg32

2020-05-08 Thread Rikard Falkeborn
hpre_cluster_dfx_regs and hpre_com_dfx_regs are never changed and can therefore be made const. This allows the compiler to put it in the text section instead of the data section. Before: textdata bss dec hex filename 164556288 480 232235ab7 drivers/crypto/hisil

[PATCH 0/4] crypto: constify struct debugfs_reg32

2020-05-08 Thread Rikard Falkeborn
A small series constifying struct debugfs_reg32 where it can be made const. There's no dependency between the patches. Rikard Falkeborn (4): crypto: ccree - constify struct debugfs_reg32 crypto: hisilicon/hpre - constify struct debugfs_reg32 crypto: hisilicon/zip - constify struct debugfs_re

[PATCH 1/4] crypto: ccree - constify struct debugfs_reg32

2020-05-08 Thread Rikard Falkeborn
pid_cd_regs and debug_regs are never changed and can therefore be made const. This allows the compiler to put it in the text section instead of the data section. Before: textdata bss dec hex filename 28712320 6452551487 drivers/crypto/ccree/cc_debugfs.o Aft

[PATCH 4/4] crypto: hisilicon/sec2 - constify sec_dfx_regs

2020-05-08 Thread Rikard Falkeborn
sec_dfx_regs is never changed and can therefore be made const. This allows the compiler to put it in the text section instead of the data section. Before: textdata bss dec hex filename 179827312 480 2577464ae drivers/crypto/hisilicon/sec2/sec_main.o After: t

[PATCH 3/4] crypto: hisilicon/zip - constify struct debugfs_reg32

2020-05-08 Thread Rikard Falkeborn
hzip_dfx_regs is never changed and can be made const. This allows the compiler to put it in the text section instead of the data section. Before: textdata bss dec hex filename 152366160 480 218765574 drivers/crypto/hisilicon/zip/zip_main.o After: textdat

Re: [PATCH] crypto: blake2b - Fix clang optimization for ARMv7-M

2020-05-08 Thread Arnd Bergmann
On Wed, May 6, 2020 at 7:12 AM Nathan Chancellor wrote: > > - > > +#ifdef CONFIG_CC_IS_CLANG > > Given your comment in the bug: > > "The code is written to assume no loops are unrolled" > > Does it make sense to make this unconditional and take compiler > heuristics out of it? > > > +#pragma nounr

Re: jitterentropy_rng on armv5 embedded target

2020-05-08 Thread Stephan Mueller
Am Freitag, 8. Mai 2020, 14:26:41 CEST schrieb Alexander Dahl: Hi Alexander, > Hello, > > Am Freitag, 8. Mai 2020, 14:22:02 CEST schrieb Stephan Mueller: > > Am Freitag, 8. Mai 2020, 14:17:25 CEST schrieb Alexander Dahl: > > > Okay and DRBG has nothing to do with /dev/random ? > > > > Nope, it

Re: jitterentropy_rng on armv5 embedded target

2020-05-08 Thread Alexander Dahl
Hello, Am Freitag, 8. Mai 2020, 14:22:02 CEST schrieb Stephan Mueller: > Am Freitag, 8. Mai 2020, 14:17:25 CEST schrieb Alexander Dahl: > > Okay and DRBG has nothing to do with /dev/random ? > > Nope, it is used as part of the kernel crypto API and its use cases. > > > Then where do the random >

Re: jitterentropy_rng on armv5 embedded target

2020-05-08 Thread Stephan Mueller
Am Freitag, 8. Mai 2020, 14:17:25 CEST schrieb Alexander Dahl: Hi Alexander, > > > If so, then how is it supposed to be set up? > > > > It is intended for in-kernel purposes (namely to seed its DRBG). > > Okay and DRBG has nothing to do with /dev/random ? Nope, it is used as part of the kernel

Re: jitterentropy_rng on armv5 embedded target

2020-05-08 Thread Alexander Dahl
Hello, Stephan, Am Freitag, 8. Mai 2020, 13:58:14 CEST schrieb Stephan Mueller: > > (Although those daemons would solve my problem, I currently try > > to avoid them, because memory on my platform is very restricted and every > > additional running userspace process costs at least around 1 MB.) >

Re: jitterentropy_rng on armv5 embedded target

2020-05-08 Thread Stephan Mueller
Am Freitag, 8. Mai 2020, 13:40:08 CEST schrieb Alexander Dahl: Hi Alexander, > Hello, > > after upgrading OpenSSL to 1.1.1g on an armv5 based embedded target I had a > deeper look into entropy generation for that device and stumbled over the in > kernel 'jitterentropy_rng' module. > > As far as

jitterentropy_rng on armv5 embedded target

2020-05-08 Thread Alexander Dahl
Hello, after upgrading OpenSSL to 1.1.1g on an armv5 based embedded target I had a deeper look into entropy generation for that device and stumbled over the in kernel 'jitterentropy_rng' module. As far as I understood it's supposed to do the same as the well known 'haveged' or the userspace da