]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2019 05:35:44 +0000 (06:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2019 05:35:44 +0000 (06:35 +0100)
added patches:
arm64-drop-linker-script-hack-to-hide-__efistub_-symbols.patch

queue-4.19/arm64-drop-linker-script-hack-to-hide-__efistub_-symbols.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/arm64-drop-linker-script-hack-to-hide-__efistub_-symbols.patch b/queue-4.19/arm64-drop-linker-script-hack-to-hide-__efistub_-symbols.patch
new file mode 100644 (file)
index 0000000..46c5578
--- /dev/null
@@ -0,0 +1,89 @@
+From foo@baz Fri Jan 11 06:34:04 CET 2019
+From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+Date: Fri, 30 Nov 2018 12:35:58 +0100
+Subject: arm64: drop linker script hack to hide __efistub_ symbols
+
+From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+
+commit dd6846d774693bfa27d7db4dae5ea67dfe373fa1 upstream.
+
+Commit 1212f7a16af4 ("scripts/kallsyms: filter arm64's __efistub_
+symbols") updated the kallsyms code to filter out symbols with
+the __efistub_ prefix explicitly, so we no longer require the
+hack in our linker script to emit them as absolute symbols.
+
+Cc: Nick Desaulniers <ndesaulniers@google.com>
+Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+Signed-off-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/kernel/image.h |   46 ++++++++++++++++++----------------------------
+ 1 file changed, 18 insertions(+), 28 deletions(-)
+
+--- a/arch/arm64/kernel/image.h
++++ b/arch/arm64/kernel/image.h
+@@ -76,16 +76,6 @@
+ __efistub_stext_offset = stext - _text;
+ /*
+- * Prevent the symbol aliases below from being emitted into the kallsyms
+- * table, by forcing them to be absolute symbols (which are conveniently
+- * ignored by scripts/kallsyms) rather than section relative symbols.
+- * The distinction is only relevant for partial linking, and only for symbols
+- * that are defined within a section declaration (which is not the case for
+- * the definitions below) so the resulting values will be identical.
+- */
+-#define KALLSYMS_HIDE(sym)    ABSOLUTE(sym)
+-
+-/*
+  * The EFI stub has its own symbol namespace prefixed by __efistub_, to
+  * isolate it from the kernel proper. The following symbols are legally
+  * accessed by the stub, so provide some aliases to make them accessible.
+@@ -94,28 +84,28 @@ __efistub_stext_offset = stext - _text;
+  * linked at. The routines below are all implemented in assembler in a
+  * position independent manner
+  */
+-__efistub_memcmp              = KALLSYMS_HIDE(__pi_memcmp);
+-__efistub_memchr              = KALLSYMS_HIDE(__pi_memchr);
+-__efistub_memcpy              = KALLSYMS_HIDE(__pi_memcpy);
+-__efistub_memmove             = KALLSYMS_HIDE(__pi_memmove);
+-__efistub_memset              = KALLSYMS_HIDE(__pi_memset);
+-__efistub_strlen              = KALLSYMS_HIDE(__pi_strlen);
+-__efistub_strnlen             = KALLSYMS_HIDE(__pi_strnlen);
+-__efistub_strcmp              = KALLSYMS_HIDE(__pi_strcmp);
+-__efistub_strncmp             = KALLSYMS_HIDE(__pi_strncmp);
+-__efistub_strrchr             = KALLSYMS_HIDE(__pi_strrchr);
+-__efistub___flush_dcache_area = KALLSYMS_HIDE(__pi___flush_dcache_area);
++__efistub_memcmp              = __pi_memcmp;
++__efistub_memchr              = __pi_memchr;
++__efistub_memcpy              = __pi_memcpy;
++__efistub_memmove             = __pi_memmove;
++__efistub_memset              = __pi_memset;
++__efistub_strlen              = __pi_strlen;
++__efistub_strnlen             = __pi_strnlen;
++__efistub_strcmp              = __pi_strcmp;
++__efistub_strncmp             = __pi_strncmp;
++__efistub_strrchr             = __pi_strrchr;
++__efistub___flush_dcache_area = __pi___flush_dcache_area;
+ #ifdef CONFIG_KASAN
+-__efistub___memcpy            = KALLSYMS_HIDE(__pi_memcpy);
+-__efistub___memmove           = KALLSYMS_HIDE(__pi_memmove);
+-__efistub___memset            = KALLSYMS_HIDE(__pi_memset);
++__efistub___memcpy            = __pi_memcpy;
++__efistub___memmove           = __pi_memmove;
++__efistub___memset            = __pi_memset;
+ #endif
+-__efistub__text                       = KALLSYMS_HIDE(_text);
+-__efistub__end                        = KALLSYMS_HIDE(_end);
+-__efistub__edata              = KALLSYMS_HIDE(_edata);
+-__efistub_screen_info         = KALLSYMS_HIDE(screen_info);
++__efistub__text                       = _text;
++__efistub__end                        = _end;
++__efistub__edata              = _edata;
++__efistub_screen_info         = screen_info;
+ #endif
index 48c1e3f745c1b60c4f267f52a0b19433234c507c..9e3267cd71c3fc511d1d57a8d5fe1247c1c98c61 100644 (file)
@@ -122,3 +122,4 @@ selinux-policydb-fix-byte-order-and-alignment-issues.patch
 pci-pm-allow-runtime-pm-without-callback-functions.patch
 lockd-show-pid-of-lockd-for-remote-locks.patch
 nfsd4-zero-length-write-should-succeed.patch
+arm64-drop-linker-script-hack-to-hide-__efistub_-symbols.patch