[PATCH] crypto: virtio/akcipher - Move a pointer assignment in virtio_crypto_rsa_set_key()

2024-10-12 Thread Markus Elfring
From: Markus Elfring Date: Sat, 12 Oct 2024 09:51:58 +0200 Move the reset of the data structure member “n” to a null pointer into an if branch so that this assignment will be performed only after a key parsing failure. Signed-off-by: Markus Elfring --- drivers/crypto/virtio

Re: crypto: virtio - Less function calls in __virtio_crypto_akcipher_do_req() after error detection

2024-01-09 Thread Markus Elfring
el.org/cocci/6cbcf640-55e5-2f11-4a09-716fe681c...@web.de/ https://sympa.inria.fr/sympa/arc/cocci/2023-03/msg00096.html Regards, Markus

[PATCH v2] crypto: virtio - Less function calls in __virtio_crypto_akcipher_do_req() after error detection

2023-12-26 Thread Markus Elfring
From: Markus Elfring Date: Tue, 26 Dec 2023 11:00:20 +0100 The kfree() function was called in up to two cases by the __virtio_crypto_akcipher_do_req() function during error handling even if the passed variable contained a null pointer. This issue was detected by using the Coccinelle software

[PATCH] crypto: virtio - Less function calls in __virtio_crypto_akcipher_do_req() after error detection

2023-12-24 Thread Markus Elfring
From: Markus Elfring Date: Sun, 24 Dec 2023 20:42:19 +0100 The kfree() function was called in up to two cases by the __virtio_crypto_akcipher_do_req() function during error handling even if the passed variable contained a null pointer. This issue was detected by using the Coccinelle software

Re: Announce loop-AES-v3.7t file/swap crypto package

2021-02-24 Thread Markus Reichelt
* Jari Ruusu wrote: > loop-AES changes since previous release: > - Worked around kernel interface changes on 5.11 kernels thank you! -- left blank, right bald

Re: Null pointer dereference in public key verification (related to SM2 introduction)

2020-12-02 Thread Tobias Markus
a simpler test case (other than finding another EAP-secured network). If you or anyone could point me to a simple program that uses the public key infrastructure, it might be easier to trigger the Oops again. Kind Regards, Tobias David Howells wrote: > Tobias Markus wrote: > >> kernel

Null pointer dereference in public key verification (related to SM2 introduction)

2020-11-12 Thread Tobias Markus
Hi, running 5.10-rc3, I have come across a null pointer dereference. It occured while trying to connect to a 802.1x/EAP-protected network using iwd. However, the bug seems to be limited to iwd's usage of the keyctl API (unrelated to the wireless subsystem). The bug seems related to the recent ch

Re: [PATCH 2/2] Crypto/chcr: Fix some pr_xxx messages

2020-07-13 Thread Markus Elfring
rings. + pr_err("%s: Failed to form WR. No memory\n", __func__); Would you like to apply any further fine-tuning around affected error messages? Regards, Markus

Re: [PATCH 1/2] Crypto/chcr: Avoid some code duplication

2020-07-13 Thread Markus Elfring
better exception handling in this function implementation. Regards, Markus

Re: [PATCH] crypto: sun8i-ce - Fix runtime PM imbalance in sun8i_ce_cipher_init

2020-06-23 Thread Markus Elfring
rypto/20200622024014.11347-1-dinghao@zju.edu.cn/ pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a corresponding decrement is needed on the error handling path to keep the counter balanced. Fix this by adding the missed function call. How do you think about to avoid a wording weakness there (for example) besides other possible adjustments? Regards, Markus

Re: [PATCH] crypto: sun8i-ce - Fix runtime PM imbalance in sun8i_ce_cipher_init

2020-06-23 Thread Markus Elfring
e this change description another bit? Regards, Markus

Re: [PATCH] crypto: sun8i-ce - Fix runtime PM imbalance in sun8i_ce_cipher_init

2020-06-22 Thread Markus Elfring
> Fix this by … Please replace the beginning of this sentence with the tag “Fixes”. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=625d3449788f85569096780592549d0340e9c0c7#n183 Regards, Markus

