[PATCH 1/2] dt-bindings: crypto: update ccree optional params

2020-09-16 Thread Gilad Ben-Yossef
Document ccree driver supporting new optional parameters allowing to customize the DMA transactions cache parameters and ACE bus sharability properties. Signed-off-by: Gilad Ben-Yossef --- Documentation/devicetree/bindings/crypto/arm-cryptocell.txt | 4 1 file changed, 4 insertions(+) diff

[PATCH 0/2] add optional cache params from DT

2020-09-16 Thread Gilad Ben-Yossef
Rework the setting of AXI bus cache parameters, including optionally allowing setting them from device tree Gilad Ben-Yossef (2): dt-bindings: crypto: update ccree optional params crypto: ccree - add custom cache params from DT file .../bindings/crypto/arm-cryptocell.txt| 4 + drive

[PATCH 2/2] crypto: ccree - add custom cache params from DT file

2020-09-16 Thread Gilad Ben-Yossef
Add optinal ability to customize DMA transactions cache parameters and ACE bus sharability properties and set new defaults. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_driver.c | 89 ++-- drivers/crypto/ccree/cc_driver.h | 4 +- drivers/crypto/ccree/c

Re: [PATCH] crypto: arm/sha256-neon - avoid ADRL pseudo instruction

2020-09-16 Thread Stefan Agner
On 2020-09-15 23:31, Ard Biesheuvel wrote: > On Tue, 15 Sep 2020 at 21:50, Nick Desaulniers > wrote: >> >> On Tue, Sep 15, 2020 at 2:46 AM Ard Biesheuvel wrote: >> > >> > The ADRL pseudo instruction is not an architectural construct, but a >> > convenience macro that was supported by the ARM pro

Re: [PATCH 3/9] lib: zstd: Upgrade to latest upstream zstd version 1.4.6

2020-09-16 Thread kernel test robot
tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Nick-Terrell/Update-to-zstd-1-4-6/20200916-114901 base: https://git.kernel.org/pub/scm/linux/

Re: [PATCH v6 7/8] X.509: support OSCCA sm2-with-sm3 certificate verification

2020-09-16 Thread Gilad Ben-Yossef
On Mon, Sep 14, 2020 at 9:34 AM Tianjia Zhang wrote: > > Hi Gilad, > > On 9/13/20 3:12 PM, Gilad Ben-Yossef wrote: > > Hi, > > > > > > On Thu, Sep 3, 2020 at 4:13 PM Tianjia Zhang > > wrote: > >> > >> The digital certificate format based on SM2 crypto algorithm as > >> specified in GM/T 0015-2012

Re: [PATCH 1/9] lib: zstd: Add zstd compatibility wrapper

2020-09-16 Thread Christoph Hellwig
On Tue, Sep 15, 2020 at 08:42:54PM -0700, Nick Terrell wrote: > From: Nick Terrell > > Adds zstd_compat.h which provides the necessary functions from the > current zstd.h API. It is only active for zstd versions 1.4.6 and newer. > That means it is disabled currently, but will become active when a

Re: [PATCH 4/9] crypto: zstd: Switch to zstd-1.4.6 API

2020-09-16 Thread Christoph Hellwig
> + const size_t wksp_size = ZSTD_estimateCCtxSize(ZSTD_DEF_LEVEL); > + > + if (ZSTD_isError(wksp_size)) { > + ret = -EINVAL; > + goto out_free; > + } Pleas switch to properly named functions when you touch this. The API names here look like a cat threw up on t

Re: [PATCH 5/9] btrfs: zstd: Switch to the zstd-1.4.6 API

2020-09-16 Thread Christoph Hellwig
On Tue, Sep 15, 2020 at 08:42:59PM -0700, Nick Terrell wrote: > From: Nick Terrell > > Move away from the compatibility wrapper to the zstd-1.4.6 API. This > code is functionally equivalent. Again, please use sensible names And no one gives a fuck if this bad API is "zstd-1.4.6" as the Linux ke

Re: [PATCH] crypto: inside-secure - Prevent missing of processing errors

2020-09-16 Thread Antoine Tenart
Hi Pascal, Quoting Pascal van Leeuwen (2020-09-08 08:10:45) > On systems with coherence issues, packet processed could succeed while > it should have failed, e.g. because of an authentication fail. > This is because the driver would read stale status information that had > all error bits initialis

