Skip to contentSkip to conversation

gcc-sanitizers: Add missing dep on libcrypt

PATCH In review Khem Raj 3 participants 7 messages Dec 22, 2019

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/4 gcc-sanitizers: Add missing dep on libcrypt

---
 meta/recipes-devtools/gcc/gcc-sanitizers.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-sanitizers.inc +1 -1
index 8b1d1c94bf..668e14a59f 100644
@@ -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"
Signature · 1 line
2.24.1
author
#1 lore raw

PATCH 2/4 gcc-sanitizers: Fix build with glibc 2.31

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

---
 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
meta/recipes-devtools/gcc/gcc-9.2.inc +1 -0
index c6395998d5..926df11c27 100644
@@ -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 \
meta/recipes-devtools/gcc/gcc-9.2/0037-Fix-up-libsanitizer-build-with-master-glibc.patch new file +70 -0

70 lines not on this page · raw message

Signature · 1 line
2.24.1
author
#2 lore raw

PATCH 3/4 qemu: Replace stime() API with clock_settime

In reply to Khem Raj
---
 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
meta/recipes-devtools/qemu/qemu.inc +1 -0
index 601fc2286b..07dabfe25c 100644
@@ -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 \
            "
meta/recipes-devtools/qemu/qemu/0011-linux-user-remove-host-stime-syscall.patch new file +61 -0

61 lines not on this page · raw message

Signature · 1 line
2.24.1
author
#3 lore raw

PATCH 4/4 linux-yocto: Fix build with gcc10

In reply to Khem Raj
Cc Bruce Ashfield <[email protected]>
---
 ...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
meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch new file +42 -0
new file mode 100644
index 0000000000..bd48de6dd9
@@ -0,0 +1,42 @@
+From 199caf12cdbe24796dc31fbd4fe5729ba2acf659 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+Cc: Kirill A. Shutemov <[email protected]>
+Cc: Kees Cook <[email protected]>
+Cc: "H. Peter Anvin" <[email protected]>
+Cc: Ingo Molnar <[email protected]>
+Cc: Thomas Gleixner <[email protected]>
+Cc: x86-ml <[email protected]>
+Cc: Arnd Bergmann <[email protected]>
+---
+ 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
+
meta/recipes-kernel/linux/linux-yocto_5.2.bb +2 -0
index ff0f547399..5af0924808 100644
@@ -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"
 
Signature · 1 line
2.24.1
#4 lore raw

Re: [PATCH 4/4] linux-yocto: Fix build with gcc10

Quoted 3 lines · Khem Raj
Cc Bruce Ashfield <[email protected]>

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

Quoted 70 lines
---
 ...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
meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch new file +42 -0
new file mode 100644
index 0000000000..bd48de6dd9
@@ -0,0 +1,42 @@
+From 199caf12cdbe24796dc31fbd4fe5729ba2acf659 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+Cc: Kirill A. Shutemov <[email protected]>
+Cc: Kees Cook <[email protected]>
+Cc: "H. Peter Anvin" <[email protected]>
+Cc: Ingo Molnar <[email protected]>
+Cc: Thomas Gleixner <[email protected]>
+Cc: x86-ml <[email protected]>
+Cc: Arnd Bergmann <[email protected]>
+---
+ 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
+
meta/recipes-kernel/linux/linux-yocto_5.2.bb +2 -1
index ff0f547399..5af0924808 100644
@@ -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

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#5 lore raw

Re: [PATCH 4/4] linux-yocto: Fix build with gcc10

Quoted 11 lines · Bruce Ashfield
Quoted 3 lines · Khem Raj
Cc Bruce Ashfield <[email protected]>

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

Quoted 81 lines

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

Bruce

Quoted 68 lines
---
 ...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
meta/recipes-kernel/linux/files/0001-x86-boot-compressed-64-Define-__force_order-only-whe.patch new file +42 -0
new file mode 100644
index 0000000000..bd48de6dd9
@@ -0,0 +1,42 @@
+From 199caf12cdbe24796dc31fbd4fe5729ba2acf659 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+Cc: Kirill A. Shutemov <[email protected]>
+Cc: Kees Cook <[email protected]>
+Cc: "H. Peter Anvin" <[email protected]>
+Cc: Ingo Molnar <[email protected]>
+Cc: Thomas Gleixner <[email protected]>
+Cc: x86-ml <[email protected]>
+Cc: Arnd Bergmann <[email protected]>
+---
+ 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
+
meta/recipes-kernel/linux/linux-yocto_5.2.bb +2 -1
index ff0f547399..5af0924808 100644
@@ -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"
 
--
Quoted 2 lines

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

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#6 lore raw

✗ patchtest: failure for "gcc-sanitizers: Add missing de..." and 3 more

In reply to Khem Raj

== 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 ([email protected]) 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