Re: [PATCH v2 1/3] crypto: ccree: fix resource leak on error path

2020-06-21 Thread Markus Elfring
ate to essiv support https://lkml.org/lkml/2020/6/21/67 Will any fine-tuning trigger further consequences? Regards, Markus

Re: [PATCH v2 2/3] crypto: ccree: adapt ccree essiv support to kcapi

2020-06-21 Thread Markus Elfring
> Brings the ccree essiv interface … Wording adjustments: Bring the … > also use a fallback if requested a smaller key size. … fallback if a smaller key size was requested. Regards, Markus

Re: [PATCH v2 1/3] crypto: ccree: fix resource leak on error path

2020-06-21 Thread Markus Elfring
?id=6469e8962c20b580b471790fe42367750599#n785 Where would you like to put the patch version descriptions? Regards, Markus

Re: [PATCH 2/3] crypto: ccree: adapt ccree essiv support to kcapi

2020-06-21 Thread Markus Elfring
tation/process/submitting-patches.rst?id=6469e8962c20b580b471790fe42367750599#n151 Regards, Markus

Re: [PATCH 1/3] crypto: ccree: fix resource leak on error path

2020-06-21 Thread Markus Elfring
: > + kfree(ctx_p->user.key); > +out_shash: > + crypto_free_shash(ctx_p->shash_tfm); … How do you think about to replace the prefix “out” by “free” in these labels? Regards, Markus

