]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jun 2020 08:00:57 +0000 (10:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jun 2020 08:00:57 +0000 (10:00 +0200)
added patches:
drm-i915-icl-fix-hotplug-interrupt-disabling-after-storm-detection.patch
drm-i915-whitelist-context-local-timestamp-in-the-gen9-cmdparser.patch
s390-fix-syscall_get_error-for-compat-processes.patch

queue-4.19/drm-i915-icl-fix-hotplug-interrupt-disabling-after-storm-detection.patch [new file with mode: 0644]
queue-4.19/drm-i915-whitelist-context-local-timestamp-in-the-gen9-cmdparser.patch [new file with mode: 0644]
queue-4.19/s390-fix-syscall_get_error-for-compat-processes.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/drm-i915-icl-fix-hotplug-interrupt-disabling-after-storm-detection.patch b/queue-4.19/drm-i915-icl-fix-hotplug-interrupt-disabling-after-storm-detection.patch
new file mode 100644 (file)
index 0000000..93f6c87
--- /dev/null
@@ -0,0 +1,41 @@
+From a3005c2edf7e8c3478880db1ca84028a2b6819bb Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@intel.com>
+Date: Fri, 12 Jun 2020 15:17:31 +0300
+Subject: drm/i915/icl+: Fix hotplug interrupt disabling after storm detection
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Imre Deak <imre.deak@intel.com>
+
+commit a3005c2edf7e8c3478880db1ca84028a2b6819bb upstream.
+
+Atm, hotplug interrupts on TypeC ports are left enabled after detecting
+an interrupt storm, fix this.
+
+Reported-by: Kunal Joshi <kunal1.joshi@intel.com>
+References: https://gitlab.freedesktop.org/drm/intel/-/issues/351
+Bugzilla: https://gitlab.freedesktop.org/drm/intel/-/issues/1964
+Cc: Kunal Joshi <kunal1.joshi@intel.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Imre Deak <imre.deak@intel.com>
+Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20200612121731.19596-1-imre.deak@intel.com
+(cherry picked from commit 587a87b9d7e94927edcdea018565bc1939381eb1)
+Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/i915_irq.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/i915/i915_irq.c
++++ b/drivers/gpu/drm/i915/i915_irq.c
+@@ -3821,6 +3821,7 @@ static void gen11_hpd_irq_setup(struct d
+       val = I915_READ(GEN11_DE_HPD_IMR);
+       val &= ~hotplug_irqs;
++      val |= ~enabled_irqs & hotplug_irqs;
+       I915_WRITE(GEN11_DE_HPD_IMR, val);
+       POSTING_READ(GEN11_DE_HPD_IMR);
diff --git a/queue-4.19/drm-i915-whitelist-context-local-timestamp-in-the-gen9-cmdparser.patch b/queue-4.19/drm-i915-whitelist-context-local-timestamp-in-the-gen9-cmdparser.patch
new file mode 100644 (file)
index 0000000..0c160da
--- /dev/null
@@ -0,0 +1,46 @@
+From 273500ae71711c040d258a7b3f4b6f44c368fff2 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Mon, 1 Jun 2020 17:19:42 +0100
+Subject: drm/i915: Whitelist context-local timestamp in the gen9 cmdparser
+
+From: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 273500ae71711c040d258a7b3f4b6f44c368fff2 upstream.
+
+Allow batch buffers to read their own _local_ cumulative HW runtime of
+their logical context.
+
+Fixes: 0f2f39758341 ("drm/i915: Add gen9 BCS cmdparsing")
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
+Cc: <stable@vger.kernel.org> # v5.4+
+Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20200601161942.30854-1-chris@chris-wilson.co.uk
+(cherry picked from commit f9496520df11de00fbafc3cbd693b9570d600ab3)
+Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/i915_cmd_parser.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/gpu/drm/i915/i915_cmd_parser.c
++++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
+@@ -570,6 +570,9 @@ struct drm_i915_reg_descriptor {
+ #define REG32(_reg, ...) \
+       { .addr = (_reg), __VA_ARGS__ }
++#define REG32_IDX(_reg, idx) \
++      { .addr = _reg(idx) }
++
+ /*
+  * Convenience macro for adding 64-bit registers.
+  *
+@@ -667,6 +670,7 @@ static const struct drm_i915_reg_descrip
+       REG64_IDX(RING_TIMESTAMP, BSD_RING_BASE),
+       REG32(BCS_SWCTRL),
+       REG64_IDX(RING_TIMESTAMP, BLT_RING_BASE),
++      REG32_IDX(RING_CTX_TIMESTAMP, BLT_RING_BASE),
+       REG64_IDX(BCS_GPR, 0),
+       REG64_IDX(BCS_GPR, 1),
+       REG64_IDX(BCS_GPR, 2),
diff --git a/queue-4.19/s390-fix-syscall_get_error-for-compat-processes.patch b/queue-4.19/s390-fix-syscall_get_error-for-compat-processes.patch
new file mode 100644 (file)
index 0000000..7457d44
--- /dev/null
@@ -0,0 +1,56 @@
+From b3583fca5fb654af2cfc1c08259abb9728272538 Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <ldv@altlinux.org>
+Date: Tue, 2 Jun 2020 21:00:51 +0300
+Subject: s390: fix syscall_get_error for compat processes
+
+From: Dmitry V. Levin <ldv@altlinux.org>
+
+commit b3583fca5fb654af2cfc1c08259abb9728272538 upstream.
+
+If both the tracer and the tracee are compat processes, and gprs[2]
+is assigned a value by __poke_user_compat, then the higher 32 bits
+of gprs[2] are cleared, IS_ERR_VALUE() always returns false, and
+syscall_get_error() always returns 0.
+
+Fix the implementation by sign-extending the value for compat processes
+the same way as x86 implementation does.
+
+The bug was exposed to user space by commit 201766a20e30f ("ptrace: add
+PTRACE_GET_SYSCALL_INFO request") and detected by strace test suite.
+
+This change fixes strace syscall tampering on s390.
+
+Link: https://lkml.kernel.org/r/20200602180051.GA2427@altlinux.org
+Fixes: 753c4dd6a2fa2 ("[S390] ptrace changes")
+Cc: Elvira Khabirova <lineprinter@altlinux.org>
+Cc: stable@vger.kernel.org # v2.6.28+
+Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
+Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/s390/include/asm/syscall.h |   12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+--- a/arch/s390/include/asm/syscall.h
++++ b/arch/s390/include/asm/syscall.h
+@@ -38,7 +38,17 @@ static inline void syscall_rollback(stru
+ static inline long syscall_get_error(struct task_struct *task,
+                                    struct pt_regs *regs)
+ {
+-      return IS_ERR_VALUE(regs->gprs[2]) ? regs->gprs[2] : 0;
++      unsigned long error = regs->gprs[2];
++#ifdef CONFIG_COMPAT
++      if (test_tsk_thread_flag(task, TIF_31BIT)) {
++              /*
++               * Sign-extend the value so (int)-EFOO becomes (long)-EFOO
++               * and will match correctly in comparisons.
++               */
++              error = (long)(int)error;
++      }
++#endif
++      return IS_ERR_VALUE(error) ? error : 0;
+ }
+ static inline long syscall_get_return_value(struct task_struct *task,
index fccf15e1fea4351df08fd33bccb9d7c166cab447..ac45a1d518d9a50337988aae54e877561be127fc 100644 (file)
@@ -192,3 +192,6 @@ mtd-rawnand-socrates-fix-the-probe-error-path.patch
 mtd-rawnand-plat_nand-fix-the-probe-error-path.patch
 mtd-rawnand-mtk-fix-the-probe-error-path.patch
 mtd-rawnand-tmio-fix-the-probe-error-path.patch
+s390-fix-syscall_get_error-for-compat-processes.patch
+drm-i915-whitelist-context-local-timestamp-in-the-gen9-cmdparser.patch
+drm-i915-icl-fix-hotplug-interrupt-disabling-after-storm-detection.patch