All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] gcc-sanitizers: Add missing dep on libcrypt
@ 2019-12-22  4:05 Khem Raj
  2019-12-22  4:05 ` [PATCH 2/4] gcc-sanitizers: Fix build with glibc 2.31 Khem Raj
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Khem Raj @ 2019-12-22  4:05 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/gcc/gcc-sanitizers.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index 8b1d1c94bf..668e14a59f 100644
--- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -43,7 +43,7 @@ do_install () {
 
 INHIBIT_DEFAULT_DEPS = "1"
 ALLOW_EMPTY_${PN} = "1"
-DEPENDS = "gcc-runtime virtual/${TARGET_PREFIX}gcc"
+DEPENDS = "virtual/crypt gcc-runtime virtual/${TARGET_PREFIX}gcc"
 
 # used to fix ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
 DEBUG_OPTIMIZATION_append = " -Wno-error"
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] gcc-sanitizers: Fix build with glibc 2.31
  2019-12-22  4:05 [PATCH 1/4] gcc-sanitizers: Add missing dep on libcrypt Khem Raj
@ 2019-12-22  4:05 ` Khem Raj
  2019-12-22  4:05 ` [PATCH 3/4] qemu: Replace stime() API with clock_settime Khem Raj
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2019-12-22  4:05 UTC (permalink / raw)
  To: openembedded-core

Backport a patch from latest gcc-9-branch to fix an API change in glibc
2.31, this patch wont be needed when upgrading to 9.3 or 10.x

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/gcc/gcc-9.2.inc         |  1 +
 ...libsanitizer-build-with-master-glibc.patch | 70 +++++++++++++++++++
 2 files changed, 71 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc-9.2/0037-Fix-up-libsanitizer-build-with-master-glibc.patch

diff --git a/meta/recipes-devtools/gcc/gcc-9.2.inc b/meta/recipes-devtools/gcc/gcc-9.2.inc
index c6395998d5..926df11c27 100644
--- a/meta/recipes-devtools/gcc/gcc-9.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-9.2.inc
@@ -64,6 +64,7 @@ SRC_URI = "\
            file://0034-fix-segmentation-fault-in-precompiled-header-generat.patch \
            file://0035-Fix-for-testsuite-failure.patch \
            file://0036-Re-introduce-spe-commandline-options.patch \
+           file://0037-Fix-up-libsanitizer-build-with-master-glibc.patch \
            file://CVE-2019-14250.patch \
 	   file://CVE-2019-15847_1.patch \
 	   file://CVE-2019-15847_2.patch \
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0037-Fix-up-libsanitizer-build-with-master-glibc.patch b/meta/recipes-devtools/gcc/gcc-9.2/0037-Fix-up-libsanitizer-build-with-master-glibc.patch
new file mode 100644
index 0000000000..abe074c289
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0037-Fix-up-libsanitizer-build-with-master-glibc.patch
@@ -0,0 +1,70 @@
+From 7ed24d12664319f34625a12fd8c0f729a0e71f5c Mon Sep 17 00:00:00 2001
+From: Auto Builder <ab@rdk>
+Date: Sun, 22 Dec 2019 02:58:24 +0000
+Subject: [PATCH] Fix up libsanitizer build with master glibc
+
+2019-11-26  Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/92154
+	* sanitizer_common/sanitizer_platform_limits_posix.h: Cherry-pick
+	llvm-project revision 947f9692440836dcb8d88b74b69dd379d85974ce.
+	* sanitizer_common/sanitizer_platform_limits_posix.cpp: Likewise.
+
+Upstream-Status: Backport [https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b02486e0951bc0ed38310a03be73e479fc6f3e7a;hp=3feeac76ffc38427de2d7d086e2928e63eee2d44]
+Signed-off-by: Auto Builder <ab@rdk>
+---
+ .../sanitizer_platform_limits_posix.cc            |  5 +++--
+ .../sanitizer_platform_limits_posix.h             | 15 +--------------
+ 2 files changed, 4 insertions(+), 16 deletions(-)
+
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+index 6cd4a5bac..d823a1219 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -1156,8 +1156,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
+-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
+-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field.  */
++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31)
++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit
++   on many architectures.  */
+ CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
+ #endif
+ 
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+index 73af92af1..6a673a7c9 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -211,26 +211,13 @@ namespace __sanitizer {
+     u64 __unused1;
+     u64 __unused2;
+ #elif defined(__sparc__)
+-#if defined(__arch64__)
+     unsigned mode;
+-    unsigned short __pad1;
+-#else
+-    unsigned short __pad1;
+-    unsigned short mode;
+     unsigned short __pad2;
+-#endif
+     unsigned short __seq;
+     unsigned long long __unused1;
+     unsigned long long __unused2;
+-#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__)
+-    unsigned int mode;
+-    unsigned short __seq;
+-    unsigned short __pad1;
+-    unsigned long __unused1;
+-    unsigned long __unused2;
+ #else
+-    unsigned short mode;
+-    unsigned short __pad1;
++    unsigned int mode;
+     unsigned short __seq;
+     unsigned short __pad2;
+ #if defined(__x86_64__) && !defined(_LP64)
+-- 
+2.17.1
+
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] qemu: Replace stime() API with clock_settime
  2019-12-22  4:05 [PATCH 1/4] gcc-sanitizers: Add missing dep on libcrypt Khem Raj
  2019-12-22  4:05 ` [PATCH 2/4] gcc-sanitizers: Fix build with glibc 2.31 Khem Raj