Re: [v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-26 Thread Markus Elfring
n/process/submitting-patches.rst?id=9cb1fd0efd195590b828b9b865421ad345a4a145#n102 Regards, Markus

Re: [v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-26 Thread Markus Elfring
“specific resources”. Regards, Markus

Re: [v2 1/2] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

2020-05-26 Thread Markus Elfring
other small patch series? Regards, Markus

Re: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-26 Thread Markus Elfring
these memory will be used again. when this memory … > … Thus release specific resources before Is there a need to improve also this information another bit? Regards, Markus

Re: [PATCH v2 1/2] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

2020-05-26 Thread Markus Elfring
ve the addition of such input parameter validation to a separate update step. Regards, Markus

Re: [2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-25 Thread Markus Elfring
s suitable. Another alternative: The resources which need to be cleaned up are not used any more. But the pointers of these resources may be changed in the function “crypto_finalize_skcipher_request”. Thus release specific resources before calling this function. Regards, Markus

Re: [PATCH 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-24 Thread Markus Elfring
o the commit message? Regards, Markus

Re: [PATCH 1/2] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

2020-05-24 Thread Markus Elfring
es.rst?id=9cb1fd0efd195590b828b9b865421ad345a4a145#n138 Would you like to add the tag “Fixes” to the commit message? Regards, Markus

Re: [PATCH] crypto: user - fix memory leak in crypto_reportstat

2019-10-05 Thread Markus Elfring
> In crypto_reportstat, a new skb is created by nlmsg_new(). This skb is > leaked if crypto_reportstat_alg() fails. Required release for skb is > added. Please improve this change description. Regards, Markus

Re: [PATCH] crypto: user - fix memory leak in crypto_report

2019-10-05 Thread Markus Elfring
> In crypto_report, a new skb is created via nlmsg_new(). This skb should > be released if crypto_report_alg() fails. Please improve this change description. Regards, Markus

[PATCH] hwrng: mediatek: Use devm_platform_ioremap_resource() in mtk_rng_probe()

2019-09-18 Thread Markus Elfring
From: Markus Elfring Date: Wed, 18 Sep 2019 09:34:11 +0200 Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/char/hw_random/mtk-rng.c | 9 + 1 file changed, 1

[PATCH] hwrng: iproc-rng200 - Use devm_platform_ioremap_resource() in iproc_rng200_probe()

2019-09-18 Thread Markus Elfring
From: Markus Elfring Date: Wed, 18 Sep 2019 09:09:22 +0200 Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/char/hw_random/iproc-rng200.c | 9 + 1 file changed

Generating identifiers similar to UUIDs but without dashes

2019-01-13 Thread Markus Elfring
/questions/24481801/is-uuid-without-dashes-hyphens-valid#answer-24484051 Now I am looking again for possibilities to generate reasonably unique identifiers also without these dashes. Can any data processing benefit from the avoidance of such extra characters? Regards, Markus

[PATCH 2/2] crypto: talitos: Delete an error message for a failed memory allocation in talitos_edesc_alloc()

2018-03-12 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 12 Mar 2018 14:18:23 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/crypto/talitos.c | 1 - 1 file changed, 1 deletion(-) diff

[PATCH 1/2] crypto: talitos: Use common error handling code in talitos_edesc_alloc()

2018-03-12 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 12 Mar 2018 14:08:55 +0100 Add jump targets so that an error message and the setting of a specific error code is stored only once at the end of this function. Signed-off-by: Markus Elfring --- drivers/crypto/talitos.c | 24 1 file

[PATCH 0/2] crypto/talitos: Adjustments for talitos_edesc_alloc()

2018-03-12 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 12 Mar 2018 14:24:34 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Use common error handling code Delete an error message for a failed memory allocation drivers/crypto/talitos.c | 25

[PATCH] crypto: ccp: Use memdup_user() rather than duplicating its implementation

2018-03-05 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 5 Mar 2018 13:50:13 +0100 Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/crypto/ccp/psp-dev.c | 15 +-- 1

Re: [2/2] crypto: bcm: One function call less in do_shash() after error detection

2018-02-23 Thread SF Markus Elfring
> This patch is pointless as kfree on NULL is a no-op. I prefer to avoid unnecessary function calls generally. Regards, Markus

Re: [PATCH 2/2] crypto: omap: Improve a size determination in three functions

2018-02-22 Thread SF Markus Elfring
struct omap_aes_dev), GFP_KERNEL); > > I'm fine with sizeof(*dd) Thanks for your feedback. > but please don't combine the allocation with the declaration. Why do you not like such an implementation detail? Regards, Markus

[PATCH] crypto: atmel: Delete error messages for a failed memory allocation in six functions

2018-02-15 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 15 Feb 2018 11:38:30 +0100 Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/crypto/atmel-aes.c | 6 +- drivers/crypto/atmel-sha.c

[PATCH 2/2] crypto: bcm: One function call less in do_shash() after error detection

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 22:22:20 +0100 The kfree() function was called in one case by the do_shash() function during error handling even if the passed variable contained a null pointer. * Reorder two function calls at the end. * Add a jump target. Signed-off-by: Markus

[PATCH 1/2] crypto: bcm: Delete an error message for a failed memory allocation in do_shash()

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 22:05:11 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/crypto/bcm/util.c | 1 - 1 file changed, 1 deletion(-) diff

[PATCH 0/2] crypto/bcm: Adjustments for do_shash()

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 22:30:07 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation One function call less after error detection drivers/crypto/bcm/util.c | 7

[PATCH] crypto: bfin_crc: Delete an error message for a failed memory allocation in bfin_crypto_crc_probe()

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 21:34:54 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/crypto/bfin_crc.c | 4 +--- 1 file changed, 1 insertion(+), 3

[PATCH 2/2] crypto: caam: Use common error handling code in four functions

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 19:14:49 +0100 Add jump targets so that a bit of exception handling can be better reused at the end of these functions. Signed-off-by: Markus Elfring --- drivers/crypto/caam/caamalg.c | 32 drivers/crypto/caam

[PATCH 1/2] crypto: caam: Delete an error message for a failed memory allocation in seven functions

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 18:22:38 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/crypto/caam/caamalg.c | 6 +- drivers/crypto/caam

[PATCH 0/2] crypto/caam: Adjustments for eight function implementations

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 19:23:45 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation in seven functions Use common error handling code in four functions

[PATCH] crypto: nx-842: Delete an error message for a failed memory allocation in nx842_pseries_init()

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 17:05:13 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/crypto/nx/nx-842-pseries.c | 5 ++--- 1 file changed, 2

[PATCH 2/2] crypto: omap: Improve a size determination in three functions

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 16:12:05 +0100 Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This

[PATCH 1/2] crypto: omap: Delete an error message for a failed memory allocation in three functions

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 16:00:33 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/crypto/omap-aes.c | 5 ++--- drivers/crypto/omap-des.c

[PATCH 0/2] crypto/omap: Adjustments for three function implementations

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 16:18:19 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete error messages for a failed memory allocation Improve size determinations drivers/crypto/omap-aes.c | 8 +++- drivers

[PATCH 2/2] crypto: sahara: Improve a size determination in sahara_probe()

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 14:14:05 +0100 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This

[PATCH 1/2] crypto: sahara: Delete an error message for a failed memory allocation in sahara_probe()

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 14:10:03 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/crypto/sahara.c | 4 +--- 1 file changed, 1 insertion(+), 3

[PATCH 0/2] crypto/sahara: Adjustments for sahara_probe()

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 14:30:28 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation Improve a size determination drivers/crypto/sahara.c | 6 ++ 1 file

[PATCH 4/4] crypto: ux500: Delete two unnecessary variable initialisations in ux500_cryp_probe()

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 10:56:38 +0100 Two local variables will eventually be set to appropriate pointers a bit later. Thus omit their explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/crypto/ux500/cryp/cryp_core.c | 4 ++-- 1 file changed

[PATCH 3/4] crypto: ux500: Adjust an error message in ux500_cryp_probe()

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 10:47:31 +0100 Replace the function name in this error message so that the same name is mentioned according to what was called before. Signed-off-by: Markus Elfring --- drivers/crypto/ux500/cryp/cryp_core.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 2/4] crypto: ux500: Adjust two condition checks in ux500_cryp_probe()

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 10:38:44 +0100 The local variable "cryp_error" was used only for two condition checks. * Check the return values from these function calls directly instead. * Delete this variable which became unnecessary with this refactoring. Signed-off-

[PATCH 1/4] crypto: ux500: Delete an error message for a failed memory allocation in ux500_cryp_probe()

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 10:12:38 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/crypto/ux500/cryp/cryp_core.c | 1 - 1 file changed, 1

[PATCH 0/4] Ux500 crypto: Adjustments for ux500_cryp_probe()

2018-02-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Feb 2018 11:12:34 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Delete an error message for a failed memory allocation Adjust two condition checks Adjust an error message Delete two

Re: [PATCH] crypto/s5p-sss: Use common error handling code in s5p_aes_probe()

2017-10-22 Thread SF Markus Elfring
>> From: Markus Elfring >> Date: Sun, 22 Oct 2017 15:00:27 +0200 >> >> Add a jump target so that a bit of exception handling can be better reused >> at the end of this function. >> >> This issue was detected by using the Coccinelle software. >> >

[PATCH] crypto/s5p-sss: Use common error handling code in s5p_aes_probe()

2017-10-22 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 22 Oct 2017 15:00:27 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/crypto/s5p-sss.c | 13

[PATCH] crypto-ccp: Use common error handling code in sp_get_irqs()

2017-10-22 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 22 Oct 2017 14:10:33 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/crypto/ccp/sp-platform.c | 16

Re: crypto-testmgr: Use common error handling code in drbg_cavs_test()

2017-10-21 Thread SF Markus Elfring
ing like following: > > ... > memcmp > goto free_rng; Do you find an additional jump really acceptable at such a source code place? > report_failure: > > > free_rng: > I am curious on how feedback will evolve also for the other design approach. Regards, Markus

[PATCH 2/2] crypto-testmgr: Delete an unnecessary variable initialisation in drbg_cavs_test()

2017-10-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 21 Oct 2017 19:33:45 +0200 The variable "ret" will eventually be set to an error code a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- crypto/testmgr.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 1/2] crypto-testmgr: Use common error handling code in drbg_cavs_test()

