]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 12:56:26 +0000 (13:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 12:56:26 +0000 (13:56 +0100)
added patches:
serial-fixup-backport-of-serial-deassert-transmit-enable-on-probe-in-driver-specific-way.patch

queue-5.15/selftests-vm-pkeys-add-a-regression-test-for-setting-pkru-through-ptrace.patch
queue-5.15/serial-fixup-backport-of-serial-deassert-transmit-enable-on-probe-in-driver-specific-way.patch [new file with mode: 0644]
queue-5.15/series
queue-5.15/x86-fpu-add-a-pkru-argument-to-copy_uabi_from_kernel_to_xstate.patch
queue-5.15/x86-fpu-add-a-pkru-argument-to-copy_uabi_to_xstate.patch
queue-5.15/x86-fpu-allow-pkru-to-be-once-again-written-by-ptrace.patch
queue-5.15/x86-fpu-emulate-xrstor-s-behavior-if-the-xfeatures-pkru-bit-is-not-set.patch
queue-5.15/x86-fpu-take-task_struct-in-copy_sigframe_from_user_to_xstate.patch

index 01fa7210954ee7acaa92383393ecb74095caeb3e..4162f5dbb8f130585be0b25aa10073496b0a8e5a 100644 (file)
@@ -8,9 +8,7 @@ Message-ID: <20230109210214.71068-7-khuey@kylehuey.com>
 
 From: Kyle Huey <me@kylehuey.com>
 
-From: Kyle Huey <me@kylehuey.com>
-
-commit 6ea25770b043 upstream
+commit 6ea25770b043c7997ab21d1ce95ba5de4d3d85d9 upstream
 
 This tests PTRACE_SETREGSET with NT_X86_XSTATE modifying PKRU directly and
 removing the PKRU bit from XSTATE_BV.
diff --git a/queue-5.15/serial-fixup-backport-of-serial-deassert-transmit-enable-on-probe-in-driver-specific-way.patch b/queue-5.15/serial-fixup-backport-of-serial-deassert-transmit-enable-on-probe-in-driver-specific-way.patch
new file mode 100644 (file)
index 0000000..13e1792
--- /dev/null
@@ -0,0 +1,60 @@
+From linux@rasmusvillemoes.dk  Thu Jan 12 13:40:41 2023
+From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
+Date: Thu, 22 Dec 2022 12:44:14 +0100
+Subject: serial: fixup backport of "serial: Deassert Transmit Enable on probe in driver-specific way"
+To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>, "Jiri Slaby" <jirislaby@kernel.org>, "Lukas Wunner" <lukas@wunner.de>, "Dominique Martinet" <dominique.martinet@atmark-techno.com>, "Daisuke Mizobuchi" <mizo@atmark-techno.com>, "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
+Cc: linux-serial@vger.kernel.org, stable@vger.kernel.org, Rasmus Villemoes <linux@rasmusvillemoes.dk>
+Message-ID: <20221222114414.1886632-1-linux@rasmusvillemoes.dk>
+
+From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
+
+When 7c7f9bc986e6 ("serial: Deassert Transmit Enable on probe in
+driver-specific way") got backported to 5.15.y, there known as
+b079d3775237, some hunks were accidentally left out.
+
+In fsl_lpuart.c, this amounts to uart_remove_one_port() being called
+in an error path despite uart_add_one_port() not having been called.
+
+In serial_core.c, it is possible that the omission in
+uart_suspend_port() is harmless, but the backport did have the
+corresponding hunk in uart_resume_port(), it runs counter to the
+original commit's intention of
+
+  Skip any invocation of ->set_mctrl() if RS485 is enabled.
+
+and it's certainly better to be aligned with upstream.
+
+Fixes: b079d3775237 ("serial: Deassert Transmit Enable on probe in driver-specific way")
+Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
+Reviewed-by: Dominique MARTINET <dominique.martinet@atmark-techno.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/fsl_lpuart.c  |    2 +-
+ drivers/tty/serial/serial_core.c |    3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/tty/serial/fsl_lpuart.c
++++ b/drivers/tty/serial/fsl_lpuart.c
+@@ -2784,9 +2784,9 @@ static int lpuart_probe(struct platform_
+       return 0;
+ failed_irq_request:
+-failed_get_rs485:
+       uart_remove_one_port(&lpuart_reg, &sport->port);
+ failed_attach_port:
++failed_get_rs485:
+ failed_reset:
+       lpuart_disable_clks(sport);
+       return ret;
+--- a/drivers/tty/serial/serial_core.c
++++ b/drivers/tty/serial/serial_core.c
+@@ -2225,7 +2225,8 @@ int uart_suspend_port(struct uart_driver
+               spin_lock_irq(&uport->lock);
+               ops->stop_tx(uport);
+-              ops->set_mctrl(uport, 0);
++              if (!(uport->rs485.flags & SER_RS485_ENABLED))
++                      ops->set_mctrl(uport, 0);
+               ops->stop_rx(uport);
+               spin_unlock_irq(&uport->lock);
index d74ee0a8d3b7d9aba7803c978e9436d1bc0a6c46..227bb825ad4b6e68de58b41bd431ec05646a19cf 100644 (file)
@@ -5,3 +5,4 @@ x86-fpu-add-a-pkru-argument-to-copy_uabi_to_xstate.patch
 x86-fpu-allow-pkru-to-be-once-again-written-by-ptrace.patch
 x86-fpu-emulate-xrstor-s-behavior-if-the-xfeatures-pkru-bit-is-not-set.patch
 selftests-vm-pkeys-add-a-regression-test-for-setting-pkru-through-ptrace.patch
+serial-fixup-backport-of-serial-deassert-transmit-enable-on-probe-in-driver-specific-way.patch
index d9e6fdb885520a83db7cc4843eb8eafe3f9e298f..ee296cf1a51d29ad9f63ad666215545761dbf610 100644 (file)
@@ -8,9 +8,7 @@ Message-ID: <20230109210214.71068-3-khuey@kylehuey.com>
 
 From: Kyle Huey <me@kylehuey.com>
 
-From: Kyle Huey <me@kylehuey.com>
-
-commit 1c813ce03055 upstream
+commit 1c813ce0305571e1b2e4cc4acca451da9e6ad18f upstream
 
 ptrace (through PTRACE_SETREGSET with NT_X86_XSTATE) ultimately calls
 copy_uabi_from_kernel_to_xstate(). In preparation for eventually handling
index 3647345a54a184dc22efe472d0edf6e6ac35a8f6..e8a3229c410725180a6b2915e11539b4ac1ee30e 100644 (file)
@@ -8,9 +8,7 @@ Message-ID: <20230109210214.71068-4-khuey@kylehuey.com>
 
 From: Kyle Huey <me@kylehuey.com>
 
-From: Kyle Huey <me@kylehuey.com>
-
-commit 2c87767c35ee upstream
+commit 2c87767c35ee9744f666ccec869d5fe742c3de0a upstream
 
 In preparation for adding PKRU handling code into copy_uabi_to_xstate(),
 add an argument that copy_uabi_from_kernel_to_xstate() can use to pass the
index 7544095c3402f1aa4d2a09f707afffc6df1943f3..c9f33c842cd556cbd64a482adbad59dd1f4e30d1 100644 (file)
@@ -8,9 +8,7 @@ Message-ID: <20230109210214.71068-5-khuey@kylehuey.com>
 
 From: Kyle Huey <me@kylehuey.com>
 
-From: Kyle Huey <me@kylehuey.com>
-
-commit 4a804c4f8356 upstream
+commit 4a804c4f8356393d6b5eff7600f07615d7869c13 upstream
 
 Handle PKRU in copy_uabi_to_xstate() for the benefit of APIs that write
 the XSTATE such as PTRACE_SETREGSET with NT_X86_XSTATE.
index 1a436a368d40273293999e982f92db48770fa1de..77ad03f415b293299d699e725b1408e2d485e5b6 100644 (file)
@@ -8,9 +8,7 @@ Message-ID: <20230109210214.71068-6-khuey@kylehuey.com>
 
 From: Kyle Huey <me@kylehuey.com>
 
-From: Kyle Huey <me@kylehuey.com>
-
-commit d7e5aceace51 upstream
+commit d7e5aceace514a2b1b3ca3dc44f93f1704766ca7 upstream
 
 The hardware XRSTOR instruction resets the PKRU register to its hardware
 init value (namely 0) if the PKRU bit is not set in the xfeatures mask.
index 3eef25b3a3da80c94d2f2168fee3e5a4280d929d..0e9f9e137a2fa3742ef29b386d5a02ffd814a34d 100644 (file)
@@ -8,9 +8,7 @@ Message-ID: <20230109210214.71068-2-khuey@kylehuey.com>
 
 From: Kyle Huey <me@kylehuey.com>
 
-From: Kyle Huey <me@kylehuey.com>
-
-commit 6a877d2450ac upstream
+commit 6a877d2450ace4f27c012519e5a1ae818f931983 upstream
 
 This will allow copy_sigframe_from_user_to_xstate() to grab the address of
 thread_struct's pkru value in a later patch.