diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-07-03 23:11:06 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-07-03 23:11:06 -0400 |
commit | 88122cdaec26febb43ccff5e738f44b2dbfb52bf (patch) | |
tree | bac4f53045b500718f6f7814d74177b66ab69824 | |
parent | 196b32dbb5969d8517ac982ade2bad71a1638204 (diff) | |
download | longterm-queue-4.12-88122cdaec26febb43ccff5e738f44b2dbfb52bf.tar.gz |
ARM: drop already applied BUG patch
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/ARM-BUG-if-jumping-to-usermode-address-in-kernel-mod.patch | 84 | ||||
-rw-r--r-- | queue/series | 1 |
2 files changed, 0 insertions, 85 deletions
diff --git a/queue/ARM-BUG-if-jumping-to-usermode-address-in-kernel-mod.patch b/queue/ARM-BUG-if-jumping-to-usermode-address-in-kernel-mod.patch deleted file mode 100644 index ba59377..0000000 --- a/queue/ARM-BUG-if-jumping-to-usermode-address-in-kernel-mod.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 8bafae202c82dc257f649ea3c275a0f35ee15113 Mon Sep 17 00:00:00 2001 -From: Russell King <rmk+kernel@armlinux.org.uk> -Date: Fri, 24 Nov 2017 23:49:34 +0000 -Subject: [PATCH] ARM: BUG if jumping to usermode address in kernel mode - -commit 8bafae202c82dc257f649ea3c275a0f35ee15113 upstream. - -Detect if we are returning to usermode via the normal kernel exit paths -but the saved PSR value indicates that we are in kernel mode. This -could occur due to corrupted stack state, which has been observed with -"ftracetest". - -This ensures that we catch the problem case before we get to user code. - -Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> - -diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h -index ad301f107dd2..bc8d4bbd82e2 100644 ---- a/arch/arm/include/asm/assembler.h -+++ b/arch/arm/include/asm/assembler.h -@@ -518,4 +518,22 @@ THUMB( orr \reg , \reg , #PSR_T_BIT ) - #endif - .endm - -+ .macro bug, msg, line -+#ifdef CONFIG_THUMB2_KERNEL -+1: .inst 0xde02 -+#else -+1: .inst 0xe7f001f2 -+#endif -+#ifdef CONFIG_DEBUG_BUGVERBOSE -+ .pushsection .rodata.str, "aMS", %progbits, 1 -+2: .asciz "\msg" -+ .popsection -+ .pushsection __bug_table, "aw" -+ .align 2 -+ .word 1b, 2b -+ .hword \line -+ .popsection -+#endif -+ .endm -+ - #endif /* __ASM_ASSEMBLER_H__ */ -diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S -index 6391728c8f03..75f7a4e8541a 100644 ---- a/arch/arm/kernel/entry-header.S -+++ b/arch/arm/kernel/entry-header.S -@@ -299,6 +299,8 @@ - mov r2, sp - ldr r1, [r2, #\offset + S_PSR] @ get calling cpsr - ldr lr, [r2, #\offset + S_PC]! @ get pc -+ tst r1, #0xcf -+ bne 1f - msr spsr_cxsf, r1 @ save in spsr_svc - #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K) - @ We must avoid clrex due to Cortex-A15 erratum #830321 -@@ -313,6 +315,7 @@ - @ after ldm {}^ - add sp, sp, #\offset + PT_REGS_SIZE - movs pc, lr @ return & move spsr_svc into cpsr -+1: bug "Returning to usermode but unexpected PSR bits set?", \@ - #elif defined(CONFIG_CPU_V7M) - @ V7M restore. - @ Note that we don't need to do clrex here as clearing the local -@@ -328,6 +331,8 @@ - ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr - ldr lr, [sp, #\offset + S_PC] @ get pc - add sp, sp, #\offset + S_SP -+ tst r1, #0xcf -+ bne 1f - msr spsr_cxsf, r1 @ save in spsr_svc - - @ We must avoid clrex due to Cortex-A15 erratum #830321 -@@ -340,6 +345,7 @@ - .endif - add sp, sp, #PT_REGS_SIZE - S_SP - movs pc, lr @ return & move spsr_svc into cpsr -+1: bug "Returning to usermode but unexpected PSR bits set?", \@ - #endif /* !CONFIG_THUMB2_KERNEL */ - .endm - --- -2.15.0 - diff --git a/queue/series b/queue/series index 564cb99..807efdc 100644 --- a/queue/series +++ b/queue/series @@ -61,7 +61,6 @@ crypto-talitos-fix-setkey-to-check-key-weakness.patch crypto-talitos-fix-AEAD-for-sha224-on-non-sha224-cap.patch crypto-talitos-fix-use-of-sg_link_tbl_len.patch crypto-talitos-fix-ctr-aes-talitos.patch -ARM-BUG-if-jumping-to-usermode-address-in-kernel-mod.patch ARM-avoid-faulting-on-qemu.patch irqchip-qcom-Fix-u32-comparison-with-value-less-than.patch kbuild-pkg-use-transform-option-to-prefix-paths-in-t.patch |