On 07.04.2025 14:08, Jarkko Sakkinen wrote:
> On Mon, Apr 07, 2025 at 02:23:49PM +0300, Jarkko Sakkinen wrote:
>> On Mon, Apr 07, 2025 at 12:25:11PM +0200, Marek Szyprowski wrote:
>>> On 07.04.2025 04:39, Jarkko Sakkinen wrote:
>>>> From: Jarkko Sakkinen
>
);
>
> struct rb_root key_user_tree; /* tree of quota records indexed by UID
> */
> DEFINE_SPINLOCK(key_user_lock);
> +LIST_HEAD(key_graveyard);
> +DEFINE_SPINLOCK(key_graveyard_lock);
>
> unsigned int key_quota_root_maxkeys = 100; /* root's key count
> quota */
> unsigned int key_quota_root_maxbytes = 2500; /* root's key space quota
> */
> @@ -658,8 +660,9 @@ void key_put(struct key *key)
> key->user->qnbytes -= key->quotalen;
> spin_unlock_irqrestore(&key->user->lock, flags);
> }
> - smp_mb(); /* key->user before FINAL_PUT set. */
> - set_bit(KEY_FLAG_FINAL_PUT, &key->flags);
> + spin_lock_irqsave(&key_graveyard_lock, flags);
> + list_add_tail(&key->graveyard_link, &key_graveyard);
> + spin_unlock_irqrestore(&key_graveyard_lock, flags);
> schedule_work(&key_gc_work);
> }
> }
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
17 deletions(-)
> Please rebase your patch on top of the cryptodev tree, i.e., make
> this an incremental patch with a Fixes header.
This v2 applied on the linux-next with reverted v1 fixes my issue.
When you prepare the incremental patch, feel free to add:
Reported-by: Marek Szypr
err = enable_best_rng();
> @@ -529,6 +550,7 @@ void hwrng_unregister(struct hwrng *rng)
> }
> }
>
> + new_rng = get_current_rng_nolock();
> if (list_empty(&rng_list)) {
> mutex_unlock(&rng_mutex);
> if (hwrng_fill)
> @@ -536,6 +558,12 @@ void hwrng_unregister(struct hwrng *rng)
> } else
> mutex_unlock(&rng_mutex);
>
> + if (new_rng) {
> + if (old_rng != new_rng)
> + add_early_randomness(new_rng);
> + put_rng(new_rng);
> + }
> +
> wait_for_completion(&rng->cleanup_done);
> }
> EXPORT_SYMBOL_GPL(hwrng_unregister);
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
u2019
make[2]: *** [drivers/char/hw_random/exynos-trng.o] Error 1
make[1]: *** [_module_drivers/char/hw_random] Error 2
This looks like a missing dependency on "OF" when "COMPILE_TEST" is
selected.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
4a1100a445 ("crypto: s5p-sss - Handle unaligned buffers")
Cc:
Signed-off-by: Marek Szyprowski
---
drivers/crypto/s5p-sss.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
index ac6d62b..2b3a0cf 100644
--- a/driv
t;)
Cc:
Signed-off-by: Krzysztof Kozlowski
Tested-by: Marek Szyprowski
This patch solved similar hang issue on Exynos4210 based Universal_C210
board. Now AES crypto module works fine.
---
Issue was easily reproduced on newer (faster?) SoCs, like Odroid XU3/XU4
(Exynos5422). Still it was kind o