[see patch]. I would like to move the
trng into the crypto-ppc4xx, but given that this breaks some of the DTS
out there I'm not sure.
Regards,
Christian
---
>From 2159e200fcb68f88a94b1d5570d6000c100133a8 Mon Sep 17 00:00:00 2001
From: Christian Lamparter
Date: Fri, 25 Mar 2016 19:00:05
On Tuesday, April 05, 2016 08:11:19 PM Herbert Xu wrote:
> Christian Lamparter wrote:
> >
> > The crash is caused by a bad read in ppc4xx_rng_enable [0]. From what I
> > can tell, the driver is mapping the crypto control registers. The
> > problem is that they are
On Monday, April 18, 2016 05:59:39 PM Herbert Xu wrote:
> Christian Lamparter wrote:
> >
> > I tried to move ppc4xx-rng into crypto4xx (see attachment - patch #1).
> > The driver works as is. But I can't come up with a way to attach the
> > crypto4xx driver t
class specifier
extern."
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.h | 48 ++--
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/drivers/crypto/amcc/crypto4xx_core.h
b/drivers/crypto/amcc/crypto4xx_core.
This patch removes several unused code and definitons
(structs, variables, ...).
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_alg.c | 6 --
drivers/crypto/amcc/crypto4xx_core.c | 2 +-
drivers/crypto/amcc/crypto4xx_core.h | 16
3 files changed, 1
alg entries are only added to the list, after the registration
was successful. If the registration failed, it was never added
to the list in the first place.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions
If one of the later memory allocations in rypto4xx_build_pdr()
fails: dev->pdr (and/or) dev->pdr_uinfo wouldn't be freed.
crypto4xx_build_sdr() has the same issue with dev->sdr.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.c | 17 +
crypto4xx_put_pd_to_pdr() already clears the flag.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/crypto/amcc/crypto4xx_core.c
b/drivers/crypto/amcc/crypto4xx_core.c
index 249d35ff3806..9e96af725b31 100644
The crypto engine supports more than just aes-cbc. This patch
enables the remaining AES block cipher modes that pass the
testmanager's test vectors.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_alg.c | 66
drivers/crypto/amcc/crypto4xx_c
d-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.c | 126 +--
1 file changed, 30 insertions(+), 96 deletions(-)
diff --git a/drivers/crypto/amcc/crypto4xx_core.c
b/drivers/crypto/amcc/crypto4xx_core.c
index 3c086cf7b052..f3f151820373 100644
This patch improves the readability of various functions,
by replacing various void* pointers declarations with
their respective structs *. This makes it possible to go
for the eye-friendly array-indexing methods.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_alg.c | 26
dynamic_sa_contents union, instead of the crypto4xx_ctx.
* rename get_dynamic_sa_offset_key_field to get_dynamic_sa_key_field.
It returns the pointer to the key directly.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/Makefile | 2 +-
drivers/crypto/amcc/crypto4xx_alg.c
The security offload function is performed by a cryptographic
engine core attached to the 128-bit PLB (processor local bus)
with builtin DMA and interrupt controllers. This, I think,
satisfies the requirement for the CRYPTO_ALG_KERN_DRIVER_ONLY
flag.
Signed-off-by: Christian Lamparter
scatter_buffer_size is always set to PPC4XX_SD_BUFFER_SIZE.
I don't think there's any point in keeping the variable
around.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.c | 7 +++
drivers/crypto/amcc/crypto4xx_core.h | 1 -
2 files changed, 3 insert
The driver had a union dynamic_sa_contents in place that
described the meaning of the bits in the sa_contents
variable.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_alg.c | 4 ++--
drivers/crypto/amcc/crypto4xx_sa.c | 12 ++--
drivers/crypto/amcc/crypto4xx_sa.h
ned-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.c| 87 +
drivers/crypto/amcc/crypto4xx_core.h| 4 ++
drivers/crypto/amcc/crypto4xx_reg_def.h | 1 +
3 files changed, 92 insertions(+)
diff --git a/drivers/crypto/amcc/crypto4xx_core.c
b/driv
ain).
- don't load any bogus hash when we don't use any hash
operation to begin with.
Cc: sta...@vger.kernel.org
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_alg.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/crypt
using_sd is used as a stand-in for sa_command_0.bf.scatter
that we need to set anyway, so we might as well just prevent
double-accounting.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.c | 6 ++
drivers/crypto/amcc/crypto4xx_core.h | 1 -
2 files changed, 2
This replaces struct crypto_skcipher and the extra request size
with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(),
which uses a fixed stack size.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_alg.c | 12 ++--
drivers/crypto/amcc
o kills redundant pd_uinfo->num_gd
and pd_uinfo->num_sd setters since the value has already been
set before.
Cc: sta...@vger.kernel.org
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.c | 31 +++-
1 file changed, 21 insertions(+), 10 deletio
On 4/22/19, Sasha Levin wrote:
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a -stable tag.
> The stable tag indicates that it's relevant for the following trees: all
>
> The bot has tested the following trees: v5.0.9, v4.19.36, v4.14.113,
> v4.9.170
On 4/22/19, Sasha Levin wrote:
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a -stable tag.
> The stable tag indicates that it's relevant for the following trees: all
>
> The bot has tested the following trees: v5.0.9, v4.19.36, v4.14.113,
> v4.9.170
g
Fixes: 98e87e3d933b ("crypto: crypto4xx - add aes-ctr support")
Fixes: f2a13e7cba9e ("crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB
offloads")
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.c | 4 ++--
1 file changed, 2 insertions(+)
) doesn't match generic impl (1)
skcipher: blocksize for cfb-aes-ppc4xx (16) doesn't match generic impl (1)
Cc: Eric Biggers
Cc: sta...@vger.kernel.org
Fixes: f2a13e7cba9e ("crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB
offloads")
Signed-off-by: Christian Lamparter
---
;random: len=1011 klen=32"; expected_error=-22, cfg="random:
may_sleep use_digest src_divs=[100.0%@alignmask+20]
dst_divs=[3.12%@+3001, 96.88%@+4070]"
Cc: Eric Biggers
Cc: sta...@vger.kernel.org [4.19, 5.0 and 5.1]
Signed-off-by: Christian Lamparter
---
Note: This bug was pres
This patch adds early check to test the given data length
is aligned with the supported ciphers blocksize, or abort
with -EINVAL in case the supplied chunk size does not fit
without padding into the blocksize for block ciphers.
Signed-off-by: Christian Lamparter
---
This will also work instead
://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e9a60ab1609a7d975922adad1bf9c46ac6954584
>
> I do not have hardware to test if it is really working.
I have a few APM821XX. But please note drivers without
commit b66c685a482117d4e9ee987d252ca673689a5302
Author: Christia
CTL_HASH_FINAL : 0);
pd->pd_ctl_len.w = 0x0040 | (assoclen + datalen);
pd_uinfo->state = PD_ENTRY_INUSE | (is_busy ? PD_ENTRY_BUSY : 0);
---
I'm mostly curious if clang will warn about it too.
That said:
Reviewed-by: Christian Lamparter
Cheers,
Christian
Fixes: 4b5b79
On 2020-08-19 00:27, Herbert Xu wrote:
On Wed, Aug 19, 2020 at 08:15:50AM +1000, Herbert Xu wrote:
On Tue, Aug 18, 2020 at 07:17:35AM -0700, Ben Greear wrote:
Is there any easy way to use your work to make shash fast for aesni? I
basically just want it to perform as well as it used to with my
This patch adds aes-gcm support to crypto4xx.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_alg.c | 139 +++
drivers/crypto/amcc/crypto4xx_core.c | 22 ++
drivers/crypto/amcc/crypto4xx_core.h | 4 +
3 files changed, 165 insertions
dropped to 0 Kbits/s. This is because
dm-crypt's callback would instantly queue the next request.
In order to not starve ipsec, the driver reserves a small
portion of the available crypto contexts for this purpose.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto
The hmac_mc parameter of set_dynamic_sa_command_1()
was defined but not used. On closer inspection it
turns out, it was never wired up.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_alg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/amcc
Thanks to the big overhaul of crypto4xx_build_pd(), the request-local
sa_in, sa_out and state_record allocation can be simplified.
There's no need to setup any dma coherent memory anymore and
much of the support code can be removed.
Signed-off-by: Christian Lamparter
---
drivers/crypto
nsafe sa handling.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_alg.c | 87 +++-
drivers/crypto/amcc/crypto4xx_core.c | 128 ---
drivers/crypto/amcc/crypto4xx_core.h | 12 ++--
3 files changed, 103 insertions(+), 124 d
This patch adds aes-ccm support.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_alg.c | 185 +++
drivers/crypto/amcc/crypto4xx_core.c | 23 +
drivers/crypto/amcc/crypto4xx_core.h | 8 ++
3 files changed, 216 insertions(+)
diff --git
This patch enhances existing interfaces and
functions to support AEAD ciphers in the next
patches.
Signed-off-by: Christian Lamparter
---
drivers/crypto/Kconfig | 4 +
drivers/crypto/amcc/crypto4xx_alg.c | 19 +--
drivers/crypto/amcc/crypto4xx_core.c | 217
xx_return_pd'
was not declared. Should it be static?
crypto4xx_return_pd() is not used by anything. Therefore it is removed.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.c | 16 +++-
1 file changed, 3 insertions(+), 13 deletions(-)
di
state record struct though.
The hashes produced by GHASH and CBC (for CCM) will be in LE32.
Whereas md5 and sha{1/,256,...} do not need any conversion.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_alg.c | 4 +--
drivers/crypto/amcc/crypto4xx_core.c
This patch fixes a type mismatch error that I accidentally
introduced when I moved and refactored the dynamic_contents
helpers.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_sa.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/amcc
than a day without suffering any stalls under the continuous
load.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.c| 33 ++---
drivers/crypto/amcc/crypto4xx_reg_def.h | 3 +++
2 files changed, 21 insertions(+), 15 deletions(-)
diff
PPC4XX_LAST_PD
can be easily calculated from their respective PPC4XX_NUM_*
constant.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.h | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/amcc/crypto4xx_core.h
b/drivers/crypto/amcc
: crypto4xx
priority : 300
refcnt : 1
selftest : passed
internal : no
type : ablkcipher
async: yes
blocksize: 16
min keysize : 16
max keysize : 32
ivsize : 16
geniv:
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.c | 2
This patch adds support for the crypto4xx RevB cores
found in the 460EX, 460SX and later cores (like the APM821xx).
Without this patch, the crypto4xx driver will not be
able to process any offloaded requests and simply hang
indefinitely.
Signed-off-by: Christian Lamparter
---
drivers/crypto
can be avoided.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.c | 21 +
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/drivers/crypto/amcc/crypto4xx_core.c
b/drivers/crypto/amcc/crypto4xx_core.c
index c44954e274bc..50d5e64fbd
crypto4xx_device's name variable is not set to anything.
The common devname for request_irq seems to be the module
name. This will fix the seemingly anonymous interrupt
entry in /proc/interrupts for crypto4xx.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.
KBUILD_MODNAME provides the same value.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_core.c | 2 +-
drivers/crypto/amcc/crypto4xx_core.h | 2 --
drivers/crypto/amcc/crypto4xx_trng.c | 2 +-
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto
: ccm(aes)
|driver : ccm-aes-ppc4xx
|module : crypto4xx
|priority : 300
|refcnt : 1
|selftest : passed
|internal : no
|type : aead
|async: yes
|blocksize: 1
|ivsize : 16
|maxauthsize : 16
|geniv:
Signed-off-by: Christian
;s request context.
Fixes: a0aae821ba3d3 ("crypto: crypto4xx - prepare for AEAD support")
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_alg.c | 15 ---
drivers/crypto/amcc/crypto4xx_core.c | 10 +-
drivers/crypto/amcc/crypto4xx_core.h | 7 ++-
it is part of the cryptlen. Otherwise the hardware
will think it has been misconfigured and will return:
aead return err status = 0x98
For rtc4543(gcm(aes)), the hardware has a dedicated GMAC
mode as part of the hash function set.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc
The ablkcipher APIs have been effectively deprecated since [1].
This patch converts the crypto4xx driver to the new skcipher APIs.
[1] <https://www.spinics.net/lists/linux-crypto/msg18133.html>
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_alg.c | 60 ---
d
This patch provides a cheap 2MiB/s+ (~ 6%) performance
improvement over the current code. This is because the
compiler can now optimize several endian swap memcpy.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc/crypto4xx_alg.c | 32 +---
drivers/crypto/amcc
.
The aead's crypto4xx_setup_fallback() function is renamed to
crypto4xx_aead_setup_fallback.
Signed-off-by: Christian Lamparter
---
drivers/crypto/Kconfig | 1 +
drivers/crypto/amcc/crypto4xx_alg.c | 91 ++--
drivers/crypto/amcc/crypto4xx_core.c
This patch fixes some of the -Wvla warnings.
crypto4xx_alg.c:83:19: warning: Variable length array is used.
crypto4xx_alg.c:273:56: warning: Variable length array is used.
crypto4xx_alg.c:380:32: warning: Variable length array is used.
Signed-off-by: Christian Lamparter
---
drivers/crypto/amcc
ver : cts(cbc-aes-ppc4xx)
module : cts
priority : 300
refcnt : 1
selftest : passed
internal : no
type : skcipher
async: yes
blocksize: 16
min keysize : 16
max keysize : 32
ivsize : 16
chunksize: 16
walksize : 16
Signed-off-by: Christian Lampar
On Samstag, 28. April 2018 10:25:51 CEST Herbert Xu wrote:
> Christian Lamparter wrote:
> > This patch provides a cheap 2MiB/s+ (~ 6%) performance
> > improvement over the current code. This is because the
> > compiler can now optimize several endian swap memcpy.
> >
&
55 matches
Mail list logo