Re: [PATCH v2 4/4] crypto: allwinner/sun8i - Simplify with dev_err_probe()

2020-09-16 Thread Corentin Labbe
On Thu, Sep 10, 2020 at 09:29:19PM +0200, Krzysztof Kozlowski wrote: > Common pattern of handling deferred probe can be simplified with > dev_err_probe(). Less code and the error value gets printed. > > Signed-off-by: Krzysztof Kozlowski > > --- > > Changes since v1: > 1. None > --- > drivers

Re: [PATCH] crypto: inside-secure - Add support for EIP197 with output classifier

2020-09-16 Thread Antoine Tenart
Hello Pascal, Quoting Pascal van Leeuwen (2020-09-11 09:46:39) > This patch adds support for EIP197 instances that include the output > classifier (OCE) option, as used by one of our biggest customers. > The OCE normally requires initialization and dedicated firmware, but > for the simple operatio

Re: [PATCH] crypto: arm/sha256-neon - avoid ADRL pseudo instruction

2020-09-16 Thread Ard Biesheuvel
On Wed, 16 Sep 2020 at 10:45, Stefan Agner wrote: > > On 2020-09-15 23:31, Ard Biesheuvel wrote: > > On Tue, 15 Sep 2020 at 21:50, Nick Desaulniers > > wrote: > >> > >> On Tue, Sep 15, 2020 at 2:46 AM Ard Biesheuvel wrote: > >> > > >> > The ADRL pseudo instruction is not an architectural constr

[PATCH 3/3] crypto: arm/aes-neonbs - use typed init/exit routines for XTS

2020-09-16 Thread Ard Biesheuvel
Use the typed skcipher init/exit routines instead of the generic cra_init/_exit routines when instantiating/releasing the XTS skciphers. Signed-off-by: Ard Biesheuvel --- arch/arm/crypto/aes-neonbs-glue.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/c

Re: [PATCH 5/9] btrfs: zstd: Switch to the zstd-1.4.6 API

2020-09-16 Thread Chris Mason
On 16 Sep 2020, at 10:46, Christoph Hellwig wrote: On Wed, Sep 16, 2020 at 10:43:04AM -0400, Chris Mason wrote: Otherwise we just end up with drift and kernel-specific bugs that are harder to debug. To the extent those APIs make us contort the kernel code, I???m sure Nick is interested in im

Re: [PATCH 5/9] btrfs: zstd: Switch to the zstd-1.4.6 API

2020-09-16 Thread Chris Mason
On 16 Sep 2020, at 10:30, Christoph Hellwig wrote: On Wed, Sep 16, 2020 at 10:20:52AM -0400, Chris Mason wrote: It???s not completely clear what you???re asking for here. If the API matches what???s in zstd-1.4.6, that seems like a reasonable way to label it. That???s what the upstream is f

[PATCH 0/3] crypto: arm/aes-neonbs - some polish

2020-09-16 Thread Ard Biesheuvel
Some polish for the ARM bit-sliced NEON implementation. No functional or performance changes anticipated. Ard Biesheuvel (3): crypto: arm/aes-neonbs - avoid hacks to prevent Thumb2 mode switches crypto: arm/aes-neonbs - avoid loading reorder argument on encryption crypto: arm/aes-neonbs - us

Re: [PATCH v4] certs: Add EFI_CERT_X509_GUID support for dbx entries

2020-09-16 Thread Jarkko Sakkinen
On Tue, Sep 15, 2020 at 08:49:27PM -0400, Eric Snowberg wrote: > The Secure Boot Forbidden Signature Database, dbx, contains a list of now > revoked signatures and keys previously approved to boot with UEFI Secure > Boot enabled. The dbx is capable of containing any number of > EFI_CERT_X509_SHA25

Re: [PATCH 5/9] btrfs: zstd: Switch to the zstd-1.4.6 API

2020-09-16 Thread Eric Biggers
On Wed, Sep 16, 2020 at 03:46:18PM +0100, Christoph Hellwig wrote: > On Wed, Sep 16, 2020 at 10:43:04AM -0400, Chris Mason wrote: > > Otherwise we just end up with drift and kernel-specific bugs that are harder > > to debug. To the extent those APIs make us contort the kernel code, I???m > > sure

