Re: [GIT PULL] keys: Collected minor fixes and cleanups

2020-12-14 Thread Jarkko Sakkinen
On Mon, Dec 14, 2020 at 12:49:27PM -0800, Linus Torvalds wrote: > The pain just isn't worth it, but more importantly, you simply need to > get your workflow in order, and not send me completely untested > garbage that hasn't even been compiled. I have now more bandwidth. It was mostly eaten by SGX

Re: [PATCH] crypto: x86/crc32c-intel - Don't match some Zhaoxin CPUs

2020-12-14 Thread Tony W Wang-oc
On 15/12/2020 04:41, Eric Biggers wrote: > On Mon, Dec 14, 2020 at 10:28:19AM +0800, Tony W Wang-oc wrote: >> On 12/12/2020 01:43, Eric Biggers wrote: >>> On Fri, Dec 11, 2020 at 07:29:04PM +0800, Tony W Wang-oc wrote: The driver crc32c-intel match CPUs supporting X86_FEATURE_XMM4_2. On

linux-next: build failure after merge of the ceph tree

2020-12-14 Thread Stephen Rothwell
Hi all, After merging the ceph tree, today's linux-next build (x86_64 allmodconfig) failed like this: net/ceph/messenger_v2.c:13:10: fatal error: crypto/sha.h: No such file or directory 13 | #include | ^~ Caused by commit cd1a677cad99 ("libceph, ceph: implement

Re: [GIT PULL] keys: Collected minor fixes and cleanups

2020-12-14 Thread Stephen Rothwell
Hi Linus, On Mon, 14 Dec 2020 13:05:51 -0800 Linus Torvalds wrote: > > On Mon, Dec 14, 2020 at 12:49 PM Linus Torvalds > wrote: > > > > I suspect the fix is trivial (change the "," to "|"), but I will not > > be pulling this - or anything else that hasn't been in linux-next - > > from you this

[PATCH] hwrng: fix khwrng lifecycle

2020-12-14 Thread Luca Dariz
There are two issues with the management of the kernel thread to gather entropy: * it can terminate also if the rng is removed, and in this case it doesn't synchronize with kthread_should_stop(), but it directly sets hwrng_fill to NULL. If this happens after the NULL check but before kthread_st

Re: [GIT PULL] keys: Collected minor fixes and cleanups

2020-12-14 Thread Linus Torvalds
On Mon, Dec 14, 2020 at 12:49 PM Linus Torvalds wrote: > > I suspect the fix is trivial (change the "," to "|"), but I will not > be pulling this - or anything else that hasn't been in linux-next - > from you this merge window. It looks like Stephen Rothwell saw it in next yesterday, and fixed it

Re: [GIT PULL] Crypto Update for 5.11

2020-12-14 Thread pr-tracker-bot
The pull request you sent on Mon, 14 Dec 2020 16:55:16 +1100: > git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/9e4b0d55d84a66dbfede56890501dc96e696059c Thank you! -- Deet-doot-dot, I am a bot. ht

Re: [GIT PULL] keys: Collected minor fixes and cleanups

2020-12-14 Thread Linus Torvalds
On Mon, Dec 14, 2020 at 2:04 AM David Howells wrote: > > Here's a set of minor fixes/cleanups that I've collected from various > people for the next merge window. This doesn't even build. And no, that's not because of some merge error on my part. Just to verify, I tried to build the head of what

Re: [PATCH] crypto: x86/crc32c-intel - Don't match some Zhaoxin CPUs

2020-12-14 Thread Eric Biggers
On Mon, Dec 14, 2020 at 10:28:19AM +0800, Tony W Wang-oc wrote: > On 12/12/2020 01:43, Eric Biggers wrote: > > On Fri, Dec 11, 2020 at 07:29:04PM +0800, Tony W Wang-oc wrote: > >> The driver crc32c-intel match CPUs supporting X86_FEATURE_XMM4_2. > >> On platforms with Zhaoxin CPUs supporting this X

Re: [PATCH v2] crypto: arm/chacha-neon - add missing counter increment