2017-10-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 21 Oct 2017 19:29:11 +0200 Adjust jump targets so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- crypto/testmgr.c | 31

[PATCH 0/2] crypto-testmgr: Fine-tuning for drbg_cavs_test()

2017-10-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 21 Oct 2017 19:47:43 +0200 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Use common error handling code Delete an unnecessary variable initialisation crypto/testmgr.c | 33

[PATCH 3/3] crypto-ansi_cprng: Delete unnecessary blank lines

2017-10-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 21 Oct 2017 16:27:56 +0200 The script "checkpatch.pl" pointed information out like the following. CHECK: Please don't use multiple blank lines Thus fix the affected source code places. Signed-off-by: Markus Elfring --- crypto/ansi_cprng.c |

[PATCH 2/3] crypto-ansi_cprng: Delete two variable assignments in get_prng_bytes()

2017-10-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 21 Oct 2017 16:10:43 +0200 Adjust a jump target so that two error code assignments which are redundant before condition checks can be removed because the same value will be set as an exception handling at the end of this function. Signed-off-by: Markus Elfring

[PATCH 1/3] crypto-ansi_cprng: Use common error handling code in get_prng_bytes()

2017-10-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 21 Oct 2017 15:17:52 +0200 Adjust jump targets so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- crypto/ansi_cprng.c | 34