Re: [PATCH 5/9] btrfs: zstd: Switch to the zstd-1.4.6 API

2020-09-16 Thread Christoph Hellwig
On Wed, Sep 16, 2020 at 10:20:52AM -0400, Chris Mason wrote: > It???s not completely clear what you???re asking for here. If the API > matches what???s in zstd-1.4.6, that seems like a reasonable way to label > it. That???s what the upstream is for this code. > > I???m also not sure why we???re

[PATCH 1/3] crypto: arm/aes-neonbs - avoid hacks to prevent Thumb2 mode switches

2020-09-16 Thread Ard Biesheuvel
Instead of using a homegrown macrofied version of the adr instruction that sets the Thumb bit in the output value, only to ensure that any bx instructions consuming that value will not switch out of Thumb mode when branching, use non-interworking mov (to PC) instructions, which achieve the same thi

[PATCH 2/3] crypto: arm/aes-neonbs - avoid loading reorder argument on encryption

2020-09-16 Thread Ard Biesheuvel
Reordering the tweak is never necessary for encryption, so avoid the argument load on the encryption path. Signed-off-by: Ard Biesheuvel --- arch/arm/crypto/aes-neonbs-core.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/crypto/aes-neonbs-core.S b/arch/arm/cr

Re: [PATCH] random: remove dead code left over from blocking pool

2020-09-16 Thread Andy Lutomirski
On Tue, Sep 15, 2020 at 9:38 PM Eric Biggers wrote:> > From: Eric Biggers > > Remove some dead code that was left over following commit 90ea1c6436d2 > ("random: remove the blocking pool"). > Looks good to me. Reviewed-by: Andy Lutomirski

Re: [PATCH 5/9] btrfs: zstd: Switch to the zstd-1.4.6 API

2020-09-16 Thread Christoph Hellwig
On Wed, Sep 16, 2020 at 10:43:04AM -0400, Chris Mason wrote: > Otherwise we just end up with drift and kernel-specific bugs that are harder > to debug. To the extent those APIs make us contort the kernel code, I???m > sure Nick is interested in improving things in both places. Seriously, we do no

Re: [PATCH 3/9] lib: zstd: Upgrade to latest upstream zstd version 1.4.6

2020-09-16 Thread Nick Terrell
> On Sep 15, 2020, at 8:42 PM, Nick Terrell wrote: > > From: Nick Terrell > > Upgrade to the latest upstream zstd version 1.4.6. > > This patch is 100% generated from upstream zstd commit c4763f087c2b [0]. > > This patch is very large because it is transitioning from the custom > kernel zstd

Re: [PATCH 5/9] btrfs: zstd: Switch to the zstd-1.4.6 API

2020-09-16 Thread Chris Mason
On 16 Sep 2020, at 4:49, Christoph Hellwig wrote: On Tue, Sep 15, 2020 at 08:42:59PM -0700, Nick Terrell wrote: From: Nick Terrell Move away from the compatibility wrapper to the zstd-1.4.6 API. This code is functionally equivalent. Again, please use sensible names And no one gives a fuck

[PATCH] random: use correct memory barriers for crng_node_pool

2020-09-16 Thread Eric Biggers
From: Eric Biggers When a CPU selects which CRNG to use, it accesses crng_node_pool without a memory barrier. That's wrong, because crng_node_pool can be set by another CPU concurrently. Without a memory barrier, the crng_state that is used might not appear to be fully initialized. There's an

Re: [PATCH 5/9] btrfs: zstd: Switch to the zstd-1.4.6 API

2020-09-16 Thread Rik van Riel
On Wed, 2020-09-16 at 15:18 -0400, Nick Terrell wrote: > The zstd version in the kernel works fine. But, you can see that the > version > that got imported stagnated where upstream had 14 released versions. > I > don't think it makes sense to have kernel developers maintain their > own copy > of z

Re: [PATCH v2 0/2] crypto: arm/sha-neon - avoid ADRL instructions

2020-09-16 Thread Ard Biesheuvel
On Thu, 17 Sep 2020 at 03:53, Nick Desaulniers wrote: > > On Tue, Sep 15, 2020 at 11:14 PM Ard Biesheuvel wrote: > > > > Remove some occurrences of ADRL in the SHA NEON code adopted from the > > OpenSSL project. > > > > I will leave it to the Clang folks to decide whether this needs to be > > bac