@ 2019-12-22  4:05 ` Khem Raj
  2019-12-22  4:05 ` [PATCH 4/4] linux-yocto: Fix build with gcc10 Khem Raj
  2019-12-22  4:32 ` ✗ patchtest: failure for "gcc-sanitizers: Add missing de..." and 3 more Patchwork
  3 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2019-12-22  4:05 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/qemu/qemu.inc           |  1 +
 ...linux-user-remove-host-stime-syscall.patch | 61 +++++++++++++++++++
 2 files changed, 62 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/0011-linux-user-remove-host-stime-syscall.patch

diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 601fc2286b..07dabfe25c 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -27,6 +27,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
            file://0009-Fix-webkitgtk-builds.patch \
            file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \
+           file://0011-linux-user-remove-host-stime-syscall.patch \
            file://CVE-2019-15890.patch \
            file://CVE-2019-12068.patch \
            "
diff --git a/meta/recipes-devtools/qemu/qemu/0011-linux-user-remove-host-stime-syscall.patch b/meta/recipes-devtools/qemu/qemu/0011-linux-user-remove-host-stime-syscall.patch
new file mode 100644
index 0000000000..659e6be45d
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0011-linux-user-remove-host-stime-syscall.patch
@@ -0,0 +1,61 @@
+From 0f1f2d4596aee037d3ccbcf10592466daa54107f Mon Sep 17 00:00:00 2001
+From: Laurent Vivier <laurent@vivier.eu>
+Date: Tue, 12 Nov 2019 15:25:56 +0100
+Subject: [PATCH] linux-user: remove host stime() syscall
+
+stime() has been withdrawn from glibc
+(12cbde1dae6f "Use clock_settime to implement stime; withdraw stime.")
+
+Implement the target stime() syscall using host
+clock_settime(CLOCK_REALTIME, ...) as it is done internally in glibc.
+
+Tested qemu-ppc/x86_64 with:
+
+	#include <time.h>
+	#include <stdio.h>
+
+	int main(void)
+	{
+		time_t t;
+		int ret;
+
+		/* date -u -d"2019-11-12T15:11:00" "+%s" */
+		t = 1573571460;
+		ret = stime(&t);
+		printf("ret %d\n", ret);
+		return 0;
+	}
+
+        # date; ./stime; date
+        Tue Nov 12 14:18:32 UTC 2019
+        ret 0
+        Tue Nov 12 15:11:00 UTC 2019
+
+Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=0f1f2d4596aee037d3ccbcf10592466daa54107f]
+Buglink: https://bugs.launchpad.net/qemu/+bug/1852115
+Reported-by: Cole Robinson <crobinso@redhat.com>
+Signed-off-by: Laurent Vivier <laurent@vivier.eu>
+Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
+Message-Id: <20191112142556.6335-1-laurent@vivier.eu>
+---
+ linux-user/syscall.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/linux-user/syscall.c
++++ b/linux-user/syscall.c
+@@ -7651,10 +7651,12 @@ static abi_long do_syscall1(void *cpu_en
+ #ifdef TARGET_NR_stime /* not on alpha */
+     case TARGET_NR_stime:
+         {
+-            time_t host_time;
+-            if (get_user_sal(host_time, arg1))
++            struct timespec ts;
++            ts.tv_nsec = 0;
++            if (get_user_sal(ts.tv_sec, arg1)) {
+                 return -TARGET_EFAULT;
+-            return get_errno(stime(&host_time));
++            }
++            return get_errno(clock_settime(CLOCK_REALTIME, &ts));
+         }
+ #endif
+ #ifdef TARGET_NR_alarm /* not on alpha */
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] linux-yocto: Fix build with gcc10
  2019-12-22  4:05 [PATCH 1/4] gcc-sanitizers: Add missing dep on libcrypt Khem Raj
  2019-12-22  4:05 ` [PATCH 2/4] gcc-sanitizers: Fix build with glibc 2.31 Khem Raj
  2019-12-22  4:05 ` [PATCH 3/4] qemu: Replace stime() API with clock_settime Khem Raj
@ 2019-12-22  4:05 ` Khem Raj
  2019-12-22 17:04   ` Bruce Ashfield
  2019-12-22  4:32 ` ✗ patchtest: failure for "gcc-sanitizers: Add missing de..." and 3 more Patchwork
  3 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2019-12-22  4:05 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
