aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-30 11:23:04 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-30 11:23:04 +0200
commit407c135aa295a6b60d54743a78ce730d5690daa7 (patch)
tree2f8d3b3c23eb1ffcacef4ac9ecb279c6fca13d62
parent3b71a58f475c65cc99db0d5e145e9ef365d413cf (diff)
downloadstable-queue-407c135aa295a6b60d54743a78ce730d5690daa7.tar.gz
5.10-stable patches
added patches: riscv-disable-stackprotector_per_task-if-gcc_plugin_randstruct-is-enabled.patch serial-core-fix-kernel-doc-for-uart_port_unlock_irqrestore.patch
-rw-r--r--queue-5.10/riscv-disable-stackprotector_per_task-if-gcc_plugin_randstruct-is-enabled.patch37
-rw-r--r--queue-5.10/serial-core-fix-kernel-doc-for-uart_port_unlock_irqrestore.patch38
-rw-r--r--queue-5.10/series2
3 files changed, 77 insertions, 0 deletions
diff --git a/queue-5.10/riscv-disable-stackprotector_per_task-if-gcc_plugin_randstruct-is-enabled.patch b/queue-5.10/riscv-disable-stackprotector_per_task-if-gcc_plugin_randstruct-is-enabled.patch
new file mode 100644
index 0000000000..0df7f7277c
--- /dev/null
+++ b/queue-5.10/riscv-disable-stackprotector_per_task-if-gcc_plugin_randstruct-is-enabled.patch
@@ -0,0 +1,37 @@
+From a18b14d8886614b3c7d290c4cfc33389822b0535 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Tue, 6 Jul 2021 09:26:21 -0700
+Subject: riscv: Disable STACKPROTECTOR_PER_TASK if GCC_PLUGIN_RANDSTRUCT is enabled
+
+From: Guenter Roeck <linux@roeck-us.net>
+
+commit a18b14d8886614b3c7d290c4cfc33389822b0535 upstream.
+
+riscv uses the value of TSK_STACK_CANARY to set
+stack-protector-guard-offset. With GCC_PLUGIN_RANDSTRUCT enabled, that
+value is non-deterministic, and with riscv:allmodconfig often results
+in build errors such as
+
+cc1: error: '8120' is not a valid offset in '-mstack-protector-guard-offset='
+
+Enable STACKPROTECTOR_PER_TASK only if GCC_PLUGIN_RANDSTRUCT is disabled
+to fix the problem.
+
+Fixes: fea2fed201ee5 ("riscv: Enable per-task stack canaries")
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/riscv/Kconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/riscv/Kconfig
++++ b/arch/riscv/Kconfig
+@@ -450,6 +450,7 @@ config CC_HAVE_STACKPROTECTOR_TLS
+
+ config STACKPROTECTOR_PER_TASK
+ def_bool y
++ depends on !GCC_PLUGIN_RANDSTRUCT
+ depends on STACKPROTECTOR && CC_HAVE_STACKPROTECTOR_TLS
+
+ endmenu
diff --git a/queue-5.10/serial-core-fix-kernel-doc-for-uart_port_unlock_irqrestore.patch b/queue-5.10/serial-core-fix-kernel-doc-for-uart_port_unlock_irqrestore.patch
new file mode 100644
index 0000000000..1389deb0bb
--- /dev/null
+++ b/queue-5.10/serial-core-fix-kernel-doc-for-uart_port_unlock_irqrestore.patch
@@ -0,0 +1,38 @@
+From 29bff582b74ed0bdb7e6986482ad9e6799ea4d2f Mon Sep 17 00:00:00 2001
+From: Randy Dunlap <rdunlap@infradead.org>
+Date: Tue, 26 Sep 2023 21:41:28 -0700
+Subject: serial: core: fix kernel-doc for uart_port_unlock_irqrestore()
+
+From: Randy Dunlap <rdunlap@infradead.org>
+
+commit 29bff582b74ed0bdb7e6986482ad9e6799ea4d2f upstream.
+
+Fix the function name to avoid a kernel-doc warning:
+
+include/linux/serial_core.h:666: warning: expecting prototype for uart_port_lock_irqrestore(). Prototype was for uart_port_unlock_irqrestore() instead
+
+Fixes: b0af4bcb4946 ("serial: core: Provide port lock wrappers")
+Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: John Ogness <john.ogness@linutronix.de>
+Cc: linux-serial@vger.kernel.org
+Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: Jiri Slaby <jirislaby@kernel.org>
+Reviewed-by: John Ogness <john.ogness@linutronix.de>
+Link: https://lore.kernel.org/r/20230927044128.4748-1-rdunlap@infradead.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/linux/serial_core.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/linux/serial_core.h
++++ b/include/linux/serial_core.h
+@@ -330,7 +330,7 @@ static inline void uart_port_unlock_irq(
+ }
+
+ /**
+- * uart_port_lock_irqrestore - Unlock the UART port, restore interrupts
++ * uart_port_unlock_irqrestore - Unlock the UART port, restore interrupts
+ * @up: Pointer to UART port structure
+ * @flags: The saved interrupt flags for restore
+ */
diff --git a/queue-5.10/series b/queue-5.10/series
index c8be110384..7af0abfbcc 100644
--- a/queue-5.10/series
+++ b/queue-5.10/series
@@ -134,3 +134,5 @@ i2c-smbus-fix-null-function-pointer-dereference.patch
hid-i2c-hid-remove-i2c_hid_read_pending-flag-to-prevent-lock-up.patch
bounds-use-the-right-number-of-bits-for-power-of-two-config_nr_cpus.patch
udp-preserve-the-connected-status-if-only-udp-cmsg.patch
+serial-core-fix-kernel-doc-for-uart_port_unlock_irqrestore.patch
+riscv-disable-stackprotector_per_task-if-gcc_plugin_randstruct-is-enabled.patch