From: Greg Kroah-Hartman Date: Thu, 23 Sep 2021 08:24:30 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v4.4.285~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4503324efa0ac8ed487796b243da37b41e97f501;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: crypto-talitos-fix-max-key-size-for-sha384-and-sha512.patch pm-wakeirq-fix-unbalanced-irq-enable-for-wakeirq.patch --- diff --git a/queue-4.9/crypto-talitos-fix-max-key-size-for-sha384-and-sha512.patch b/queue-4.9/crypto-talitos-fix-max-key-size-for-sha384-and-sha512.patch new file mode 100644 index 00000000000..fecccc464ed --- /dev/null +++ b/queue-4.9/crypto-talitos-fix-max-key-size-for-sha384-and-sha512.patch @@ -0,0 +1,38 @@ +From 192125ed5ce62afba24312d8e7a0314577565b4a Mon Sep 17 00:00:00 2001 +From: Christophe Leroy +Date: Wed, 12 Jun 2019 05:49:50 +0000 +Subject: crypto: talitos - fix max key size for sha384 and sha512 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Christophe Leroy + +commit 192125ed5ce62afba24312d8e7a0314577565b4a upstream. + +Below commit came with a typo in the CONFIG_ symbol, leading +to a permanently reduced max key size regarless of the driver +capabilities. + +Reported-by: Horia Geantă +Fixes: b8fbdc2bc4e7 ("crypto: talitos - reduce max key size for SEC1") +Signed-off-by: Christophe Leroy +Reviewed-by: Horia Geantă +Signed-off-by: Herbert Xu +Signed-off-by: Nobuhiro Iwamatsu (CIP) +Signed-off-by: Greg Kroah-Hartman +--- + drivers/crypto/talitos.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/crypto/talitos.c ++++ b/drivers/crypto/talitos.c +@@ -816,7 +816,7 @@ static void talitos_unregister_rng(struc + * HMAC_SNOOP_NO_AFEA (HSNA) instead of type IPSEC_ESP + */ + #define TALITOS_CRA_PRIORITY_AEAD_HSNA (TALITOS_CRA_PRIORITY - 1) +-#ifdef CONFIG_CRYPTO_DEV_TALITOS_SEC2 ++#ifdef CONFIG_CRYPTO_DEV_TALITOS2 + #define TALITOS_MAX_KEY_SIZE (AES_MAX_KEY_SIZE + SHA512_BLOCK_SIZE) + #else + #define TALITOS_MAX_KEY_SIZE (AES_MAX_KEY_SIZE + SHA256_BLOCK_SIZE) diff --git a/queue-4.9/pm-wakeirq-fix-unbalanced-irq-enable-for-wakeirq.patch b/queue-4.9/pm-wakeirq-fix-unbalanced-irq-enable-for-wakeirq.patch new file mode 100644 index 00000000000..3f8dc8a79ff --- /dev/null +++ b/queue-4.9/pm-wakeirq-fix-unbalanced-irq-enable-for-wakeirq.patch @@ -0,0 +1,69 @@ +From 69728051f5bf15efaf6edfbcfe1b5a49a2437918 Mon Sep 17 00:00:00 2001 +From: Tony Lindgren +Date: Fri, 9 Feb 2018 08:11:26 -0800 +Subject: PM / wakeirq: Fix unbalanced IRQ enable for wakeirq + +From: Tony Lindgren + +commit 69728051f5bf15efaf6edfbcfe1b5a49a2437918 upstream. + +If a device is runtime PM suspended when we enter suspend and has +a dedicated wake IRQ, we can get the following warning: + +WARNING: CPU: 0 PID: 108 at kernel/irq/manage.c:526 enable_irq+0x40/0x94 +[ 102.087860] Unbalanced enable for IRQ 147 +... +(enable_irq) from [] (dev_pm_arm_wake_irq+0x4c/0x60) +(dev_pm_arm_wake_irq) from [] + (device_wakeup_arm_wake_irqs+0x58/0x9c) +(device_wakeup_arm_wake_irqs) from [] +(dpm_suspend_noirq+0x10/0x48) +(dpm_suspend_noirq) from [] +(suspend_devices_and_enter+0x30c/0xf14) +(suspend_devices_and_enter) from [] +(enter_state+0xad4/0xbd8) +(enter_state) from [] (pm_suspend+0x38/0x98) +(pm_suspend) from [] (state_store+0x68/0xc8) + +This is because the dedicated wake IRQ for the device may have been +already enabled earlier by dev_pm_enable_wake_irq_check(). Fix the +issue by checking for runtime PM suspended status. + +This issue can be easily reproduced by setting serial console log level +to zero, letting the serial console idle, and suspend the system from +an ssh terminal. On resume, dmesg will have the warning above. + +The reason why I have not run into this issue earlier has been that I +typically run my PM test cases from on a serial console instead over ssh. + +Fixes: c84345597558 (PM / wakeirq: Enable dedicated wakeirq for suspend) +Signed-off-by: Tony Lindgren +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Nobuhiro Iwamatsu (CIP) +Signed-off-by: Greg Kroah-Hartman +--- + drivers/base/power/wakeirq.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/base/power/wakeirq.c ++++ b/drivers/base/power/wakeirq.c +@@ -320,7 +320,8 @@ void dev_pm_arm_wake_irq(struct wake_irq + return; + + if (device_may_wakeup(wirq->dev)) { +- if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED) ++ if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED && ++ !pm_runtime_status_suspended(wirq->dev)) + enable_irq(wirq->irq); + + enable_irq_wake(wirq->irq); +@@ -342,7 +343,8 @@ void dev_pm_disarm_wake_irq(struct wake_ + if (device_may_wakeup(wirq->dev)) { + disable_irq_wake(wirq->irq); + +- if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED) ++ if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED && ++ !pm_runtime_status_suspended(wirq->dev)) + disable_irq_nosync(wirq->irq); + } + } diff --git a/queue-4.9/series b/queue-4.9/series index a206d1de2f4..9ed101829ae 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -1 +1,3 @@ s390-bpf-fix-optimizing-out-zero-extensions.patch +pm-wakeirq-fix-unbalanced-irq-enable-for-wakeirq.patch +crypto-talitos-fix-max-key-size-for-sha384-and-sha512.patch