Given that crypto_alloc_tfm() may return ERR pointers, and to avoid
crashes on obscure error paths where such pointers are presented to
crypto_destroy_tfm() (such as [0]), add an ERR_PTR check there
before dereferencing the second argument as a struct crypto_tfm
pointer.
[0]
https://lore.kernel.o
On Tue, 2021-03-02 at 19:33 +0200, Horia Geantă wrote:
> On 12/14/2020 9:00 PM, Lucas Stach wrote:
> > 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 s
Hello everyone!
I have a very great interest in improving the linux kernel, with
special regards to cryptography.
However, due to my lack of knowledge, I do not know exactly how can I do so.
Thus, I have a few questions regarding this:
How exactly do I start contributing to the linux-crypto subsy
On 12/14/2020 9:00 PM, Lucas Stach wrote:
> 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 e
On Tue, Mar 02, 2021 at 08:55:30AM +0100, Ard Biesheuvel wrote:
> diff --git a/include/crypto/hash.h b/include/crypto/hash.h
> index 13f8a6a54ca8..f065dbe2205c 100644
> --- a/include/crypto/hash.h
> +++ b/include/crypto/hash.h
> @@ -281,6 +281,8 @@ static inline struct crypto_tfm *crypto_ahash_tfm(
This patch fixes a memory leak on an error path.
Fixes: d9b45418a917 ("crypto: sun8i-ss - support hash algorithms")
Reported-by: kernel test robot
Reported-by: Dan Carpenter
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 2 +-
1 file changed, 1 insertion(
Le Tue, Mar 02, 2021 at 04:34:46PM +, Colin King a écrit :
> From: Colin Ian King
>
> In the case where the dma_iv mapping fails, the return error path leaks
> the memory allocated to object d. Fix this by adding a new error return
> label and jumping to this to ensure d is free'd before the
From: Colin Ian King
In the case where the dma_iv mapping fails, the return error path leaks
the memory allocated to object d. Fix this by adding a new error return
label and jumping to this to ensure d is free'd before the return.
Addresses-Coverity: ("Resource leak")
Fixes: ac2614d721de ("cry
On Tue, Mar 02, 2021 at 05:09:05PM +0800, Yang Li wrote:
> Use kfree_sensitive() instead of using kfree() to make the intention
> of the API more explicit.
Why did you keep the memzeros?
Thanks,
--
Email: Herbert Xu
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.
Use kfree_sensitive() instead of using kfree() to make the intention
of the API more explicit.
fixed the following coccicheck:
./drivers/crypto/allwinner/sun8i-ce/sun8i-ce-prng.c:30:16-17: WARNING
opportunity for kfree_sensitive/kvfree_sensitive (memset at line 29)
./drivers/crypto/allwinner/sun
Calls into the skcipher API can only occur from contexts where the SIMD
unit is available, so there is no need for the SIMD helper.
Signed-off-by: Ard Biesheuvel
---
arch/arm64/crypto/Kconfig| 2 -
arch/arm64/crypto/aes-glue.c | 102 +++-
2 files changed, 13 insertions(+),
Calls into the skcipher API can only occur from contexts where the SIMD
unit is available, so there is no need for the SIMD helper.
Signed-off-by: Ard Biesheuvel
---
arch/arm64/crypto/Kconfig | 1 -
arch/arm64/crypto/aes-neonbs-glue.c | 122 ++--
2 files changed, 9 in
In order to ensure that kernel mode SIMD routines will not need a scalar
fallback if they run with softirqs disabled, disallow any use of the
AEAD encrypt and decrypt routines from outside of task or softirq context.
Signed-off-by: Ard Biesheuvel
---
crypto/aead.c | 10 ++
1 file changed
AES/CCM on arm64 is implemented as a synchronous AEAD, and so it is
guaranteed by the API that it is only invoked in task or softirq
context. Since softirqs are now only handled when the SIMD is not
being used in the task context that was interrupted to service the
softirq, we no longer need a fall
Now that kernel mode SIMD is guaranteed to be available when executing
in task or softirq context, we no longer need scalar fallbacks to use
when the NEON is unavailable. So get rid of them.
Signed-off-by: Ard Biesheuvel
---
arch/arm64/crypto/ghash-ce-glue.c | 209 +---
1 file ch
The users of the conditional NEON yield macros have all been switched to
the simplified cond_yield macro, and so the NEON specific ones can be
removed.
Signed-off-by: Ard Biesheuvel
---
arch/arm64/include/asm/assembler.h | 70
1 file changed, 70 deletions(-)
diff --git a/ar
In order to ensure that kernel mode SIMD routines will not need a scalar
fallback if they run with softirqs disabled, disallow any use of the
skcipher encrypt and decrypt routines from outside of task or softirq
context.
Signed-off-by: Ard Biesheuvel
---
crypto/skcipher.c | 10 ++
1 file
The AArch64 asm syntax has this slightly tedious property that the names
used in mnemonics to refer to registers depend on whether the opcode in
question targets the entire 64-bits (xN), or only the least significant
8, 16 or 32 bits (wN). When writing parameterized code such as macros,
this can be
Kernel mode NEON can be used in task or softirq context, but only in
a non-nesting manner, i.e., softirq context is only permitted if the
interrupt was not taken at a point where the kernel was using the NEON
in task context.
This means all users of kernel mode NEON have to be aware of this
limita
[ TL;DR for the non-ARM folks on CC: disabling softirq processing when using
SIMD in kernel mode could reduce complexity and improve performance, but we
need to decide whether we can do this, and how much softirq processing
latency we can tolerate. If we can find a satisfactory solution for t
在 2021/3/1 21:11, Mimi Zohar 写道:
On Sat, 2021-02-27 at 11:35 +0800, yumeng wrote:
在 2021/2/26 0:08, Stefan Berger 写道:
From: Stefan Berger
diff --git a/certs/Makefile b/certs/Makefile
index 3fe6b73786fa..c487d7021c54 100644
--- a/certs/Makefile
+++ b/certs/Makefile
@@ -69,6 +69,18 @@ els
Given that crypto_alloc_tfm() may return ERR pointers, and to avoid
crashes on obscure error paths where such pointers are presented to
crypto_destroy_tfm() (such as [0]), add an ERR_PTR check there
before dereferencing the second argument as a struct crypto_tfm
pointer.
[0]
https://lore.kernel.o
22 matches
Mail list logo