Le 21/04/2025 à 09:43, Su Hui a écrit :
On 2025/4/21 15:10, Christophe JAILLET wrote:
Le 21/04/2025 à 07:51, Su Hui a écrit :
It's safer to use size_add() to replace open-coded aithmetic in
allocator
arguments, because size_add() can prevent possible overflow problem.
Signed-off-by: S
Le 21/04/2025 à 07:51, Su Hui a écrit :
It's safer to use size_add() to replace open-coded aithmetic in allocator
arguments, because size_add() can prevent possible overflow problem.
Signed-off-by: Su Hui
---
include/crypto/aead.h | 3 ++-
include/crypto/akcipher.h | 4 +++-
include/cry
virtcrypto_clear_request() does the same as the code here, but uses
kfree_sensitive() for one of the free operation.
So, better safe than sorry, use virtcrypto_clear_request() directly to
save a few lines of code and cleanly free the memory.
Signed-off-by: Christophe JAILLET
---
I've no id
Use SPDX-License-Identifier: GPL-2.0-only, instead of hand writing it.
This also removes a reference to http://www.xyratex.com which seems to be
down.
Signed-off-by: Christophe JAILLET
---
crypto/crc32_generic.c | 24 +---
1 file changed, 1 insertion(+), 23 deletions
In case of error, we should call 'clk_disable_unprepare()' to undo a
previous 'clk_prepare_enable()' call, as already done in the remove
function.
Fixes: 406346d22278 ("hwrng: ingenic - Add hardware TRNG for Ingenic X1830")
Signed-off-by: Christophe JAILLET
---
Le 26/11/2020 à 13:04, Giovanni Cabiddu a écrit :
Hi Christophe,
On Sat, Nov 21, 2020 at 07:13:59AM +, Christophe JAILLET wrote:
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by
an equivalent 'dma_set_mask_and_coherent()' which is m
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by
an equivalent 'dma_set_mask_and_coherent()' which is much less verbose.
Signed-off-by: Christophe JAILLET
---
drivers/crypto/cavium/cpt/cptpf_main.c | 10 ++
drivers/crypt
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by
an equivalent 'dma_set_mask_and_coherent()' which is much less verbose.
Signed-off-by: Christophe JAILLET
---
drivers/crypto/marvell/octeontx/otx_cptpf_main.c | 10 ++
d
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by
an equivalent 'dma_set_mask_and_coherent()' which is much less verbose.
Signed-off-by: Christophe JAILLET
---
drivers/crypto/cavium/zip/zip_main.c | 10 ++
1 file changed, 2 inser
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by
an equivalent 'dma_set_mask_and_coherent()' which is much less verbose.
While at it, also remove some unless extra () in the 32 bits case.
Signed-off-by: Christophe JAILLET
---
Instead of re
Update the size used in 'dma_free_coherent()' in order to match the one
used in the corresponding 'dma_alloc_coherent()', in 'setup_crypt_desc()'.
Fixes: 81bef0150074 ("crypto: ixp4xx - Hardware crypto support for IXP4xx CPUs")
Signed-off-by:
@@
expression e1, e2;
@@
-pci_set_consistent_dma_mask(e1, e2)
+dma_set_coherent_mask(&e1->dev, e2)
Signed-off-by: Christophe JAILLET
---
If needed, see post from Christoph Hellwig on the kernel-janitors ML:
https://marc.info/?l=kernel-janitors&m=158745678307186&w=4
The error handling path of 'chcr_authenc_setkey()' is the same as this
error handling code.
So just 'goto out' as done everywhere in the function to simplify the code.
Signed-off-by: Christophe JAILLET
---
drivers/crypto/chelsio/chcr_algo.c | 4 +---
1 file changed, 1 inser
At the top this file, we have:
#define pr_fmt(fmt) "chcr:" fmt
So there is no need to repeat "chcr : " in some error message when the
pr_xxx macro is used.
This would lead to log "chcr:chcr : blabla"
Signed-off-by: Christophe JAILLET
---
drivers/c
ported crypto
algorithms.")
Signed-off-by: Christophe JAILLET
---
v2: Do not introduce an extra variable to check if the list has been fully
iterated. Test with "if (&ndev->list == &ndevlist)" instead
---
drivers/crypto/cavium/nitrox/nitrox_main.c | 4 ++--
1 file cha
upported crypto
algorithms.")
Signed-off-by: Christophe JAILLET
---
drivers/crypto/cavium/nitrox/nitrox_main.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/cavium/nitrox/nitrox_main.c
b/drivers/crypto/cavium/nitrox/nitrox_main.c
index 788c6607078b..172ca
s/NITORX/NITROX/
Signed-off-by: Christophe JAILLET
---
drivers/crypto/cavium/nitrox/nitrox_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/cavium/nitrox/nitrox_main.c
b/drivers/crypto/cavium/nitrox/nitrox_main.c
index e91be9b8b083..788c6607078b 100644
Use '__skb_put_data()' instead of rewritting it.
This improves readability.
Signed-off-by: Christophe JAILLET
---
drivers/crypto/chelsio/chtls/chtls_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/chelsio/chtls/chtls_io.c
b/drivers/crypto/che
The help section says that the module will be called 'pipcoxcell_crypto'.
This is likely a typo.
Use 'picoxcell_crypto' instead
Signed-off-by: Christophe JAILLET
---
drivers/crypto/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cryp
'skb_put()+memset()' is equivalent to 'skb_put_zero()'
Use the latter because it is less verbose and it hides the internals of the
sk_buff structure.
Signed-off-by: Christophe JAILLET
---
drivers/crypto/chelsio/chtls/chtls_main.c | 3 +--
1 file changed, 1 insertion(+),
'dev' is leaking in the error handling path of 'hifn_probe()'.
Add a 'kfree(dev)' to match the code in 'hifn_remove()'
Signed-off-by: Christophe JAILLET
---
drivers/crypto/hifn_795x.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/
Le 09/10/2017 à 23:22, walter harms a écrit :
Am 08.10.2017 11:39, schrieb Christophe JAILLET:
All error handling paths 'goto err_drop_spawn' except this one.
In order to avoid some resources leak, we should do it as well here.
Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to sk
All error handling paths 'goto err_drop_spawn' except this one.
In order to avoid some resources leak, we should do it as well here.
Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher")
Signed-off-by: Christophe JAILLET
---
crypto/lrw.c | 6 --
1 file changed
If the cipher name does not start with 'ecb(' we should bail out, as done
in the 'create()' function in 'crypto/xts.c'.
Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher")
Signed-off-by: Christophe JAILLET
---
This patch is 100% speculative.
It
crypto/xts.c' and 'crypto/lrw.c' look very
similar.
However, there is one more sanity check in xts. This patch proposes to
add the same test in lrw. Not sure at all if correct!
I just send it for consistency.
Christophe JAILLET (2):
crypto: lrw - Fix an error handling path in '
All error handling paths 'goto err_drop_spawn' except this one.
In order to avoid some resources leak, we should do it as well here.
Fixes: f1c131b45410 ("crypto: xts - Convert to skcipher")
Signed-off-by: Christophe JAILLET
---
crypto/xts.c | 6 --
1 file changed
'err' is known to be 0 at this point.
If 'kzalloc()' fails, returns -ENOMEM instead of 0 which means success.
Signed-off-by: Christophe JAILLET
---
drivers/crypto/cavium/nitrox/nitrox_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/
'ret' is known to be 0 at this point.
If 'safexcel_request_ring_irq()' fails, it returns an error code.
Return this value instead of 0 which means success.
Signed-off-by: Christophe JAILLET
---
drivers/crypto/inside-secure/safexcel.c | 5 +++--
1 file changed, 3 insert
lised warning")
Signed-off-by: Christophe JAILLET
---
drivers/crypto/ixp4xx_crypto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
index 427cbe012729..1ccbe15b5f16 100644
--- a/drivers/crypto/ixp4xx_cryp
If 'kzalloc' fails, we return 0 which means success.
return -ENOMEM instead as already done a few lines above.
Signed-off-by: Christophe JAILLET
---
drivers/crypto/amcc/crypto4xx_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/amcc/crypto4xx_core.c
b/driv
ing.
Also fix a crash in 'chcr_authenc_setkey()' if 'chcr_alloc_shash()'
returns an error pointer and the "goto out" path is taken.
Signed-off-by: Christophe JAILLET
---
v2: Modify 'chcr_alloc_shash' to return ERR_PTR(-EINVAL) instead of NULL
in case
Le 13/04/2017 à 18:13, Dan Carpenter a écrit :
On Thu, Apr 13, 2017 at 08:37:50PM +0530, Harsh Jain wrote:
On Thu, Apr 13, 2017 at 8:20 PM, Christophe JAILLET
wrote:
Le 13/04/2017 à 16:04, Dan Carpenter a écrit :
On Thu, Apr 13, 2017 at 02:14:30PM +0200, Christophe JAILLET wrote:
If
Le 13/04/2017 à 16:04, Dan Carpenter a écrit :
On Thu, Apr 13, 2017 at 02:14:30PM +0200, Christophe JAILLET wrote:
If 'chcr_alloc_shash()' a few lines above fails, 'base_hash' can be an
error pointer when we 'goto out'.
So checking for NULL here is not en
If 'chcr_alloc_shash()' a few lines above fails, 'base_hash' can be an
error pointer when we 'goto out'.
So checking for NULL here is not enough because it is likely that
'chcr_free_shash' will crash if we pass an error pointer.
Signed-off-by: Christophe JA
This serie is divided into 2 patches. They are more or less related to the
same issue, but the first patch is not a bug in itself, just a clean-up
(IMHO).
If I'm correct, the 2nd one, is a real (unlikely) issue.
Christophe JAILLET (2):
crypto: chcr - Improve error checking
crypto: chcr
check for NULL.
Signed-off-by: Christophe JAILLET
---
drivers/crypto/chelsio/chcr_algo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/chelsio/chcr_algo.c
b/drivers/crypto/chelsio/chcr_algo.c
index 41bc7f4f58cd..f19590ac8775 100644
--- a/drivers/crypto/chelsio/ch
sizes look different: '%s' vs '%s'" % (y0, y1)
Signed-off-by: Christophe JAILLET
---
drivers/crypto/amcc/crypto4xx_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/amcc/crypto4xx_core.c
b/drivers
Oups,
should be:
free_pages((unsigned long)buf_out, pages);
free_pages((unsigned long)buf_in, pages);
CJ
Le 26/01/2015 06:40, Christophe Jaillet a écrit :
If only one of the 2 __get_free_pages fails, then there is a memory leak
Signed-off-by: Christophe Jaillet
---
drivers
If only one of the 2 __get_free_pages fails, then there is a memory leak
Signed-off-by: Christophe Jaillet
---
drivers/crypto/omap-aes.c | 2 ++
drivers/crypto/omap-des.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index f79dd41
If only one of the 2 __get_free_pages fails, then there is a memory leak.
Signed-off-by: Christophe Jaillet
---
drivers/crypto/atmel-aes.c | 2 +-
drivers/crypto/atmel-tdes.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto
40 matches
Mail list logo