]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Aug 2024 12:24:51 +0000 (14:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Aug 2024 12:24:51 +0000 (14:24 +0200)
added patches:
drm-bridge-analogix_dp-properly-handle-zero-sized-aux-transactions.patch
drm-mgag200-set-ddc-timeout-in-milliseconds.patch

queue-5.10/drm-bridge-analogix_dp-properly-handle-zero-sized-aux-transactions.patch [new file with mode: 0644]
queue-5.10/drm-mgag200-set-ddc-timeout-in-milliseconds.patch [new file with mode: 0644]
queue-5.10/kcov-properly-check-for-softirq-context.patch [deleted file]
queue-5.10/series

diff --git a/queue-5.10/drm-bridge-analogix_dp-properly-handle-zero-sized-aux-transactions.patch b/queue-5.10/drm-bridge-analogix_dp-properly-handle-zero-sized-aux-transactions.patch
new file mode 100644 (file)
index 0000000..7f91857
--- /dev/null
@@ -0,0 +1,58 @@
+From e82290a2e0e8ec5e836ecad1ca025021b3855c2d Mon Sep 17 00:00:00 2001
+From: Lucas Stach <l.stach@pengutronix.de>
+Date: Mon, 18 Mar 2024 21:39:23 +0100
+Subject: drm/bridge: analogix_dp: properly handle zero sized AUX transactions
+
+From: Lucas Stach <l.stach@pengutronix.de>
+
+commit e82290a2e0e8ec5e836ecad1ca025021b3855c2d upstream.
+
+Address only transactions without any data are valid and should not
+be flagged as short transactions. Simply return the message size when
+no transaction errors occured.
+
+CC: stable@vger.kernel.org
+Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
+Reviewed-by: Robert Foss <rfoss@kernel.org>
+Signed-off-by: Robert Foss <rfoss@kernel.org>
+Link: https://patchwork.freedesktop.org/patch/msgid/20240318203925.2837689-1-l.stach@pengutronix.de
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c |    5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
++++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
+@@ -1115,7 +1115,6 @@ ssize_t analogix_dp_transfer(struct anal
+       u32 status_reg;
+       u8 *buffer = msg->buffer;
+       unsigned int i;
+-      int num_transferred = 0;
+       int ret;
+       /* Buffer size of AUX CH is 16 bytes */
+@@ -1167,7 +1166,6 @@ ssize_t analogix_dp_transfer(struct anal
+                       reg = buffer[i];
+                       writel(reg, dp->reg_base + ANALOGIX_DP_BUF_DATA_0 +
+                              4 * i);
+-                      num_transferred++;
+               }
+       }
+@@ -1215,7 +1213,6 @@ ssize_t analogix_dp_transfer(struct anal
+                       reg = readl(dp->reg_base + ANALOGIX_DP_BUF_DATA_0 +
+                                   4 * i);
+                       buffer[i] = (unsigned char)reg;
+-                      num_transferred++;
+               }
+       }
+@@ -1232,7 +1229,7 @@ ssize_t analogix_dp_transfer(struct anal
+                (msg->request & ~DP_AUX_I2C_MOT) == DP_AUX_NATIVE_READ)
+               msg->reply = DP_AUX_NATIVE_REPLY_ACK;
+-      return num_transferred > 0 ? num_transferred : -EBUSY;
++      return msg->size;
+ aux_error:
+       /* if aux err happen, reset aux */
diff --git a/queue-5.10/drm-mgag200-set-ddc-timeout-in-milliseconds.patch b/queue-5.10/drm-mgag200-set-ddc-timeout-in-milliseconds.patch
new file mode 100644 (file)
index 0000000..29b33b8
--- /dev/null
@@ -0,0 +1,41 @@
+From ecde5db1598aecab54cc392282c15114f526f05f Mon Sep 17 00:00:00 2001
+From: Thomas Zimmermann <tzimmermann@suse.de>
+Date: Mon, 13 May 2024 14:51:06 +0200
+Subject: drm/mgag200: Set DDC timeout in milliseconds
+
+From: Thomas Zimmermann <tzimmermann@suse.de>
+
+commit ecde5db1598aecab54cc392282c15114f526f05f upstream.
+
+Compute the i2c timeout in jiffies from a value in milliseconds. The
+original values of 2 jiffies equals 2 milliseconds if HZ has been
+configured to a value of 1000. This corresponds to 2.2 milliseconds
+used by most other DRM drivers. Update mgag200 accordingly.
+
+Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
+Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
+Fixes: 414c45310625 ("mgag200: initial g200se driver (v2)")
+Cc: Dave Airlie <airlied@redhat.com>
+Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
+Cc: Maxime Ripard <mripard@kernel.org>
+Cc: Thomas Zimmermann <tzimmermann@suse.de>
+Cc: Jocelyn Falempe <jfalempe@redhat.com>
+Cc: dri-devel@lists.freedesktop.org
+Cc: <stable@vger.kernel.org> # v3.5+
+Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-2-tzimmermann@suse.de
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/mgag200/mgag200_i2c.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/mgag200/mgag200_i2c.c
++++ b/drivers/gpu/drm/mgag200/mgag200_i2c.c
+@@ -134,7 +134,7 @@ struct mga_i2c_chan *mgag200_i2c_create(
+       i2c->adapter.algo_data = &i2c->bit;
+       i2c->bit.udelay = 10;
+-      i2c->bit.timeout = 2;
++      i2c->bit.timeout = usecs_to_jiffies(2200);
+       i2c->bit.data = i2c;
+       i2c->bit.setsda         = mga_gpio_setsda;
+       i2c->bit.setscl         = mga_gpio_setscl;
diff --git a/queue-5.10/kcov-properly-check-for-softirq-context.patch b/queue-5.10/kcov-properly-check-for-softirq-context.patch
deleted file mode 100644 (file)
index f07cf9d..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-From 7d4df2dad312f270d62fecb0e5c8b086c6d7dcfc Mon Sep 17 00:00:00 2001
-From: Andrey Konovalov <andreyknvl@gmail.com>
-Date: Mon, 29 Jul 2024 04:21:58 +0200
-Subject: kcov: properly check for softirq context
-
-From: Andrey Konovalov <andreyknvl@gmail.com>
-
-commit 7d4df2dad312f270d62fecb0e5c8b086c6d7dcfc upstream.
-
-When collecting coverage from softirqs, KCOV uses in_serving_softirq() to
-check whether the code is running in the softirq context.  Unfortunately,
-in_serving_softirq() is > 0 even when the code is running in the hardirq
-or NMI context for hardirqs and NMIs that happened during a softirq.
-
-As a result, if a softirq handler contains a remote coverage collection
-section and a hardirq with another remote coverage collection section
-happens during handling the softirq, KCOV incorrectly detects a nested
-softirq coverate collection section and prints a WARNING, as reported by
-syzbot.
-
-This issue was exposed by commit a7f3813e589f ("usb: gadget: dummy_hcd:
-Switch to hrtimer transfer scheduler"), which switched dummy_hcd to using
-hrtimer and made the timer's callback be executed in the hardirq context.
-
-Change the related checks in KCOV to account for this behavior of
-in_serving_softirq() and make KCOV ignore remote coverage collection
-sections in the hardirq and NMI contexts.
-
-This prevents the WARNING printed by syzbot but does not fix the inability
-of KCOV to collect coverage from the __usb_hcd_giveback_urb when dummy_hcd
-is in use (caused by a7f3813e589f); a separate patch is required for that.
-
-Link: https://lkml.kernel.org/r/20240729022158.92059-1-andrey.konovalov@linux.dev
-Fixes: 5ff3b30ab57d ("kcov: collect coverage from interrupts")
-Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
-Reported-by: syzbot+2388cdaeb6b10f0c13ac@syzkaller.appspotmail.com
-Closes: https://syzkaller.appspot.com/bug?extid=2388cdaeb6b10f0c13ac
-Acked-by: Marco Elver <elver@google.com>
-Cc: Alan Stern <stern@rowland.harvard.edu>
-Cc: Aleksandr Nogikh <nogikh@google.com>
-Cc: Alexander Potapenko <glider@google.com>
-Cc: Dmitry Vyukov <dvyukov@google.com>
-Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Cc: Marcello Sylvester Bauer <sylv@sylv.io>
-Cc: <stable@vger.kernel.org>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- kernel/kcov.c |   15 ++++++++++++---
- 1 file changed, 12 insertions(+), 3 deletions(-)
-
---- a/kernel/kcov.c
-+++ b/kernel/kcov.c
-@@ -151,6 +151,15 @@ static void kcov_remote_area_put(struct
-       list_add(&area->list, &kcov_remote_areas);
- }
-+/*
-+ * Unlike in_serving_softirq(), this function returns false when called during
-+ * a hardirq or an NMI that happened in the softirq context.
-+ */
-+static inline bool in_softirq_really(void)
-+{
-+      return in_serving_softirq() && !in_hardirq() && !in_nmi();
-+}
-+
- static notrace bool check_kcov_mode(enum kcov_mode needed_mode, struct task_struct *t)
- {
-       unsigned int mode;
-@@ -160,7 +169,7 @@ static notrace bool check_kcov_mode(enum
-        * so we ignore code executed in interrupts, unless we are in a remote
-        * coverage collection section in a softirq.
-        */
--      if (!in_task() && !(in_serving_softirq() && t->kcov_softirq))
-+      if (!in_task() && !(in_softirq_really() && t->kcov_softirq))
-               return false;
-       mode = READ_ONCE(t->kcov_mode);
-       /*
-@@ -822,7 +831,7 @@ void kcov_remote_start(u64 handle)
-       if (WARN_ON(!kcov_check_handle(handle, true, true, true)))
-               return;
--      if (!in_task() && !in_serving_softirq())
-+      if (!in_task() && !in_softirq_really())
-               return;
-       local_irq_save(flags);
-@@ -963,7 +972,7 @@ void kcov_remote_stop(void)
-       int sequence;
-       unsigned long flags;
--      if (!in_task() && !in_serving_softirq())
-+      if (!in_task() && !in_softirq_really())
-               return;
-       local_irq_save(flags);
index 36c83001bfcb278083ba10433b803d16403e10d6..e2b543b2bfd46be7eaafdc5d11d8e998ac3e0b01 100644 (file)
@@ -327,7 +327,6 @@ scsi-mpt3sas-avoid-iommu-page-faults-on-report-zones.patch
 irqchip-meson-gpio-support-more-than-8-channels-gpio.patch
 irqchip-meson-gpio-convert-meson_gpio_irq_controller.patch
 serial-core-check-uartclk-for-zero-to-avoid-divide-by-zero.patch
-kcov-properly-check-for-softirq-context.patch
 irqchip-xilinx-fix-shift-out-of-bounds.patch
 genirq-irqdesc-honor-caller-provided-affinity-in-alloc_desc.patch
 power-supply-axp288_charger-fix-constant_charge_voltage-writes.patch
@@ -335,3 +334,5 @@ power-supply-axp288_charger-round-constant_charge_voltage-writes-down.patch
 tracing-fix-overflow-in-get_free_elt.patch
 padata-fix-possible-divide-by-0-panic-in-padata_mt_helper.patch
 x86-mtrr-check-if-fixed-mtrrs-exist-before-saving-them.patch
+drm-bridge-analogix_dp-properly-handle-zero-sized-aux-transactions.patch
+drm-mgag200-set-ddc-timeout-in-milliseconds.patch