On Thu, Jul 25, 2019 at 1:43 PM Corentin Labbe wrote:
>
> This patch adds documentation for Device-Tree bindings for the
> Amlogic GXL cryptographic offloader driver.
>
> Signed-off-by: Corentin Labbe
> ---
> .../bindings/crypto/amlogic-gxl-crypto.yaml | 45 +++
Follow the comp
Zdravstvujte! Vas interesuyut klientskie bazy dannyh?
With the removal of the ENODATA case from padata_get_next, the cpu_index
field is no longer useful, so it can go away.
Signed-off-by: Daniel Jordan
---
include/linux/padata.h | 2 --
kernel/padata.c| 13 ++---
2 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/inclu
Padata binds the parallel part of a job to a single CPU. Though the
serial parts rely on per-CPU queues, it's not necessary for the parallel
part, and it's beneficial to run the job locally on NUMA machines
and let the scheduler pick the CPU within a node on a busy system.
So, make the parallel w
padata_do_parallel currently returns -EINVAL if the callback CPU isn't
in the callback cpumask.
pcrypt tries to prevent this situation by keeping its own callback
cpumask in sync with padata's and checks that the callback CPU it passes
to padata is valid. Make padata handle this instead.
padata_
With pcrypt's cpumask no longer used, take the CPU hotplug lock inside
padata_alloc_possible.
Useful later in the series for avoiding nested acquisition of the CPU
hotplug lock in padata when padata_alloc_possible is allocating an
unbound workqueue.
Without this patch, this nested acquisition wou
Padata binds the parallel part of a job to a single CPU. Though the
serial parts rely on per-CPU queues for correct ordering, they're not
necessary for parallel work, and it improves performance to run the job
locally on NUMA machines and let the scheduler pick the CPU within a
node on a busy syst
Change the calling convention for apply_workqueue_attrs to require CPU
hotplug read exclusion.
Avoids lockdep complaints about nested calls to get_online_cpus in a
future patch where padata calls apply_workqueue_attrs when changing
other CPU-hotplug-sensitive data structures with the CPU read lock
Now that padata_do_parallel takes care of finding an alternate callback
CPU, there's no need for pcrypt's callback cpumask, so remove it and the
notifier callback that keeps it in sync.
Signed-off-by: Daniel Jordan
---
crypto/pcrypt.c | 125 +++-
1 fil
Move workqueue allocation inside of padata to prepare for further
changes to how padata uses workqueues.
Guarantees the workqueue is created with max_active=1, which padata
relies on to work correctly. No functional change.
Signed-off-by: Daniel Jordan
---
Documentation/padata.txt | 12 ++-
padata will use these these interfaces in a later patch, so unconfine them.
Signed-off-by: Daniel Jordan
---
include/linux/workqueue.h | 4
kernel/workqueue.c| 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/linux/workqueue.h b/include/linux/workqueu
padata currently uses one per-CPU workqueue per instance for all work.
Prepare for running parallel jobs on an unbound workqueue by introducing
dedicated workqueues for parallel and serial work.
Signed-off-by: Daniel Jordan
---
include/linux/padata.h | 6 --
kernel/padata.c| 28 +++
I will maintain the amlogic crypto driver.
Signed-off-by: Corentin Labbe
---
MAINTAINERS | 7 +++
1 file changed, 7 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 93d6cae3274d..48e7fd110688 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1450,6 +1450,13 @@ F: drivers/mmc/ho
Hello
This serie adds support for the crypto offloader present on amlogic GXL
SoCs.
Tested on meson-gxl-s905x-khadas-vim and meson-gxl-s905x-libretech-cc
Regards
Corentin Labbe (4):
dt-bindings: crypto: Add DT bindings documentation for amlogic-crypto
crypto: amlogic: Add crypto accelerator
This patch adds documentation for Device-Tree bindings for the
Amlogic GXL cryptographic offloader driver.
Signed-off-by: Corentin Labbe
---
.../bindings/crypto/amlogic-gxl-crypto.yaml | 45 +++
1 file changed, 45 insertions(+)
create mode 100644
Documentation/devicetree/bind
This patch adds support for the amlogic GXL cryptographic offloader present
on GXL SoCs.
This driver supports AES cipher in CBC/ECB mode.
Signed-off-by: Corentin Labbe
---
drivers/crypto/Kconfig | 2 +
drivers/crypto/Makefile | 1 +
drivers/crypto/amlogic/Kc
This patch adds the GXL crypto hardware node for all GXL SoCs.
Signed-off-by: Corentin Labbe
---
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 11 +++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
in
Would you rather this went through net or net-next?
David
On Thu, Jul 25, 2019 at 3:31 PM David Howells wrote:
>
> rxkad sometimes triggers a warning about oversized stack frames when
> building with clang for a 32-bit architecture:
>
> net/rxrpc/rxkad.c:243:12: error: stack frame size of 1088 bytes in function
> 'rxkad_secure_packet' [-Werror,-Wframe-l
Ard Biesheuvel wrote:
> Given that this part of the driver only uses synchronous crypto, and
> only using a hardcoded algo and mode [pcbc(fcrypt)], of which only a
> generic C implementation exists, may I suggest that we switch to a
> library based approach instead?
>
> That way, we can get rid
Hi!
On 25/07/2019 15:26, Giovanni Cabiddu wrote:
>> It seems that smp_processor_id() is only used for a best-effort
>> load-balancing, refer to qat_crypto_get_instance_node(). It's not feasible
>> to disable preemption for the duration of the crypto requests. Therefore,
>> just silence the warning
Hi!
On 25/07/2019 15:26, Giovanni Cabiddu wrote:
>> It seems that smp_processor_id() is only used for a best-effort
>> load-balancing, refer to qat_crypto_get_instance_node(). It's not feasible
>> to disable preemption for the duration of the crypto requests. Therefore,
>> just silence the warning
On Thu, 25 Jul 2019 at 16:31, David Howells wrote:
>
> rxkad sometimes triggers a warning about oversized stack frames when
> building with clang for a 32-bit architecture:
>
> net/rxrpc/rxkad.c:243:12: error: stack frame size of 1088 bytes in function
> 'rxkad_secure_packet' [-Werror,-Wframe-lar
Check assoclen to solve the extra tests that expect -EINVAL to be
returned when the associated data size is not valid.
Validated assoclen for RFC4106 and RFC4543 which expects an assoclen
of 16 or 20.
Based on seqiv, IPsec ESP and RFC4543/RFC4106 the assoclen is sizeof IP
Header (spi, seq_no, exte
Check zero-length input, for skcipher algorithm, to solve the extra
tests. This is a valid operation, therefore the API will return no error.
Signed-off-by: Iuliana Prodan
Reviewed-by: Horia Geanta
---
drivers/crypto/caam/caamalg.c | 6 ++
drivers/crypto/caam/caamalg_qi.c | 3 +++
driv
From: Horia Geantă
Modify drive to provide a valid errno (and not the HW error ID)
to the user, via completion callbacks.
A "valid errno" is currently not explicitly mentioned in the docs,
however the error code is expected to match the one returned by the
generic SW implementation.
Note: in mo
The series solves:
- the failures found with fuzz testing;
- resources clean-up on caampkc/caamrng exit path.
The first 10 patches solve the issues found with
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled.
They modify the drivers to provide a valid error (and not the hardware
error ID) to the user, vi
Check authsize to solve the extra tests that expect -EINVAL to be
returned when the authentication tag size is not valid.
Validated authsize for GCM, RFC4106 and RFC4543.
Signed-off-by: Iuliana Prodan
---
drivers/crypto/caam/caamalg.c | 13 +
drivers/crypto/caam/caamalg_qi.c |
From: Horia Geantă
Fuzz testing uncovered an issue when |user key| > |derived key|.
Derived key generation has to be fixed in two cases:
1. Era >= 6 (DKP is available)
DKP cannot be used with immediate input key if |user key| > |derived key|,
since the resulting descriptor (after DKP execution)
From: Horia Geantă
Update alginfo struct to keep both virtual and dma key addresses,
so that descriptors have them at hand.
One example where this is needed is in the xcbc(aes) shared descriptors,
which are updated in current patch.
Another example is the upcoming fix for DKP.
Signed-off-by: Hor
Commit 1b46c90c8e00 ("crypto: caam - convert top level drivers to libraries")
changed entry and exit points behavior for caamalg,
caamalg_qi, caamalg_qi2, caamhash, caampkc, caamrng.
For example, previously caam_pkc_init() and caam_pkc_exit() were
module entry/exit points. This means that if an er
Check key length to solve the extra tests that expect -EINVAL to be
returned when the key size is not valid.
Validated AES keylen for skcipher, ahash and aead.
Signed-off-by: Iuliana Prodan
---
Changes since v2:
- remove check for keylen < 4, since is included in check_aes_keylen;
- update commi
Check the return value of the hardware registration for caam_rng and free
resources in case of failure.
Fixes: e24f7c9 ("crypto: caam - hwrng support")
Signed-off-by: Iuliana Prodan
---
Changes since v2:
- update Fixes tag.
---
drivers/crypto/caam/caamrng.c | 5 -
1 file changed, 4 insertion
Update share descriptor for rfc4106 to skip instructions in case
cryptlen is zero. If no instructions are jumped the DECO hangs and a
timeout error is thrown.
Signed-off-by: Iuliana Prodan
---
Changes since v2:
- update shared descriptor with the erratum workaround.
---
drivers/crypto/caam/caama
To know if a registration succeeded added a new struct,
caam_akcipher_alg, that keeps, also, the registration status.
This status is updated in caam_pkc_init and verified in
caam_pkc_exit to unregister an algorithm.
Fixes: 1b46c90c8e00 ("crypto: caam - convert top level drivers to libraries")
Sign
From: Horia Geantă
skcipher encryption might fail and in some cases, like (invalid) input
length smaller then block size, updating the IV would lead to panic
due to copying from a negative offset (req->cryptlen - ivsize).
Signed-off-by: Horia Geantă
Signed-off-by: Iuliana Prodan
---
drivers/c
To be consistent with other CAAM modules, caamhash should return 0
instead of -ENODEV in case CAAM has no MDHA.
Based on commit 1b46c90c8e00 ("crypto: caam - convert top level drivers to
libraries")
the value returned by entry point is never checked and
the exit point is always executed.
Signed-
From: Horia Geantă
ERN handler calls the caam/qi frontend "done" callback with a status
of -EIO. This is incorrect, since the callback expects a status value
meaningful for the crypto engine - hence the cryptic messages
like the one below:
platform caam_qi: 15: unknown error source
Fix this by p
Based on seqiv, IPsec ESP and rfc4543/rfc4106 the assoclen can be 16 or
20 bytes.
>From esp4/esp6, assoclen is sizeof IP Header. This includes spi, seq_no
and extended seq_no, that is 8 or 12 bytes.
In seqiv, to asscolen is added the IV size (8 bytes).
Therefore, the assoclen, for rfc4543, should
Added inline helper functions to check authsize and assoclen for
gcm and rfc4106.
These are used in the generic implementation of gcm and rfc4106.
Signed-off-by: Iuliana Prodan
---
crypto/gcm.c | 41 +++-
include/crypto/gcm.h | 53 +
Add inline helper function to check key length for AES algorithms.
The key can be 128, 192 or 256 bits size.
This function is used in the generic aes and aes_ti implementations.
Signed-off-by: Iuliana Prodan
---
crypto/aes_generic.c | 7 ---
crypto/aes_ti.c | 8
include/crypt
Added inline helper functions to check authsize and assoclen for
gcm and rfc4106.
Added, also, inline helper function to check key length for AES algorithms.
These are used in the generic implementation of gcm/rfc4106 and aes/aes_ti.
Iuliana Prodan (2):
crypto: gcm - helper functions for assoc
rxkad sometimes triggers a warning about oversized stack frames when
building with clang for a 32-bit architecture:
net/rxrpc/rxkad.c:243:12: error: stack frame size of 1088 bytes in function
'rxkad_secure_packet' [-Werror,-Wframe-larger-than=]
net/rxrpc/rxkad.c:501:12: error: stack frame size of
Hi Alexander,
Thanks for you patch.
On Tue, Jul 23, 2019 at 07:24:01AM +, Sverdlin, Alexander (Nokia - DE/Ulm)
wrote:
> It seems that smp_processor_id() is only used for a best-effort
> load-balancing, refer to qat_crypto_get_instance_node(). It's not feasible
> to disable preemption for the
It was <2019-07-25 czw 10:01>, when Chuhong Yuan wrote:
> Use devm_hwrng_register to simplify the implementation.
> Manual unregistration and some remove functions can be
> removed now.
>
> Signed-off-by: Chuhong Yuan
> ---
> drivers/char/hw_random/atmel-rng.c | 3 +--
> drivers/char/hw_rand
- Ursprüngliche Mail -
> Von: "horia geanta"
> An: "richard" , "Linux Crypto Mailing List"
> , "linux-kernel"
>
> CC: "aymen sghaier" , "david" ,
> "Baolin Wang"
> Gesendet: Donnerstag, 25. Juli 2019 07:57:28
> Betreff: Re: Backlog support for CAAM?
> On 7/25/2019 12:22 AM, Richard We
Use devm_hwrng_register to simplify the implementation.
Manual unregistration and some remove functions can be
removed now.
Signed-off-by: Chuhong Yuan
---
drivers/char/hw_random/atmel-rng.c | 3 +--
drivers/char/hw_random/cavium-rng-vf.c | 11 +--
drivers/char/hw_random/exynos-trng
47 matches
Mail list logo