stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: mark.rutland@arm.com, alex.shi@linaro.org,
	catalin.marinas@arm.com, ghackmann@google.com,
	gregkh@linuxfoundation.org, marc.zyngier@arm.com,
	will.deacon@arm.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "arm64: idmap: Use "awx" flags for .idmap.text .pushsection directives" has been added to the 4.9-stable tree
Date: Thu, 05 Apr 2018 21:42:27 +0200	[thread overview]
Message-ID: <152295734742157@kroah.com> (raw)
In-Reply-To: <20180403110923.43575-28-mark.rutland@arm.com>


This is a note to let you know that I've just added the patch titled

    arm64: idmap: Use "awx" flags for .idmap.text .pushsection directives

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     arm64-idmap-use-awx-flags-for-.idmap.text-.pushsection-directives.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Thu Apr  5 21:39:28 CEST 2018
From: Mark Rutland <mark.rutland@arm.com>
Date: Tue,  3 Apr 2018 12:09:23 +0100
Subject: arm64: idmap: Use "awx" flags for .idmap.text .pushsection directives
To: stable@vger.kernel.org
Cc: mark.brown@linaro.org, ard.biesheuvel@linaro.org, marc.zyngier@arm.com, will.deacon@arm.com
Message-ID: <20180403110923.43575-28-mark.rutland@arm.com>

From: Will Deacon <will.deacon@arm.com>

commit 439e70e27a51 upstream.

The identity map is mapped as both writeable and executable by the
SWAPPER_MM_MMUFLAGS and this is relied upon by the kpti code to manage
a synchronisation flag. Update the .pushsection flags to reflect the
actual mapping attributes.

Reported-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org> [v4.9 backport]
Signed-off-by: Mark Rutland <mark.rutland@arm.com> [v4.9 backport]
Tested-by: Will Deacon <will.deacon@arm.com>
Tested-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm64/kernel/cpu-reset.S |    2 +-
 arch/arm64/kernel/head.S      |    2 +-
 arch/arm64/kernel/sleep.S     |    2 +-
 arch/arm64/mm/proc.S          |    8 ++++----
 4 files changed, 7 insertions(+), 7 deletions(-)

--- a/arch/arm64/kernel/cpu-reset.S
+++ b/arch/arm64/kernel/cpu-reset.S
@@ -16,7 +16,7 @@
 #include <asm/virt.h>
 
 .text
-.pushsection    .idmap.text, "ax"
+.pushsection    .idmap.text, "awx"
 
 /*
  * __cpu_soft_restart(el2_switch, entry, arg0, arg1, arg2) - Helper for
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -473,7 +473,7 @@ ENDPROC(__primary_switched)
  * end early head section, begin head code that is also used for
  * hotplug and needs to have the same protections as the text region
  */
-	.section ".idmap.text","ax"
+	.section ".idmap.text","awx"
 
 ENTRY(kimage_vaddr)
 	.quad		_text - TEXT_OFFSET
--- a/arch/arm64/kernel/sleep.S
+++ b/arch/arm64/kernel/sleep.S
@@ -95,7 +95,7 @@ ENTRY(__cpu_suspend_enter)
 	ret
 ENDPROC(__cpu_suspend_enter)
 
-	.pushsection ".idmap.text", "ax"
+	.pushsection ".idmap.text", "awx"
 ENTRY(cpu_resume)
 	bl	el2_setup		// if in EL2 drop to EL1 cleanly
 	bl	__cpu_setup
--- a/arch/arm64/mm/proc.S
+++ b/arch/arm64/mm/proc.S
@@ -83,7 +83,7 @@ ENDPROC(cpu_do_suspend)
  *
  * x0: Address of context pointer
  */
