]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop queue-4.4/arm64-assembler-make-adr_l-work-in-modules-under-kaslr.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jul 2017 07:59:57 +0000 (09:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jul 2017 07:59:57 +0000 (09:59 +0200)
queue-4.4/arm64-assembler-make-adr_l-work-in-modules-under-kaslr.patch [deleted file]
queue-4.4/series

diff --git a/queue-4.4/arm64-assembler-make-adr_l-work-in-modules-under-kaslr.patch b/queue-4.4/arm64-assembler-make-adr_l-work-in-modules-under-kaslr.patch
deleted file mode 100644 (file)
index 4f77f7c..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-From foo@baz Mon Jul  3 13:29:24 CEST 2017
-From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-Date: Wed, 11 Jan 2017 14:54:53 +0000
-Subject: arm64: assembler: make adr_l work in modules under KASLR
-
-From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-
-
-[ Upstream commit 41c066f2c4d436c535616fe182331766c57838f0 ]
-
-When CONFIG_RANDOMIZE_MODULE_REGION_FULL=y, the offset between loaded
-modules and the core kernel may exceed 4 GB, putting symbols exported
-by the core kernel out of the reach of the ordinary adrp/add instruction
-pairs used to generate relative symbol references. So make the adr_l
-macro emit a movz/movk sequence instead when executing in module context.
-
-While at it, remove the pointless special case for the stack pointer.
-
-Acked-by: Mark Rutland <mark.rutland@arm.com>
-Acked-by: Will Deacon <will.deacon@arm.com>
-Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/arm64/include/asm/assembler.h |   36 +++++++++++++++++++++++++++---------
- 1 file changed, 27 insertions(+), 9 deletions(-)
-
---- a/arch/arm64/include/asm/assembler.h
-+++ b/arch/arm64/include/asm/assembler.h
-@@ -147,22 +147,25 @@ lr       .req    x30             // link register
- /*
-  * Pseudo-ops for PC-relative adr/ldr/str <reg>, <symbol> where
-- * <symbol> is within the range +/- 4 GB of the PC.
-+ * <symbol> is within the range +/- 4 GB of the PC when running
-+ * in core kernel context. In module context, a movz/movk sequence
-+ * is used, since modules may be loaded far away from the kernel
-+ * when KASLR is in effect.
-  */
-       /*
-        * @dst: destination register (64 bit wide)
-        * @sym: name of the symbol
--       * @tmp: optional scratch register to be used if <dst> == sp, which
--       *       is not allowed in an adrp instruction
-        */
--      .macro  adr_l, dst, sym, tmp=
--      .ifb    \tmp
-+      .macro  adr_l, dst, sym
-+#ifndef MODULE
-       adrp    \dst, \sym
-       add     \dst, \dst, :lo12:\sym
--      .else
--      adrp    \tmp, \sym
--      add     \dst, \tmp, :lo12:\sym
--      .endif
-+#else
-+      movz    \dst, #:abs_g3:\sym
-+      movk    \dst, #:abs_g2_nc:\sym
-+      movk    \dst, #:abs_g1_nc:\sym
-+      movk    \dst, #:abs_g0_nc:\sym
-+#endif
-       .endm
-       /*
-@@ -173,6 +176,7 @@ lr .req    x30             // link register
-        *       the address
-        */
-       .macro  ldr_l, dst, sym, tmp=
-+#ifndef MODULE
-       .ifb    \tmp
-       adrp    \dst, \sym
-       ldr     \dst, [\dst, :lo12:\sym]
-@@ -180,6 +184,15 @@ lr        .req    x30             // link register
-       adrp    \tmp, \sym
-       ldr     \dst, [\tmp, :lo12:\sym]
-       .endif
-+#else
-+      .ifb    \tmp
-+      adr_l   \dst, \sym
-+      ldr     \dst, [\dst]
-+      .else
-+      adr_l   \tmp, \sym
-+      ldr     \dst, [\tmp]
-+      .endif
-+#endif
-       .endm
-       /*
-@@ -189,8 +202,13 @@ lr        .req    x30             // link register
-        *       while <src> needs to be preserved.
-        */
-       .macro  str_l, src, sym, tmp
-+#ifndef MODULE
-       adrp    \tmp, \sym
-       str     \src, [\tmp, :lo12:\sym]
-+#else
-+      adr_l   \tmp, \sym
-+      str     \src, [\tmp]
-+#endif
-       .endm
- /*
index c1760bc6fb868c4358cc574c1499b0c8191e2729..756dd838180f35e2bfe289b98eb764a1d7f0f574 100644 (file)
@@ -69,7 +69,6 @@ kernel-panic.c-add-missing-n.patch
 hid-i2c-hid-add-sleep-between-power-on-and-reset.patch
 scsi-lpfc-avoid-double-free-of-resource-identifiers.patch
 spi-davinci-use-dma_mapping_error.patch
-arm64-assembler-make-adr_l-work-in-modules-under-kaslr.patch
 mac80211-initialize-smps-field-in-ht-capabilities.patch
 x86-mpx-use-compatible-types-in-comparison-to-fix-sparse-error.patch
 coredump-ensure-proper-size-of-sparse-core-files.patch