2020-12-14 Thread Eric Biggers
On Mon, Dec 14, 2020 at 01:25:20PM +1100, Herbert Xu wrote: > On Sun, Dec 13, 2020 at 06:23:06PM -0800, Eric Biggers wrote: > > > > This part doesn't seem to be true, since the chacha implementations don't > > implement the "output IV" thing. It's only cbc and ctr that do (or at least > > those ar

[PATCH v4 4/8] crypto: sun4i-ss: handle BigEndian for cipher

2020-12-14 Thread Corentin Labbe
Ciphers produce invalid results on BE. Key and IV need to be written in LE. Fixes: 6298e948215f2 ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator") Cc: Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 12 ++-- 1 file changed,

[PATCH v4 3/8] crypto: sun4i-ss: IV register does not work on A10 and A13

2020-12-14 Thread Corentin Labbe
Allwinner A10 and A13 SoC have a version of the SS which produce invalid IV in IVx register. Instead of adding a variant for those, let's convert SS to produce IV directly from data. Fixes: 6298e948215f2 ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator") Cc: Signed-off-by: C

[PATCH v4 7/8] crypto: sun4i-ss: enabled stats via debugfs

2020-12-14 Thread Corentin Labbe
This patch enable to access usage stats for each algorithm. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 9 .../allwinner/sun4i-ss/sun4i-ss-cipher.c | 20 +++ .../crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 52 +++ .../crypto/al

[PATCH v4 8/8] crypto: sun4i-ss: add SPDX header and remove blank lines

2020-12-14 Thread Corentin Labbe
This patchs fixes some remaining style issue. Signed-off-by: Corentin Labbe Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 3 --- drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dri

[PATCH v4 6/8] crypto: sun4i-ss: fix kmap usage

2020-12-14 Thread Corentin Labbe
With the recent kmap change, some tests which were conditional on CONFIG_DEBUG_HIGHMEM now are enabled by default. This permit to detect a problem in sun4i-ss usage of kmap. sun4i-ss uses two kmap via sg_miter (one for input, one for output), but using two kmap at the same time is hard: "the order

[PATCH v4 5/8] crypto: sun4i-ss: initialize need_fallback

2020-12-14 Thread Corentin Labbe
The need_fallback is never initialized and seem to be always true at runtime. So all hardware operations are always bypassed. Fixes: 0ae1f46c55f87 ("crypto: sun4i-ss - fallback when length is not multiple of blocksize") Cc: Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun4i-ss/su

[PATCH v4 2/8] crypto: sun4i-ss: checking sg length is not sufficient