-	.pushsection ".idmap.text", "ax"
+	.pushsection ".idmap.text", "awx"
 ENTRY(cpu_do_resume)
 	ldp	x2, x3, [x0]
 	ldp	x4, x5, [x0, #16]
@@ -147,7 +147,7 @@ alternative_else_nop_endif
 	ret
 ENDPROC(cpu_do_switch_mm)
 
-	.pushsection ".idmap.text", "ax"
+	.pushsection ".idmap.text", "awx"
 
 .macro	__idmap_cpu_set_reserved_ttbr1, tmp1, tmp2
 	adrp	\tmp1, empty_zero_page
@@ -180,7 +180,7 @@ ENDPROC(idmap_cpu_replace_ttbr1)
 	.popsection
 
 #ifdef CONFIG_UNMAP_KERNEL_AT_EL0
-	.pushsection ".idmap.text", "ax"
+	.pushsection ".idmap.text", "awx"
 
 	.macro	__idmap_kpti_get_pgtable_ent, type
 	dc	cvac, cur_\()\type\()p		// Ensure any existing dirty
@@ -368,7 +368,7 @@ ENDPROC(idmap_kpti_install_ng_mappings)
  *	Initialise the processor for turning the MMU on.  Return in x0 the
  *	value of the SCTLR_EL1 register.
  */
-	.pushsection ".idmap.text", "ax"
+	.pushsection ".idmap.text", "awx"
 ENTRY(__cpu_setup)
 	tlbi	vmalle1				// Invalidate local TLB
 	dsb	nsh


Patches currently in stable-queue which might be from mark.rutland@arm.com are

queue-4.9/arm64-mm-add-arm64_kernel_unmapped_at_el0-helper.patch
queue-4.9/arm64-entry-reword-comment-about-post_ttbr_update_workaround.patch
queue-4.9/arm64-kaslr-put-kernel-vectors-address-in-separate-data-page.patch
queue-4.9/arm64-turn-on-kpti-only-on-cpus-that-need-it.patch
queue-4.9/arm64-force-kpti-to-be-disabled-on-cavium-thunderx.patch
queue-4.9/arm64-mm-allocate-asids-in-pairs.patch
queue-4.9/arm64-tls-avoid-unconditional-zeroing-of-tpidrro_el0-for-native-tasks.patch
queue-4.9/arm64-use-ret-instruction-for-exiting-the-trampoline.patch
queue-4.9/arm64-entry-explicitly-pass-exception-level-to-kernel_ventry-macro.patch
queue-4.9/arm64-kpti-make-use-of-ng-dependent-on-arm64_kernel_unmapped_at_el0.patch
queue-4.9/arm64-mm-use-non-global-mappings-for-kernel-space.patch
queue-4.9/arm64-capabilities-handle-duplicate-entries-for-a-capability.patch
queue-4.9/arm64-entry-hook-up-entry-trampoline-to-exception-vectors.patch
queue-4.9/arm64-mm-invalidate-both-kernel-and-user-asids-when-performing-tlbi.patch
queue-4.9/arm64-mm-map-entry-trampoline-into-trampoline-and-kernel-page-tables.patch
queue-4.9/module-extend-rodata-off-boot-cmdline-parameter-to-module-mappings.patch
queue-4.9/arm64-kconfig-reword-unmap_kernel_at_el0-kconfig-entry.patch
queue-4.9/arm64-mm-move-asid-from-ttbr0-to-ttbr1.patch
queue-4.9/arm64-allow-checking-of-a-cpu-local-erratum.patch
queue-4.9/arm64-take-into-account-id_aa64pfr0_el1.csv3.patch
queue-4.9/arm64-kconfig-add-config_unmap_kernel_at_el0.patch
queue-4.9/arm64-idmap-use-awx-flags-for-.idmap.text-.pushsection-directives.patch
queue-4.9/arm64-factor-out-entry-stack-manipulation.patch
queue-4.9/arm64-entry-add-exception-trampoline-page-for-exceptions-from-el0.patch
queue-4.9/arm64-kpti-add-enable-callback-to-remap-swapper-using-ng-mappings.patch
queue-4.9/arm64-entry-add-fake-cpu-feature-for-unmapping-the-kernel-at-el0.patch
queue-4.9/arm64-cputype-add-midr-values-for-cavium-thunderx2-cpus.patch

  reply	other threads:[~2018-04-05 19:42 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03 11:08 [PATCH v4.9.y 00/27] arm64 meltdown patches Mark Rutland
2018-04-03 11:08 ` [PATCH v4.9.y 01/27] arm64: mm: Use non-global mappings for kernel space Mark Rutland
2018-04-05 19:42   ` Patch "arm64: mm: Use non-global mappings for kernel space" has been added to the 4.9-stable tree gregkh
2018-04-03 11:08 ` [PATCH v4.9.y 02/27] arm64: mm: Move ASID from TTBR0 to TTBR1 Mark Rutland
2018-04-05 19:42   ` Patch "arm64: mm: Move ASID from TTBR0 to TTBR1" has been added to the 4.9-stable tree gregkh
2018-04-03 11:08 ` [PATCH v4.9.y 03/27] arm64: mm: Allocate ASIDs in pairs Mark Rutland
2018-04-05 19:42   ` Patch "arm64: mm: Allocate ASIDs in pairs" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 04/27] arm64: mm: Add arm64_kernel_unmapped_at_el0 helper Mark Rutland
2018-04-05 19:42   ` Patch "arm64: mm: Add arm64_kernel_unmapped_at_el0 helper" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 05/27] arm64: mm: Invalidate both kernel and user ASIDs when performing TLBI Mark Rutland
2018-04-05 19:42   ` Patch "arm64: mm: Invalidate both kernel and user ASIDs when performing TLBI" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 06/27] arm64: factor out entry stack manipulation Mark Rutland
2018-04-05 19:42   ` Patch "arm64: factor out entry stack manipulation" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 07/27] module: extend 'rodata=off' boot cmdline parameter to module mappings Mark Rutland
2018-04-05 19:42   ` Patch "module: extend 'rodata=off' boot cmdline parameter to module mappings" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 08/27] arm64: entry: Add exception trampoline page for exceptions from EL0 Mark Rutland
2018-04-05 19:42   ` Patch "arm64: entry: Add exception trampoline page for exceptions from EL0" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 09/27] arm64: mm: Map entry trampoline into trampoline and kernel page tables Mark Rutland
2018-04-03 11:15   ` Mark Rutland
2018-04-05 19:33     ` Greg KH
2018-04-05 19:42   ` Patch "arm64: mm: Map entry trampoline into trampoline and kernel page tables" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 10/27] arm64: entry: Explicitly pass exception level to kernel_ventry macro Mark Rutland
2018-04-05 19:42   ` Patch "arm64: entry: Explicitly pass exception level to kernel_ventry macro" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 11/27] arm64: entry: Hook up entry trampoline to exception vectors Mark Rutland
2018-04-05 19:42   ` Patch "arm64: entry: Hook up entry trampoline to exception vectors" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 12/27] arm64: tls: Avoid unconditional zeroing of tpidrro_el0 for native tasks Mark Rutland
2018-04-05 19:42   ` Patch "arm64: tls: Avoid unconditional zeroing of tpidrro_el0 for native tasks" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 13/27] arm64: entry: Add fake CPU feature for unmapping the kernel at EL0 Mark Rutland
2018-04-05 19:42   ` Patch "arm64: entry: Add fake CPU feature for unmapping the kernel at EL0" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 14/27] arm64: kaslr: Put kernel vectors address in separate data page Mark Rutland
2018-04-05 19:42   ` Patch "arm64: kaslr: Put kernel vectors address in separate data page" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 15/27] arm64: use RET instruction for exiting the trampoline Mark Rutland
2018-04-05 19:42   ` Patch "arm64: use RET instruction for exiting the trampoline" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 16/27] arm64: Kconfig: Add CONFIG_UNMAP_KERNEL_AT_EL0 Mark Rutland
2018-04-05 19:42   ` Patch "arm64: Kconfig: Add CONFIG_UNMAP_KERNEL_AT_EL0" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 17/27] arm64: Kconfig: Reword UNMAP_KERNEL_AT_EL0 kconfig entry Mark Rutland
2018-04-05 19:42   ` Patch "arm64: Kconfig: Reword UNMAP_KERNEL_AT_EL0 kconfig entry" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 18/27] arm64: Take into account ID_AA64PFR0_EL1.CSV3 Mark Rutland
2018-04-05 19:42   ` Patch "arm64: Take into account ID_AA64PFR0_EL1.CSV3" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 19/27] arm64: Allow checking of a CPU-local erratum Mark Rutland
2018-04-05 19:42   ` Patch "arm64: Allow checking of a CPU-local erratum" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 20/27] arm64: capabilities: Handle duplicate entries for a capability Mark Rutland
2018-04-05 19:42   ` Patch "arm64: capabilities: Handle duplicate entries for a capability" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 21/27] arm64: cputype: Add MIDR values for Cavium ThunderX2 CPUs Mark Rutland
2018-04-05 19:42   ` Patch "arm64: cputype: Add MIDR values for Cavium ThunderX2 CPUs" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 22/27] arm64: Turn on KPTI only on CPUs that need it Mark Rutland
2018-04-05 19:42   ` Patch "arm64: Turn on KPTI only on CPUs that need it" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 23/27] arm64: kpti: Make use of nG dependent on arm64_kernel_unmapped_at_el0() Mark Rutland
2018-04-05 19:42   ` Patch "arm64: kpti: Make use of nG dependent on arm64_kernel_unmapped_at_el0()" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 24/27] arm64: kpti: Add ->enable callback to remap swapper using nG mappings Mark Rutland
2018-04-05 19:42   ` Patch "arm64: kpti: Add ->enable callback to remap swapper using nG mappings" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 25/27] arm64: Force KPTI to be disabled on Cavium ThunderX Mark Rutland
2018-04-05 19:42   ` Patch "arm64: Force KPTI to be disabled on Cavium ThunderX" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 26/27] arm64: entry: Reword comment about post_ttbr_update_workaround Mark Rutland
2018-04-05 19:42   ` Patch "arm64: entry: Reword comment about post_ttbr_update_workaround" has been added to the 4.9-stable tree gregkh
2018-04-03 11:09 ` [PATCH v4.9.y 27/27] arm64: idmap: Use "awx" flags for .idmap.text .pushsection directives Mark Rutland
2018-04-05 19:42   ` gregkh [this message]
2018-04-04 15:07 ` [PATCH v4.9.y 00/27] arm64 meltdown patches Greg KH
2018-04-05 10:04   ` Will Deacon
2018-04-05 10:15     ` Mark Rutland
2018-04-05 11:46   ` Will Deacon
2018-04-05 17:34 ` Greg Hackmann
2018-04-05 19:15   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=152295734742157@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alex.shi@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=ghackmann@google.com \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).