---
 ...sed-64-Define-__force_order-only-whe.patch | 42 +++++++++++++++++++
 meta/recipes-kernel/linux/linux-yocto_5.2.bb  |  2 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch

diff --git a/meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch b/meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch
new file mode 100644
index 0000000000..bd48de6dd9
--- /dev/null
+++ b/meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch
@@ -0,0 +1,42 @@
+From 199caf12cdbe24796dc31fbd4fe5729ba2acf659 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Dec 2019 17:42:02 -0800
+Subject: [PATCH] x86/boot/compressed/64: Define __force_order only when
+ CONFIG_RANDOMIZE_BASE is unset
+
+kaslr_64.c also defines the same variable, however when both files are
+included into final link, linker complains about multiple definition of
+`__force_order' which is coming from kaslr_64.o and pgtable_64.o, its
+possible that kaslr_64.o is disabled via CONFIG_RANDOMIZE_BASE config
+option, therefore define it conditionally only when
+CONFIG_RANDOMIZE_BASE is not set
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
+Cc: Kees Cook <keescook@chromium.org>
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: x86-ml <x86@kernel.org>
+Cc: Arnd Bergmann <arnd@arndb.de>
+---
+ arch/x86/boot/compressed/pgtable_64.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/arch/x86/boot/compressed/pgtable_64.c b/arch/x86/boot/compressed/pgtable_64.c
+index c8862696a47b..077d19268b0b 100644
+--- a/arch/x86/boot/compressed/pgtable_64.c
++++ b/arch/x86/boot/compressed/pgtable_64.c
+@@ -12,7 +12,9 @@
+  * It is not referenced from the code, but GCC < 5 with -fPIE would fail
+  * due to an undefined symbol. Define it to make these ancient GCCs work.
+  */
++#ifndef CONFIG_RANDOMIZE_BASE
+ unsigned long __force_order;
++#endif
+ 
+ #define BIOS_START_MIN		0x20000U	/* 128K, less than this is insane */
+ #define BIOS_START_MAX		0x9f000U	/* 640K, absolute maximum */
+-- 
+2.24.1
+
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.2.bb b/meta/recipes-kernel/linux/linux-yocto_5.2.bb
index ff0f547399..5af0924808 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.2.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.2.bb
@@ -29,6 +29,8 @@ SRCREV_meta ?= "bd0762cd138f1624b5a5f8669cfa3ac2b71cb87b"
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.2;destsuffix=${KMETA}"
 
+SRC_URI += "file://0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch"
+
 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
 LINUX_VERSION ?= "5.2.20"
 
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* ✗ patchtest: failure for "gcc-sanitizers: Add missing de..." and 3 more
  2019-12-22  4:05 [PATCH 1/4] gcc-sanitizers: Add missing dep on libcrypt Khem Raj
                   ` (2 preceding siblings ...)
  2019-12-22  4:05 ` [PATCH 4/4] linux-yocto: Fix build with gcc10 Khem Raj
@ 2019-12-22  4:32 ` Patchwork
  3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2019-12-22  4:32 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

== Series Details ==

