Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2018-01-12 16:12:14 +0100
committerJohannes Thumshirn <jthumshirn@suse.de>2018-01-12 16:12:16 +0100
commit30f19984d53a8ec58879df89e1e20af169a55e4c (patch)
tree071df1a9360a762f621359064b32dd18cb264ba2
parent0e5402c9dc3ff10489b8e5c387749f125e445079 (diff)
s390/disassembler: add missing end marker for e7 table
(bnc#1072915, LTC#162117).
-rw-r--r--patches.arch/s390-sles15-02-03-dis-end-marker.patch56
-rw-r--r--series.conf1
2 files changed, 57 insertions, 0 deletions
diff --git a/patches.arch/s390-sles15-02-03-dis-end-marker.patch b/patches.arch/s390-sles15-02-03-dis-end-marker.patch
new file mode 100644
index 0000000000..ff57d5c961
--- /dev/null
+++ b/patches.arch/s390-sles15-02-03-dis-end-marker.patch
@@ -0,0 +1,56 @@
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+Subject: s390/disassembler: add missing end marker for e7 table
+Patch-mainline: v4.15-rc1
+Git-commit: 5c50538752af7968f53924b22dede8ed4ce4cb3b
+References: bnc#1072915, LTC#162117
+
+Description: disassembler: missing end marker
+Symptom: Kernel crashes or emits wrong disassembly.
+Problem: The e7 opcode table does not have an end marker. Hence
+ when trying to find an unknown e7 instruction the code
+ will access memory behind the table until it finds
+ something that matches the opcode, or the kernel
+ crashes, whatever comes first.
+ This affects not only the in-kernel disassembler but
+ also uprobes and kprobes which refuse to set a probe on
+ unknown instructions, and therefore search the opcode
+ tables to figure out if instructions are known or not.
+Solution: Add missing end marker.
+Reproduction: -
+
+Upstream-Description:
+
+ s390/disassembler: add missing end marker for e7 table
+
+ The e7 opcode table does not have an end marker. Hence when trying to
+ find an unknown e7 instruction the code will access memory behind the
+ table until it finds something that matches the opcode, or the kernel
+ crashes, whatever comes first.
+
+ This affects not only the in-kernel disassembler but also uprobes and
+ kprobes which refuse to set a probe on unknown instructions, and
+ therefore search the opcode tables to figure out if instructions are
+ known or not.
+
+ Cc: <stable@vger.kernel.org> # v3.18+
+ Fixes: 3585cb0280654 ("s390/disassembler: add vector instructions")
+ Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+ Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+
+Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
+---
+ arch/s390/kernel/dis.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/s390/kernel/dis.c
++++ b/arch/s390/kernel/dis.c
+@@ -1548,6 +1548,7 @@ static struct s390_insn opcode_e7[] = {
+ { "vfsq", 0xce, INSTR_VRR_VV000MM },
+ { "vfs", 0xe2, INSTR_VRR_VVV00MM },
+ { "vftci", 0x4a, INSTR_VRI_VVIMM },
++ { "", 0, INSTR_INVALID }
+ };
+
+ static struct s390_insn opcode_eb[] = {
diff --git a/series.conf b/series.conf
index 4dccfa6245..8bc0889939 100644
--- a/series.conf
+++ b/series.conf
@@ -5714,6 +5714,7 @@
patches.drivers/net-mlx5e-Set-page-to-null-in-case-dma-mapping-fails.patch
patches.drivers/net-mlx5e-Increase-Striding-RQ-minimum-size-limit-to.patch
patches.drivers/mmc-sdhci-pci-remove-outdated-declaration
+ patches.arch/s390-sles15-02-03-dis-end-marker.patch
patches.arch/s390-sles15-00-10-01-kernel-sthyi-reorganize-sthyi-implementation.patch
patches.arch/s390-sles15-00-10-02-kernel-sthyi-add-cache-to-store-hypervisor-info.patch
patches.arch/s390-sles15-00-10-03-kernel-sthyi-add-s390_sthyi-system-call.patch