2020-12-14 Thread Corentin Labbe
The optimized cipher function need length multiple of 4 bytes. But it get sometimes odd length. This is due to SG data could be stored with an offset. So the fix is to check also if the offset is aligned with 4 bytes. Fixes: 6298e948215f2 ("crypto: sunxi-ss - Add Allwinner Security System crypto

[PATCH v4 0/8] crypto: sun4i-ss: prevent always fallback for ciphers

2020-12-14 Thread Corentin Labbe
Hello For help testing on "crypto: sun4i-ss - Fix sparse endianness markers", I have added "stats" support like other allwinner's crypto drivers. Seeing stats showed a clear problem, the ciphers function were not used at all. This is due to the not-inialized need_fallback which is "init" as true e

[PATCH v4 1/8] crypto: sun4i-ss: linearize buffers content must be kept

2020-12-14 Thread Corentin Labbe
When running the non-optimized cipher function, SS produce partial random output. This is due to linearize buffers being reseted after each loop. For preserving stack, instead of moving them back to start of function, I move them in sun4i_ss_ctx. Fixes: 8d3bcb9900ca ("crypto: sun4i-ss - reduce st

Re: [PATCH v3 2/3] crypto: keembay: Add Keem Bay OCS HCU driver

2020-12-14 Thread Daniele Alessandrelli
Hi Mark, Thanks for the review. On Thu, 2020-11-19 at 15:15 -0800, mark gross wrote: > I don't know the crypto domain well but. > > my main feedback is: > > * can we remove the sha224 config option and just have it enabled? Having SHA224 optional (and disabled by default) was a request from In

CAAM RNG trouble

2020-12-14 Thread Lucas Stach
Hi all, I've been looking into a CAAM RNG issue for a while, where I could need some input from people knowing the CAAM hardware better than I do. Basically the issue is that on some i.MX6 units the RNG functionality sometimes fails with this error: caam_jr 2101000.jr0: 20003c5b: CCB: desc idx 60:

Re: [PATCH 1/2] hwrng: iproc-rng200: Fix disable of the block.

2020-12-14 Thread Florian Fainelli
On 12/14/20 8:04 AM, matthias@kernel.org wrote: > From: Matthias Brugger > > When trying to disable the block we bitwise or the control > register with value zero. This will leave the block always turned on. > Fix this by setting the corresponding bit to zero. > > Fixes: c83d45d5685f ("hwrng

Re: [PATCH 2/2] hwrng: iproc-rng200: Move enable/disable in separate function

2020-12-14 Thread Scott Branden
On 2020-12-14 8:04 a.m., matthias@kernel.org wrote: > From: Matthias Brugger > > We are calling the same code for enable and disable the block in various > parts of the driver. Put that code into a new function to reduce code > duplication. Patch needs to be regenerated after most of PATCH

Re: [PATCH 2/2] hwrng: iproc-rng200: Move enable/disable in separate function

2020-12-14 Thread Florian Fainelli
On 12/14/20 8:04 AM, matthias@kernel.org wrote: > From: Matthias Brugger > > We are calling the same code for enable and disable the block in various > parts of the driver. Put that code into a new function to reduce code > duplication. > > Signed-off-by: Matthias Brugger > > --- > > dri

Re: [PATCH 1/2] hwrng: iproc-rng200: Fix disable of the block.

2020-12-14 Thread Scott Branden
On 2020-12-14 8:04 a.m., matthias@kernel.org wrote: > From: Matthias Brugger > > When trying to disable the block we bitwise or the control > register with value zero. This will leave the block always turned on. > Fix this by setting the corresponding bit to zero. > > Fixes: c83d45d5685f ("

Re: [RESEND 04/19] crypto: caam: convert tasklets to use new tasklet_setup() API

2020-12-14 Thread Horia Geantă
On 12/7/2020 11:00 AM, Allen Pais wrote: > From: Allen Pais > > In preparation for unconditionally passing the > struct tasklet_struct pointer to all tasklet > callbacks, switch to using the new tasklet_setup() > and from_tasklet() to pass the tasklet pointer explicitly. > > Signed-off-by: Romai

[PATCH 1/2] hwrng: iproc-rng200: Fix disable of the block.

2020-12-14 Thread matthias . bgg
From: Matthias Brugger When trying to disable the block we bitwise or the control register with value zero. This will leave the block always turned on. Fix this by setting the corresponding bit to zero. Fixes: c83d45d5685f ("hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver") Signed-off-by: Ma

[PATCH 2/2] hwrng: iproc-rng200: Move enable/disable in separate function

2020-12-14 Thread matthias . bgg
From: Matthias Brugger We are calling the same code for enable and disable the block in various parts of the driver. Put that code into a new function to reduce code duplication. Signed-off-by: Matthias Brugger --- drivers/char/hw_random/iproc-rng200.c | 37 --- 1 fil

Re: [PATCH 4/4] dt-bindings: Remove PicoXcell bindings

2020-12-14 Thread Rob Herring
On Thu, 10 Dec 2020 14:03:15 -0600, Rob Herring wrote: > PicoXcell has had nothing but treewide cleanups for at least the last 8 > years and no signs of activity. The most recent activity is a yocto vendor > kernel based on v3.0 in 2015. > > Cc: Jamie Iles > Cc: linux-crypto@vger.kernel.org > Sig

[PATCH] crypto: inside-secure - fix platform_get_irq.cocci warnings

2020-12-14 Thread Tian Tao
Remove dev_err() messages after platform_get_irq*() failures. drivers/crypto/inside-secure/safexcel.c: line 1161 is redundant because platform_get_irq() already prints an error Generated by: scripts/coccinelle/api/platform_get_irq.cocci Signed-off-by: Tian Tao --- drivers/crypto/inside-secure/s

[GIT PULL] keys: Collected minor fixes and cleanups

2020-12-14 Thread David Howells
:17:37 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags/keys-fixes-20201214 for you to fetch changes up to 1b91ea77dfeb2c5924ab940f2e43177c78a37d8f: certs: Replace K{U,G}IDT_INIT() wi