Series: "gcc-sanitizers: Add missing de..." and 3 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/21725/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format] 
  Suggested fix    Add Upstream-Status: <Valid status> to the header of meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch
  Standard format  Upstream-Status: <Valid status>
  Valid status     Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/4] linux-yocto: Fix build with gcc10
  2019-12-22  4:05 ` [PATCH 4/4] linux-yocto: Fix build with gcc10 Khem Raj
@ 2019-12-22 17:04   ` Bruce Ashfield
  2019-12-22 17:37     ` Bruce Ashfield
  0 siblings, 1 reply; 7+ messages in thread
From: Bruce Ashfield @ 2019-12-22 17:04 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Sat, Dec 21, 2019 at 11:06 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Bruce Ashfield <bruce.ashfield@gmail.com>

Thanks Khem!

As usual, please don't merge this patch directly, I'll apply it for
linux-yocto* and linux-yocto-dev so we have full coverage on the
reference kernels.

I can send SRCREV bumps tonight, once I've done some quick build tests.

Bruce

> ---
>  ...sed-64-Define-__force_order-only-whe.patch | 42 +++++++++++++++++++
>  meta/recipes-kernel/linux/linux-yocto_5.2.bb  |  2 +
>  2 files changed, 44 insertions(+)
>  create mode 100644 meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch
>
> diff --git a/meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch b/meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch
> new file mode 100644
> index 0000000000..bd48de6dd9
> --- /dev/null
> +++ b/meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch
> @@ -0,0 +1,42 @@
> +From 199caf12cdbe24796dc31fbd4fe5729ba2acf659 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Fri, 20 Dec 2019 17:42:02 -0800
> +Subject: [PATCH] x86/boot/compressed/64: Define __force_order only when
> + CONFIG_RANDOMIZE_BASE is unset
> +
> +kaslr_64.c also defines the same variable, however when both files are
> +included into final link, linker complains about multiple definition of
> +`__force_order' which is coming from kaslr_64.o and pgtable_64.o, its
> +possible that kaslr_64.o is disabled via CONFIG_RANDOMIZE_BASE config
> +option, therefore define it conditionally only when
> +CONFIG_RANDOMIZE_BASE is not set
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> +Cc: Kees Cook <keescook@chromium.org>
> +Cc: "H. Peter Anvin" <hpa@zytor.com>
> +Cc: Ingo Molnar <mingo@redhat.com>
> +Cc: Thomas Gleixner <tglx@linutronix.de>
> +Cc: x86-ml <x86@kernel.org>
> +Cc: Arnd Bergmann <arnd@arndb.de>
> +---
> + arch/x86/boot/compressed/pgtable_64.c | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/arch/x86/boot/compressed/pgtable_64.c b/arch/x86/boot/compressed/pgtable_64.c
> +index c8862696a47b..077d19268b0b 100644
> +--- a/arch/x86/boot/compressed/pgtable_64.c
> ++++ b/arch/x86/boot/compressed/pgtable_64.c
> +@@ -12,7 +12,9 @@
> +  * It is not referenced from the code, but GCC < 5 with -fPIE would fail
> +  * due to an undefined symbol. Define it to make these ancient GCCs work.
> +  */
> ++#ifndef CONFIG_RANDOMIZE_BASE
> + unsigned long __force_order;
> ++#endif
> +
> + #define BIOS_START_MIN                0x20000U        /* 128K, less than this is insane */
> + #define BIOS_START_MAX                0x9f000U        /* 640K, absolute maximum */
> +--
> +2.24.1
> +
> diff --git a/meta/recipes-kernel/linux/linux-yocto_5.2.bb b/meta/recipes-kernel/linux/linux-yocto_5.2.bb
> index ff0f547399..5af0924808 100644
> --- a/meta/recipes-kernel/linux/linux-yocto_5.2.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto_5.2.bb
> @@ -29,6 +29,8 @@ SRCREV_meta ?= "bd0762cd138f1624b5a5f8669cfa3ac2b71cb87b"
>  SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
>             git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.2;destsuffix=${KMETA}"
>
> +SRC_URI += "file://0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch"
> +
>  LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
>  LINUX_VERSION ?= "5.2.20"
>
> --
> 2.24.1
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/4] linux-yocto: Fix build with gcc10
  2019-12-22 17:04   ` Bruce Ashfield
@ 2019-12-22 17:37     ` Bruce Ashfield
  0 siblings, 0 replies; 7+ messages in thread
From: Bruce Ashfield @ 2019-12-22 17:37 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Sun, Dec 22, 2019 at 12:04 PM Bruce Ashfield
<bruce.ashfield@gmail.com> wrote:
>
> On Sat, Dec 21, 2019 at 11:06 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
>
> Thanks Khem!
>
> As usual, please don't merge this patch directly, I'll apply it for
> linux-yocto* and linux-yocto-dev so we have full coverage on the
> reference kernels.

FYI: The integrated patch is here:

http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=zedd/kernel-next

My other -stable bumps are still pending, so I'm waiting for them to
merge, so I can send the patch (since it needs those SRCREV bumps).

Bruce

