From: Greg Kroah-Hartman Date: Mon, 2 Dec 2019 15:09:31 +0000 (+0100) Subject: 5.4-stable patches X-Git-Tag: v5.4.2~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c8c19595c433bd0b9d2fa1026f4d4761e382ceff;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: crypto-inside-secure-fix-stability-issue-with-macchiatobin.patch --- diff --git a/queue-5.4/crypto-inside-secure-fix-stability-issue-with-macchiatobin.patch b/queue-5.4/crypto-inside-secure-fix-stability-issue-with-macchiatobin.patch new file mode 100644 index 00000000000..9e25fc8fe22 --- /dev/null +++ b/queue-5.4/crypto-inside-secure-fix-stability-issue-with-macchiatobin.patch @@ -0,0 +1,41 @@ +From b8c5d882c8334d05754b69dcdf1cfd6bc48a9e12 Mon Sep 17 00:00:00 2001 +From: Pascal van Leeuwen +Date: Tue, 17 Sep 2019 11:55:18 +0200 +Subject: crypto: inside-secure - Fix stability issue with Macchiatobin + +From: Pascal van Leeuwen + +commit b8c5d882c8334d05754b69dcdf1cfd6bc48a9e12 upstream. + +This patch corrects an error in the Transform Record Cache initialization +code that was causing intermittent stability problems on the Macchiatobin +board. + +Unfortunately, due to HW platform specifics, the problem could not happen +on the main development platform, being the VCU118 Xilinx development +board. And since it was a problem with hash table access, it was very +dependent on the actual physical context record DMA buffers being used, +i.e. with some (bad) luck it could seemingly work quit stable for a while. + +Signed-off-by: Pascal van Leeuwen +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/crypto/inside-secure/safexcel.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/crypto/inside-secure/safexcel.c ++++ b/drivers/crypto/inside-secure/safexcel.c +@@ -221,9 +221,9 @@ static void eip197_trc_cache_init(struct + /* Step #3: Determine log2 of hash table size */ + cs_ht_sz = __fls(asize - cs_rc_max) - 2; + /* Step #4: determine current size of hash table in dwords */ +- cs_ht_wc = 16<> 4)); ++ cs_rc_max = min_t(uint, cs_rc_abs_max, asize - (cs_ht_wc >> 2)); + + /* Clear the cache RAMs */ + eip197_trc_cache_clear(priv, cs_rc_max, cs_ht_wc); diff --git a/queue-5.4/series b/queue-5.4/series index 701544c872e..4aaff741cdb 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -1,3 +1,4 @@ io_uring-async-workers-should-inherit-the-user-creds.patch net-separate-out-the-msghdr-copy-from-___sys_-send-r.patch net-disallow-ancillary-data-for-__sys_-send-recv-msg.patch +crypto-inside-secure-fix-stability-issue-with-macchiatobin.patch