[PATCH 0/3] crypto-ansi_cprng: Fine-tuning for three function implementations

2017-10-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 21 Oct 2017 19:06:54 +0200 Two update suggestions were taken into account from static source code analysis. Markus Elfring (3): Use common error handling code in get_prng_bytes() Delete two variable assignments in get_prng_bytes() Delete unnecessary blank

Re: Announce loop-AES-v3.7l file/swap crypto package

2017-09-13 Thread Markus Reichelt
* Jari Ruusu wrote: > loop-AES changes since previous release: > - Worked around kernel interface changes on 4.13 kernels. > - Added second util-linux patch to work around gpg 2 pinentry-mode bug. Thank you!

[PATCH] crypto-testmgr: Delete an error message for a failed memory allocation in two functions

2017-05-11 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 11 May 2017 17:05:17 +0200 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf

[PATCH 2/2] n2rng: Combine substrings for two messages in n2rng_probe()

2017-04-19 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 19 Apr 2017 10:50:04 +0200 The script "checkpatch.pl" pointed information out like the following. WARNING: quoted string split across lines Thus fix the affected source code places. Signed-off-by: Markus Elfring --- drivers/char/hw_random/n2

[PATCH 1/2] n2rng: Use devm_kcalloc() in n2rng_probe()

2017-04-19 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 19 Apr 2017 10:30:47 +0200 * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". * Replace the specification of a data st

[PATCH 0/2] n2rng: Fine-tuning for n2rng_probe()

2017-04-19 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 19 Apr 2017 11:00:11 +0200 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Use devm_kcalloc() Combine substrings for two messages drivers/char/hw_random/n2-drv.c | 12 +--- 1 file changed, 5

Re: [PATCH 3/7] crypto: doc - fix source comments for Sphinx

2016-10-16 Thread Markus Heiser
Am 16.10.2016 um 15:03 schrieb Stephan Mueller : > Am Sonntag, 16. Oktober 2016, 14:56:49 CEST schrieb Markus Heiser: > > Hi Markus, > ... > >> compared to DocBook, with sphinx you can use (have to use) the reST markup >> in source code comments. >> &g

Re: [PATCH 7/7] crypto: doc - clarify AEAD memory structure

2016-10-16 Thread Markus Heiser
code, but simple inline- or block-markups like lists and code-blocks are sometimes helpful. For this, the the first half of the reST primer is advisable: http://www.sphinx-doc.org/en/stable/rest.html These are only my 2cent in hope that helps ... there is no rule to use any special markup ...

Re: [PATCH 3/7] crypto: doc - fix source comments for Sphinx

2016-10-16 Thread Markus Heiser
with the following template:: * * void callback_function(struct crypto_async_request *req, int error) * If you want a *highlighted* code block, use the code-block directive, e.g: * The callback function is registered with the aead_request handle and * must comply with the foll