>
> I can send SRCREV bumps tonight, once I've done some quick build tests.
>
> Bruce
>
> > ---
> >  ...sed-64-Define-__force_order-only-whe.patch | 42 +++++++++++++++++++
> >  meta/recipes-kernel/linux/linux-yocto_5.2.bb  |  2 +
> >  2 files changed, 44 insertions(+)
> >  create mode 100644 meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch
> >
> > diff --git a/meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch b/meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch
> > new file mode 100644
> > index 0000000000..bd48de6dd9
> > --- /dev/null
> > +++ b/meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch
> > @@ -0,0 +1,42 @@
> > +From 199caf12cdbe24796dc31fbd4fe5729ba2acf659 Mon Sep 17 00:00:00 2001
> > +From: Khem Raj <raj.khem@gmail.com>
> > +Date: Fri, 20 Dec 2019 17:42:02 -0800
> > +Subject: [PATCH] x86/boot/compressed/64: Define __force_order only when
> > + CONFIG_RANDOMIZE_BASE is unset
> > +
> > +kaslr_64.c also defines the same variable, however when both files are
> > +included into final link, linker complains about multiple definition of
> > +`__force_order' which is coming from kaslr_64.o and pgtable_64.o, its
> > +possible that kaslr_64.o is disabled via CONFIG_RANDOMIZE_BASE config
> > +option, therefore define it conditionally only when
> > +CONFIG_RANDOMIZE_BASE is not set
> > +
> > +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > +Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> > +Cc: Kees Cook <keescook@chromium.org>
> > +Cc: "H. Peter Anvin" <hpa@zytor.com>
> > +Cc: Ingo Molnar <mingo@redhat.com>
> > +Cc: Thomas Gleixner <tglx@linutronix.de>
> > +Cc: x86-ml <x86@kernel.org>
> > +Cc: Arnd Bergmann <arnd@arndb.de>
> > +---
> > + arch/x86/boot/compressed/pgtable_64.c | 2 ++
> > + 1 file changed, 2 insertions(+)
> > +
> > +diff --git a/arch/x86/boot/compressed/pgtable_64.c b/arch/x86/boot/compressed/pgtable_64.c
> > +index c8862696a47b..077d19268b0b 100644
> > +--- a/arch/x86/boot/compressed/pgtable_64.c
> > ++++ b/arch/x86/boot/compressed/pgtable_64.c
> > +@@ -12,7 +12,9 @@
> > +  * It is not referenced from the code, but GCC < 5 with -fPIE would fail
> > +  * due to an undefined symbol. Define it to make these ancient GCCs work.
> > +  */
> > ++#ifndef CONFIG_RANDOMIZE_BASE
> > + unsigned long __force_order;
> > ++#endif
> > +
> > + #define BIOS_START_MIN                0x20000U        /* 128K, less than this is insane */
> > + #define BIOS_START_MAX                0x9f000U        /* 640K, absolute maximum */
> > +--
> > +2.24.1
> > +
> > diff --git a/meta/recipes-kernel/linux/linux-yocto_5.2.bb b/meta/recipes-kernel/linux/linux-yocto_5.2.bb
> > index ff0f547399..5af0924808 100644
> > --- a/meta/recipes-kernel/linux/linux-yocto_5.2.bb
> > +++ b/meta/recipes-kernel/linux/linux-yocto_5.2.bb
> > @@ -29,6 +29,8 @@ SRCREV_meta ?= "bd0762cd138f1624b5a5f8669cfa3ac2b71cb87b"
> >  SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
> >             git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.2;destsuffix=${KMETA}"
> >
> > +SRC_URI += "file://0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch"
> > +
> >  LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
> >  LINUX_VERSION ?= "5.2.20"
> >
> > --
> > 2.24.1
> >
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-12-22 17:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-22  4:05 [PATCH 1/4] gcc-sanitizers: Add missing dep on libcrypt Khem Raj
2019-12-22  4:05 ` [PATCH 2/4] gcc-sanitizers: Fix build with glibc 2.31 Khem Raj
2019-12-22  4:05 ` [PATCH 3/4] qemu: Replace stime() API with clock_settime Khem Raj
2019-12-22  4:05 ` [PATCH 4/4] linux-yocto: Fix build with gcc10 Khem Raj
2019-12-22 17:04   ` Bruce Ashfield
2019-12-22 17:37     ` Bruce Ashfield
2019-12-22  4:32 ` ✗ patchtest: failure for "gcc-sanitizers: Add missing de..." and 3 more Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.