Re: SPHINX: no structured comments

2016-10-15 Thread Markus Heiser
tion/books_migrated/crypto-API This migration is done with the my dbxm2rst project: https://return42.github.io/dbxml2rst/ If you need more help or want to migrate more DocBook documentation to reST ... don't hesitate to contact me (on the ML or directly / de-de ;-) -- Markus -- -- To

[PATCH 6/6] crypto-caamhash: Move common error handling code in two functions

2016-09-15 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 15 Sep 2016 16:00:55 +0200 Move statements for error handling which were identical in two if branches to the end of these functions. Signed-off-by: Markus Elfring --- drivers/crypto/caam/caamhash.c | 26 ++ 1 file changed, 14 insertions

[PATCH 5/6] crypto-caamhash: Delete an unnecessary initialisation in seven functions

2016-09-15 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 15 Sep 2016 15:24:02 +0200 The local variable "ret" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/crypto/caam/caamhash.c | 14 +++--- 1 file

[PATCH 4/6] crypto-caamhash: Return a value directly in caam_hash_cra_init()

2016-09-15 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 15 Sep 2016 14:56:12 +0200 * Return a value at the end without storing it in an intermediate variable. * Delete the local variable "ret" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring --- drivers/crypto/caam/caam

[PATCH 3/6] crypto-caamhash: Rename a jump label in five functions

2016-09-15 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 15 Sep 2016 14:43:38 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/crypto/caam/caamhash.c | 49 +++--- 1 file changed, 22 insertions(+), 27

[PATCH 2/6] crypto-caamhash: Rename jump labels in ahash_setkey()

2016-09-15 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 15 Sep 2016 13:54:49 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/crypto/caam/caamhash.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/crypto

[PATCH 1/6] crypto-caamhash: Use kmalloc_array() in ahash_setkey()

2016-09-15 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 15 Sep 2016 11:20:09 +0200 * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the

crypto-caamhash: Fine-tuning for several function implementations

2016-09-15 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 15 Sep 2016 16:27:23 +0200 Some update suggestions were taken into account from static source code analysis. Markus Elfring (6): Use kmalloc_array() in ahash_setkey() Rename jump labels in ahash_setkey() Rename a jump label in five functions Return a

[PATCH] hwrng-PIC32: Delete unnecessary assignment for the field "owner"

2016-08-15 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 16 Aug 2016 07:51:21 +0200 The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring --- drivers/char/hw_random/pic32-rng.c | 1 - 1 fi

Re: crypto-ixp4xx: Deletion of a few unnecessary checks

2015-11-17 Thread SF Markus Elfring
e assignment for a variable in init_ixp_crypto() >> crypto-ixp4xx: Less function calls in init_ixp_crypto() after error >> detection > > You completely ignored my comments. Nack. Will it be useful to clarify the proposed changes a bit more? Regards, Markus -- To unsubscri

[PATCH v2 3/3] crypto-ixp4xx: Less function calls in init_ixp_crypto() after error detection

2015-11-17 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 17 Nov 2015 16:15:21 +0100 The dma_pool_destroy() function was called in up to two cases by the init_ixp_crypto() function during error handling even if a call of the dma_pool_create() function failed. This implementation detail could be improved by the

[PATCH v2 2/3] crypto-ixp4xx: Reduce assignment for a variable in init_ixp_crypto()

2015-11-17 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 17 Nov 2015 15:45:32 +0100 The variable "ret" was set more often than necessary by the init_ixp_crypto() function. * Omit its initialisation at the beginning. * Use an error return code in two cases directly. * Improve compliance with the Linux co

[PATCH v2 1/3] crypto-ixp4xx: Delete unnecessary checks before the function call "dma_pool_destroy"

2015-11-17 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 15 Nov 2015 16:51:21 +0100 The dma_pool_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

[PATCH v2 0/3] crypto-ixp4xx: Deletion of a few unnecessary checks

2015-11-17 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 17 Nov 2015 16:26:01 +0100 Subject: [PATCH 0/3] crypto-ixp4xx: Deletion of a few unnecessary checks Further update suggestions were taken into account after a patch was applied from static source code analysis. Markus Elfring (3): Delete unnecessary checks

[PATCH 4/4] crypto-ixp4xx: Less function calls in init_ixp_crypto() after error detection

2015-11-15 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 15 Nov 2015 19:23:55 +0100 The dma_pool_destroy() function was called in up to two cases by the init_ixp_crypto() function during error handling even if a call of the dma_pool_create() function failed. This implementation detail could be improved by the

[PATCH 3/4] crypto-ixp4xx: Reduce assignment for a variable in init_ixp_crypto()

2015-11-15 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 15 Nov 2015 19:06:44 +0100 The variable "ret" was set more often than necessary by the init_ixp_crypto() function. * Omit its initialisation at the beginning. * Use an error return code in two cases directly. * Improve compliance with the Linux co

[PATCH 2/4] crypto-ixp4xx: Two function calls less in init_ixp_crypto() after error detection

2015-11-15 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 15 Nov 2015 18:28:39 +0100 The dma_pool_destroy() function was called twice with a null pointer if a "npe_error" was reported. This implementation detail could be improved by the introduction of another jump label. Signed-off-by: Markus Elfring --

[PATCH 1/4] crypto-ixp4xx: Delete unnecessary checks before the function call "dma_pool_destroy"

2015-11-15 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 15 Nov 2015 16:51:21 +0100 The dma_pool_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

[PATCH 0/4] crypto-ixp4xx: Deletion of a few unnecessary checks

2015-11-15 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 15 Nov 2015 19:39:00 +0100 Further update suggestions were taken into account after a patch was applied from static source code analysis. Markus Elfring (4): Delete unnecessary checks before the function call "dma_pool_destroy" Two function cal

[PATCH] crypto-qat: Deletion of unnecessary checks before two function calls

2015-06-26 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 26 Jun 2015 20:30:11 +0200 The functions kfree() and release_firmware() test whether their argument is NULL and then return immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus

[PATCH] crypto-jitterentropy: Delete unnecessary checks before the function call "kzfree"

2015-06-23 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 23 Jun 2015 22:30:21 +0200 The kzfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- crypto

AW: problem with testing a CTR block cipher mode which is partially working

2015-03-30 Thread Markus Stockhausen
cipher pass. > > The number of inputs(register) are limited and I have tested near all the > possibility. > Any idea of what could be wrong. > had a similar challenge a few months ago. I had to take care about - counter IV is big endian (implemented it little endi

AW: [RFC PATCH 1/6] crypto: sha512: implement base layer for SHA-512

2015-03-29 Thread Markus Stockhausen
> Von: Ard Biesheuvel [ard.biesheu...@linaro.org] > Gesendet: Sonntag, 29. März 2015 12:38 > An: Markus Stockhausen > Cc: linux-arm-ker...@lists.infradead.org; linux-crypto@vger.kernel.org; > samitolva...@google.com; herb...@gondor.apana.org.au; jussi.kivili...@iki.fi > Betreff

AW: [RFC PATCH 1/6] crypto: sha512: implement base layer for SHA-512

2015-03-29 Thread Markus Stockhausen
-spe assembler module written by me is only 10% faster than the old sha1-popwerpc assembler module. Both are simple assembler algorithms without hardware acceleration. For large blocks I gain another 8% by avoding function calls because the co

AW: [PATCH] crypto: powerpc - move files to fix build error

2015-03-06 Thread Markus Stockhausen
> Von: Kim Phillips [kim.phill...@freescale.com] > Gesendet: Samstag, 7. März 2015 01:46 > An: Herbert Xu; Benjamin Herrenschmidt; Paul Mackerras; Michael Ellerman > Cc: Markus Stockhausen; linux-crypto@vger.kernel.org; > linuxppc-...@lists.ozlabs.org; linux-ker...@vger.kerne

  1   2   >