Date   

[hardknott][PATCH 07/17] linux-yocto/5.10: ktypes/standard: disable obsolete crypto options by default

Anuj Mittal
 

From: Bruce Ashfield <bruce.ashfield@...>

Integrating the following commit(s) to linux-yocto/5.10.:

ktypes/standard: disable obsolete crypto options by default

CONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE is on by default, but really
shouldn't be on in our kernels for a safe set of baseline options.

This is almost never used, so we disable it by default. If something
needs it, they can turn it on in a board specific config.

Signed-off-by: Bruce Ashfield <bruce.ashfield@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
(cherry picked from commit f29be437290a960decdc2d8be8e505e8179c2f58)
Signed-off-by: Anuj Mittal <anuj.mittal@...>
---
.../linux/linux-yocto-rt_5.10.bb | 4 ++--
.../linux/linux-yocto-tiny_5.10.bb | 6 ++---
meta/recipes-kernel/linux/linux-yocto_5.10.bb | 22 +++++++++----------
3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb b/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
index 69571df047..424dc83e15 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
@@ -11,8 +11,8 @@ python () {
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}

-SRCREV_machine ?= "eb1ac5022eed244fb3943b3e48b48bc863aaf5a3"
-SRCREV_meta ?= "50c2d69f24f02336c9c6d65c3201d1d6dd105f52"
+SRCREV_machine ?= "fd84ed4cd5f8671db5ff31c00712c607c379a924"
+SRCREV_meta ?= "6dbd5491f4b9592d6332fd8e1bcf29ab01901274"

SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
index 2e0d1b20d4..ea41d74add 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"

-SRCREV_machine_qemuarm ?= "5bd2421ef6048de205cd3a86c6f14b6296dc79d9"
-SRCREV_machine ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
-SRCREV_meta ?= "50c2d69f24f02336c9c6d65c3201d1d6dd105f52"
+SRCREV_machine_qemuarm ?= "9d4af32a2486acf5feb473b0d5656155cf80f115"
+SRCREV_machine ?= "ddac76981cb3a53de4f2feb2746661a02a6763bd"
+SRCREV_meta ?= "6dbd5491f4b9592d6332fd8e1bcf29ab01901274"

PV = "${LINUX_VERSION}+git${SRCPV}"

diff --git a/meta/recipes-kernel/linux/linux-yocto_5.10.bb b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
index cf6d19010a..1200cba942 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
@@ -13,17 +13,17 @@ KBRANCH_qemux86 ?= "v5.10/standard/base"
KBRANCH_qemux86-64 ?= "v5.10/standard/base"
KBRANCH_qemumips64 ?= "v5.10/standard/mti-malta64"

-SRCREV_machine_qemuarm ?= "71d9798b63a9d5a62708f746bb0a53583a8dfb5d"
-SRCREV_machine_qemuarm64 ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
-SRCREV_machine_qemumips ?= "4bad40a510831446b777042df43e349989ecbef7"
-SRCREV_machine_qemuppc ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
-SRCREV_machine_qemuriscv64 ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
-SRCREV_machine_qemuriscv32 ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
-SRCREV_machine_qemux86 ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
-SRCREV_machine_qemux86-64 ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
-SRCREV_machine_qemumips64 ?= "554408244bec4f2121f4ec63b170ca38430b8f9b"
-SRCREV_machine ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
-SRCREV_meta ?= "50c2d69f24f02336c9c6d65c3201d1d6dd105f52"
+SRCREV_machine_qemuarm ?= "f3a20db821a8802c1b3e71c0cccded36d89671b5"
+SRCREV_machine_qemuarm64 ?= "ddac76981cb3a53de4f2feb2746661a02a6763bd"
+SRCREV_machine_qemumips ?= "c64120ac8b71098f6356a992f7e302caa75d4bae"
+SRCREV_machine_qemuppc ?= "ddac76981cb3a53de4f2feb2746661a02a6763bd"
+SRCREV_machine_qemuriscv64 ?= "ddac76981cb3a53de4f2feb2746661a02a6763bd"
+SRCREV_machine_qemuriscv32 ?= "ddac76981cb3a53de4f2feb2746661a02a6763bd"
+SRCREV_machine_qemux86 ?= "ddac76981cb3a53de4f2feb2746661a02a6763bd"
+SRCREV_machine_qemux86-64 ?= "ddac76981cb3a53de4f2feb2746661a02a6763bd"
+SRCREV_machine_qemumips64 ?= "b9a0cc14b51ac1bc5f2bcdcc0f53f6913e877e20"
+SRCREV_machine ?= "ddac76981cb3a53de4f2feb2746661a02a6763bd"
+SRCREV_meta ?= "6dbd5491f4b9592d6332fd8e1bcf29ab01901274"

# remap qemuarm to qemuarma15 for the 5.8 kernel
# KMACHINE_qemuarm ?= "qemuarma15"
--
2.31.1


[hardknott][PATCH 06/17] linux-yocto/5.4: update to v5.4.117

Anuj Mittal
 

From: Bruce Ashfield <bruce.ashfield@...>

Updating linux-yocto/5.4 to the latest korg -stable release that comprises
the following commits:

b5dbcd05792a Linux 5.4.117
0ee3bfc2c31e vfio: Depend on MMU
b246759284d6 perf/core: Fix unconditional security_locked_down() call
a1e6a0d1e6cf ovl: allow upperdir inside lowerdir
8198962021fd scsi: ufs: Unlock on a couple error paths
91aa2644a3ab platform/x86: thinkpad_acpi: Correct thermal sensor allocation
164f74391822 USB: Add reset-resume quirk for WD19's Realtek Hub
5922dfc42ac8 USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet
314192f055d9 ALSA: usb-audio: Add MIDI quirk for Vox ToneLab EX
6cede11149bf perf ftrace: Fix access to pid in array when setting a pid filter
ad4659935e11 perf data: Fix error return code in perf_data__create_dir()
cbc6b467610c iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_gen2_enqueue_hcmd()
c7166a529e2b avoid __memcat_p link failure
8ba25a9ef9b9 bpf: Fix leakage of uninitialized bpf stack under speculation
53e0db429b37 bpf: Fix masking negation logic upon negative dst register
b0c8fe7ef797 iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_enqueue_hcmd()
43b515c52942 igb: Enable RSS for Intel I211 Ethernet Controller
354520d3ea81 net: usb: ax88179_178a: initialize local variables before use
55714a57f369 ACPI: x86: Call acpi_boot_table_init() after acpi_table_upgrade()
b3041510f0fc ACPI: tables: x86: Reserve memory occupied by ACPI tables
91b08c5319a5 mips: Do not include hi and lo in clobber list for R6

Signed-off-by: Bruce Ashfield <bruce.ashfield@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
(cherry picked from commit 0bb2a057ed02b94e6f12b0508b5d7f4a535b1ca0)
Signed-off-by: Anuj Mittal <anuj.mittal@...>
---
.../linux/linux-yocto-rt_5.4.bb | 6 ++---
.../linux/linux-yocto-tiny_5.4.bb | 8 +++----
meta/recipes-kernel/linux/linux-yocto_5.4.bb | 22 +++++++++----------
3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb b/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb
index f82c6b335b..608dac4588 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb
@@ -11,13 +11,13 @@ python () {
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}

-SRCREV_machine ?= "b62ae8bedb024e67e7c5cda51840454a4170c858"
-SRCREV_meta ?= "b89df7433ea8124d3092805391b78808df4147a7"
+SRCREV_machine ?= "ccf88860c16c9f2fae90da1ba46074b09d98a0a2"
+SRCREV_meta ?= "8b98855aa2eae3f9c30601a0f8da281cb3b5e4b7"

SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}"

-LINUX_VERSION ?= "5.4.116"
+LINUX_VERSION ?= "5.4.117"

LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"

diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb
index 1c3fe73ae5..61779fbcf6 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"

require recipes-kernel/linux/linux-yocto.inc

-LINUX_VERSION ?= "5.4.116"
+LINUX_VERSION ?= "5.4.117"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"

DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"

-SRCREV_machine_qemuarm ?= "80bd6016a9bdaed4b66ddffffa8c8e62d7c1f8a6"
-SRCREV_machine ?= "ea7a54fa402727f3c4bc4a1904d4a9590e7c8b85"
-SRCREV_meta ?= "b89df7433ea8124d3092805391b78808df4147a7"
+SRCREV_machine_qemuarm ?= "2c64c9c438ec34cbdef929338fea304b726cac3f"
+SRCREV_machine ?= "2744384587f1de0551f517cc7be1984077e95329"
+SRCREV_meta ?= "8b98855aa2eae3f9c30601a0f8da281cb3b5e4b7"

PV = "${LINUX_VERSION}+git${SRCPV}"

diff --git a/meta/recipes-kernel/linux/linux-yocto_5.4.bb b/meta/recipes-kernel/linux/linux-yocto_5.4.bb
index 5245530229..c1270bc78e 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.4.bb
@@ -12,16 +12,16 @@ KBRANCH_qemux86 ?= "v5.4/standard/base"
KBRANCH_qemux86-64 ?= "v5.4/standard/base"
KBRANCH_qemumips64 ?= "v5.4/standard/mti-malta64"

-SRCREV_machine_qemuarm ?= "e71df0530eefcac1b3248329e385bcefbad6336e"
-SRCREV_machine_qemuarm64 ?= "ea7a54fa402727f3c4bc4a1904d4a9590e7c8b85"
-SRCREV_machine_qemumips ?= "07445052fdd15e60b30dc5ae9d162c2e6bba47d1"
-SRCREV_machine_qemuppc ?= "ea7a54fa402727f3c4bc4a1904d4a9590e7c8b85"
-SRCREV_machine_qemuriscv64 ?= "ea7a54fa402727f3c4bc4a1904d4a9590e7c8b85"
-SRCREV_machine_qemux86 ?= "ea7a54fa402727f3c4bc4a1904d4a9590e7c8b85"
-SRCREV_machine_qemux86-64 ?= "ea7a54fa402727f3c4bc4a1904d4a9590e7c8b85"
-SRCREV_machine_qemumips64 ?= "b36d79d6f2aaf9dadec352f611e7b9becf2b9a55"
-SRCREV_machine ?= "ea7a54fa402727f3c4bc4a1904d4a9590e7c8b85"
-SRCREV_meta ?= "b89df7433ea8124d3092805391b78808df4147a7"
+SRCREV_machine_qemuarm ?= "00362a9e9116bf12dd4ae468caf822b85106cc7c"
+SRCREV_machine_qemuarm64 ?= "2744384587f1de0551f517cc7be1984077e95329"
+SRCREV_machine_qemumips ?= "603a0985e29b703dbb535c72f08eb6f9119e0863"
+SRCREV_machine_qemuppc ?= "2744384587f1de0551f517cc7be1984077e95329"
+SRCREV_machine_qemuriscv64 ?= "2744384587f1de0551f517cc7be1984077e95329"
+SRCREV_machine_qemux86 ?= "2744384587f1de0551f517cc7be1984077e95329"
+SRCREV_machine_qemux86-64 ?= "2744384587f1de0551f517cc7be1984077e95329"
+SRCREV_machine_qemumips64 ?= "21a474630e254696cfd46f1ee9c202ab8e85e38f"
+SRCREV_machine ?= "2744384587f1de0551f517cc7be1984077e95329"
+SRCREV_meta ?= "8b98855aa2eae3f9c30601a0f8da281cb3b5e4b7"

# remap qemuarm to qemuarma15 for the 5.4 kernel
# KMACHINE_qemuarm ?= "qemuarma15"
@@ -30,7 +30,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}"

LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-LINUX_VERSION ?= "5.4.116"
+LINUX_VERSION ?= "5.4.117"

DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
DEPENDS += "openssl-native util-linux-native"
--
2.31.1


[hardknott][PATCH 05/17] linux-yocto/5.10: update to v5.10.35

Anuj Mittal
 

From: Bruce Ashfield <bruce.ashfield@...>

Updating linux-yocto/5.10 to the latest korg -stable release that comprises
the following commits:

f53a3a480862 Linux 5.10.35
94c76056fc3f vfio: Depend on MMU
4348d3b5027b perf/core: Fix unconditional security_locked_down() call
399f9c18473c platform/x86: thinkpad_acpi: Correct thermal sensor allocation
ac2cd82c7609 USB: Add reset-resume quirk for WD19's Realtek Hub
d844aaa49ac8 USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet
59b3f88386b5 ALSA: usb-audio: Add MIDI quirk for Vox ToneLab EX
27c1936af506 ovl: allow upperdir inside lowerdir
71d58457a8af ovl: fix leaked dentry
2fa0387fa2d0 nvme-pci: set min_align_mask
f8e71c667ee1 swiotlb: respect min_align_mask
85a5a6875ca9 swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single
25ed8827cfbf swiotlb: refactor swiotlb_tbl_map_single
9efd5df078a7 swiotlb: clean up swiotlb_tbl_unmap_single
1f2ef5a0f771 swiotlb: factor out a nr_slots helper
1bbcc985d195 swiotlb: factor out an io_tlb_offset helper
22163a8ec863 swiotlb: add a IO_TLB_SIZE define
2e8b3b0b8e2d driver core: add a min_align_mask field to struct device_dma_parameters
6995512a472f tools/cgroup/slabinfo.py: updated to work on current kernel
a7c37332afa8 perf ftrace: Fix access to pid in array when setting a pid filter
fb4c1c2e9fd1 capabilities: require CAP_SETFCAP to map uid 0
b571a6302a64 perf data: Fix error return code in perf_data__create_dir()
48ec949ac979 net: qrtr: Avoid potential use after free in MHI send
2fa15d61e4cb bpf: Fix leakage of uninitialized bpf stack under speculation
2cfa537674cd bpf: Fix masking negation logic upon negative dst register
a41c193d004e igb: Enable RSS for Intel I211 Ethernet Controller
2e68890993d0 net: usb: ax88179_178a: initialize local variables before use
d3598eb3915c netfilter: conntrack: Make global sysctls readonly in non-init netns
c239bfc2e4ac mips: Do not include hi and lo in clobber list for R6

Signed-off-by: Bruce Ashfield <bruce.ashfield@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
(cherry picked from commit 767e6755740204981e5789b7a3066eac855605e8)
Signed-off-by: Anuj Mittal <anuj.mittal@...>
---
.../linux/linux-yocto-rt_5.10.bb | 6 ++---
.../linux/linux-yocto-tiny_5.10.bb | 8 +++----
meta/recipes-kernel/linux/linux-yocto_5.10.bb | 24 +++++++++----------
3 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb b/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
index 08314ea03e..69571df047 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
@@ -11,13 +11,13 @@ python () {
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}

-SRCREV_machine ?= "400fbf5b14a0c88afb7c31d65be56fb9d6214c81"
-SRCREV_meta ?= "38eb7ca3f4b59339c57a04c310f20809b198fa91"
+SRCREV_machine ?= "eb1ac5022eed244fb3943b3e48b48bc863aaf5a3"
+SRCREV_meta ?= "50c2d69f24f02336c9c6d65c3201d1d6dd105f52"

SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"

-LINUX_VERSION ?= "5.10.34"
+LINUX_VERSION ?= "5.10.35"

LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"

diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
index 8bd674f116..2e0d1b20d4 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"

require recipes-kernel/linux/linux-yocto.inc

-LINUX_VERSION ?= "5.10.34"
+LINUX_VERSION ?= "5.10.35"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"

DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"

-SRCREV_machine_qemuarm ?= "bf33b78f5136873b6d2ec6274908cf688341bc9e"
-SRCREV_machine ?= "85c17ad073e9249f261cc550e8ada89a900d7d9a"
-SRCREV_meta ?= "38eb7ca3f4b59339c57a04c310f20809b198fa91"
+SRCREV_machine_qemuarm ?= "5bd2421ef6048de205cd3a86c6f14b6296dc79d9"
+SRCREV_machine ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
+SRCREV_meta ?= "50c2d69f24f02336c9c6d65c3201d1d6dd105f52"

PV = "${LINUX_VERSION}+git${SRCPV}"

diff --git a/meta/recipes-kernel/linux/linux-yocto_5.10.bb b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
index 2e7a452495..cf6d19010a 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
@@ -13,17 +13,17 @@ KBRANCH_qemux86 ?= "v5.10/standard/base"
KBRANCH_qemux86-64 ?= "v5.10/standard/base"
KBRANCH_qemumips64 ?= "v5.10/standard/mti-malta64"

-SRCREV_machine_qemuarm ?= "78e8e722eec4434024c5db3e0d59da0b128c7647"
-SRCREV_machine_qemuarm64 ?= "85c17ad073e9249f261cc550e8ada89a900d7d9a"
-SRCREV_machine_qemumips ?= "b5c0852a90709e77f7a3d185d1745e6a1f66b77c"
-SRCREV_machine_qemuppc ?= "85c17ad073e9249f261cc550e8ada89a900d7d9a"
-SRCREV_machine_qemuriscv64 ?= "85c17ad073e9249f261cc550e8ada89a900d7d9a"
-SRCREV_machine_qemuriscv32 ?= "85c17ad073e9249f261cc550e8ada89a900d7d9a"
-SRCREV_machine_qemux86 ?= "85c17ad073e9249f261cc550e8ada89a900d7d9a"
-SRCREV_machine_qemux86-64 ?= "85c17ad073e9249f261cc550e8ada89a900d7d9a"
-SRCREV_machine_qemumips64 ?= "bf264e264d2141a4fb61d515573c27935e67ecfa"
-SRCREV_machine ?= "85c17ad073e9249f261cc550e8ada89a900d7d9a"
-SRCREV_meta ?= "38eb7ca3f4b59339c57a04c310f20809b198fa91"
+SRCREV_machine_qemuarm ?= "71d9798b63a9d5a62708f746bb0a53583a8dfb5d"
+SRCREV_machine_qemuarm64 ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
+SRCREV_machine_qemumips ?= "4bad40a510831446b777042df43e349989ecbef7"
+SRCREV_machine_qemuppc ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
+SRCREV_machine_qemuriscv64 ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
+SRCREV_machine_qemuriscv32 ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
+SRCREV_machine_qemux86 ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
+SRCREV_machine_qemux86-64 ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
+SRCREV_machine_qemumips64 ?= "554408244bec4f2121f4ec63b170ca38430b8f9b"
+SRCREV_machine ?= "24719054cf85a9c66df020b10b6d2b7c6926a4e6"
+SRCREV_meta ?= "50c2d69f24f02336c9c6d65c3201d1d6dd105f52"

# remap qemuarm to qemuarma15 for the 5.8 kernel
# KMACHINE_qemuarm ?= "qemuarma15"
@@ -32,7 +32,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"

LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
-LINUX_VERSION ?= "5.10.34"
+LINUX_VERSION ?= "5.10.35"

DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
DEPENDS += "openssl-native util-linux-native"
--
2.31.1


[hardknott][PATCH 04/17] classes/reproducible_build: Use atomic rename for SDE file

Anuj Mittal
 

From: Joshua Watt <JPEWhacker@...>

If an existing source date epoch file was found during do_unpack, it was
deleted and a new one would be written in its place. This causes a race
with check-before-use code in get_source_date_epoch_value. Resolve the
problem by making do_unpack write the new source date epoch to a
temporary file, then do an atomic rename to ensure it's always present,
and change the check-before-use code to use a EAFP exception instead of
checking for file existence.

[YOCTO #14384]

Signed-off-by: Joshua Watt <JPEWhacker@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
(cherry picked from commit 0b5e3b33187bf78a2d62cc886463e4b27d6bd228)
Signed-off-by: Anuj Mittal <anuj.mittal@...>
---
meta/classes/reproducible_build.bbclass | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/meta/classes/reproducible_build.bbclass b/meta/classes/reproducible_build.bbclass
index f06e00d70d..1277764fab 100644
--- a/meta/classes/reproducible_build.bbclass
+++ b/meta/classes/reproducible_build.bbclass
@@ -77,17 +77,16 @@ python create_source_date_epoch_stamp() {
import oe.reproducible

epochfile = d.getVar('SDE_FILE')
- # If it exists we need to regenerate as the sources may have changed
- if os.path.isfile(epochfile):
- bb.debug(1, "Deleting existing SOURCE_DATE_EPOCH from: %s" % epochfile)
- os.remove(epochfile)
+ tmp_file = "%s.new" % epochfile

source_date_epoch = oe.reproducible.get_source_date_epoch(d, d.getVar('S'))

bb.debug(1, "SOURCE_DATE_EPOCH: %d" % source_date_epoch)
bb.utils.mkdirhier(d.getVar('SDE_DIR'))
- with open(epochfile, 'w') as f:
+ with open(tmp_file, 'w') as f:
f.write(str(source_date_epoch))
+
+ os.rename(tmp_file, epochfile)
}

def get_source_date_epoch_value(d):
@@ -97,7 +96,7 @@ def get_source_date_epoch_value(d):

epochfile = d.getVar('SDE_FILE')
source_date_epoch = int(d.getVar('SOURCE_DATE_EPOCH_FALLBACK'))
- if os.path.isfile(epochfile):
+ try:
with open(epochfile, 'r') as f:
s = f.read()
try:
@@ -110,7 +109,7 @@ def get_source_date_epoch_value(d):
bb.warn("SOURCE_DATE_EPOCH value '%s' is invalid. Reverting to SOURCE_DATE_EPOCH_FALLBACK" % s)
source_date_epoch = int(d.getVar('SOURCE_DATE_EPOCH_FALLBACK'))
bb.debug(1, "SOURCE_DATE_EPOCH: %d" % source_date_epoch)
- else:
+ except FileNotFoundError:
bb.debug(1, "Cannot find %s. SOURCE_DATE_EPOCH will default to %d" % (epochfile, source_date_epoch))

d.setVar('__CACHED_SOURCE_DATE_EPOCH', str(source_date_epoch))
--
2.31.1


[hardknott][PATCH 03/17] valgrind: Improve non-deterministic ptest reliability

Anuj Mittal
 

From: Tony Tascioglu <tony.tascioglu@...>

Several of the valgrind tests (particulaly helgrind) are unreliable and
can fail with a different output.

Particularly, there is a higher chance of failure on QEMU instances with
SMP enabled and on systems with more interrupts such as laptops on powersave.

The tests have been reported upstream as being unreliable dating back
over 5 years, due in part to the ordering of threads during
an "unwinding" process in helgrind.
https://bugs.kde.org/show_bug.cgi?id=345121
https://bugs.kde.org/show_bug.cgi?id=430321

A workaround to improve the reliability of such tests is to force them
to run on a single CPU core using taskset. This greatly reduces the
chance of a failure.

From my testing, I have found it can help reduce the rate of failures
on both a laptop and QEMU by over 5x. Stress-testing in QEMU for several
hours did not result in a failure while running the test normally did.

The flaky or undeterministic thread-based tests are defined in the
taskset_nondeterministic_tests file. These test cases will be run with
taskset 0x00000001 to run on a single CPU core rather then the regular
test.

The edited run-ptest executes the flaky tests first, then ignores them
to not duplicate the results from the main tests. Everything modified is
restored when testing is complete.

The drawback is that this isn't a foolproof solution. It helps the tests
fail much less frequently, and considering how this issue has been documented
for a long time, a workaround such as this is needed.

Signed-off-by: Tony Tascioglu <tony.tascioglu@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
(cherry picked from commit b318944dd72ca7b0408e955f3599381ab3ac3ba8)
Signed-off-by: Anuj Mittal <anuj.mittal@...>
---
meta/recipes-devtools/valgrind/valgrind/run-ptest | 12 ++++++++++++
.../valgrind/valgrind/taskset_nondeterministic_tests | 4 ++++
2 files changed, 16 insertions(+)
create mode 100644 meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests

diff --git a/meta/recipes-devtools/valgrind/valgrind/run-ptest b/meta/recipes-devtools/valgrind/valgrind/run-ptest
index f37780ef6a..b563eb3567 100755
--- a/meta/recipes-devtools/valgrind/valgrind/run-ptest
+++ b/meta/recipes-devtools/valgrind/valgrind/run-ptest
@@ -31,6 +31,13 @@ if [ "$arch" = "aarch64" ]; then
done
fi

+echo "Run flaky tests using taskset to limit them to a single core."
+for i in `cat taskset_nondeterministic_tests`; do
+ taskset 0x00000001 perl tests/vg_regtest --valgrind=${VALGRIND_BIN} --valgrind-lib=${VALGRIND_LIBEXECDIR} --yocto-ptest $i 2>&1|tee ${LOG}
+ mv $i.vgtest $i.IGNORE
+done
+
+
cd ${VALGRIND_LIB}/ptest && ./tests/vg_regtest \
--valgrind=${VALGRIND_BIN} \
--valgrind-lib=${VALGRIND_LIB} \
@@ -55,6 +62,11 @@ for i in `cat remove-for-all`; do
mv $i.IGNORE $i.vgtest;
done

+echo "Restore flaky and other non-deterministic tests"
+for i in `cat taskset_nondeterministic_tests`; do
+ mv $i.IGNORE $i.vgtest;
+done
+
echo "Failed test details..."
failed_tests=`grep FAIL: ${LOG} | awk '{print $2}'`
for test in $failed_tests; do
diff --git a/meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests b/meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests
new file mode 100644
index 0000000000..cf073fa927
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests
@@ -0,0 +1,4 @@
+helgrind/tests/hg05_race2
+helgrind/tests/tc09_bad_unlock
+drd/tests/bar_bad
+drd/tests/bar_bad_xml
--
2.31.1


[hardknott][PATCH 01/17] python3: upgrade 3.9.4 -> 3.9.5

Anuj Mittal
 

From: Trevor Gamblin <trevor.gamblin@...>

Version 3.9.5 includes a fix for CVE-2021-29921.

Signed-off-by: Trevor Gamblin <trevor.gamblin@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
(cherry picked from commit be23351f97c1a7362c0ddd240a6de0cddfca1b01)
Signed-off-by: Anuj Mittal <anuj.mittal@...>
---
.../python/{python3_3.9.4.bb => python3_3.9.5.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3_3.9.4.bb => python3_3.9.5.bb} (99%)

diff --git a/meta/recipes-devtools/python/python3_3.9.4.bb b/meta/recipes-devtools/python/python3_3.9.5.bb
similarity index 99%
rename from meta/recipes-devtools/python/python3_3.9.4.bb
rename to meta/recipes-devtools/python/python3_3.9.5.bb
index cb371ceed7..82177f4a18 100644
--- a/meta/recipes-devtools/python/python3_3.9.4.bb
+++ b/meta/recipes-devtools/python/python3_3.9.5.bb
@@ -38,7 +38,7 @@ SRC_URI_append_class-native = " \
file://12-distutils-prefix-is-inside-staging-area.patch \
file://0001-Don-t-search-system-for-headers-libraries.patch \
"
-SRC_URI[sha256sum] = "4b0e6644a76f8df864ae24ac500a51bbf68bd098f6a173e27d3b61cdca9aa134"
+SRC_URI[sha256sum] = "0c5a140665436ec3dbfbb79e2dfb6d192655f26ef4a29aeffcb6d1820d716d83"

# exclude pre-releases for both python 2.x and 3.x
UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
--
2.31.1


[hardknott][PATCH 02/17] valgrind: fix a typo

Anuj Mittal
 

From: Kai Kang <kai.kang@...>

Signed-off-by: Kai Kang <kai.kang@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
(cherry picked from commit 0478d9b04d6a6d10e439116b23b641a1e2553e26)
Signed-off-by: Anuj Mittal <anuj.mittal@...>
---
meta/recipes-devtools/valgrind/valgrind_3.16.1.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb b/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb
index 2b1d185575..3493745828 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb
@@ -123,7 +123,7 @@ VALGRINDARCH_mipsel = "mips32"
VALGRINDARCH_mips64el = "mips64"
VALGRINDARCH_powerpc = "ppc"
VALGRINDARCH_powerpc64 = "ppc64"
-VALGRINDARCH_powerpc64el = "ppc64le"
+VALGRINDARCH_powerpc64le = "ppc64le"

INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/valgrind/vgpreload_memcheck-${VALGRINDARCH}-linux.so"

--
2.31.1


[hardknott][PATCH 00/17] review request

Anuj Mittal
 

Please review these next set of changes for hardknott. No problems seen
while building/testing on autobuilder.

Thanks,

Anuj

The following changes since commit 6ca1047e98a1c8bc305a3f40ad1919c5038e1698:

oeqa/runtime/rpm: Drop log message counting test component (2021-06-02 14:26:58 +0100)

are available in the Git repository at:

git://push.openembedded.org/openembedded-core-contrib stable/hardknott-next

Bruce Ashfield (11):
linux-yocto/5.10: update to v5.10.35
linux-yocto/5.4: update to v5.4.117
linux-yocto/5.10: ktypes/standard: disable obsolete crypto options by
default
linux-yocto/5.10: update to v5.10.36
linux-yocto/5.4: update to v5.4.118
linux-yocto/5.10: update to v5.10.37
linux-yocto/5.4: update to v5.4.119
linux-yocto/5.10: update to v5.10.38
linux-yocto/5.4: update to v5.4.120
linux-yocto/5.10: update to v5.10.41
linux-yocto/5.4: update to v5.4.123

Guillaume Champagne (1):
image-live.bbclass: order do_bootimg after do_rootfs

Joshua Watt (1):
classes/reproducible_build: Use atomic rename for SDE file

Kai Kang (1):
valgrind: fix a typo

Richard Purdie (1):
linux-firmware: upgrade 20210315 -> 20210511

Tony Tascioglu (1):
valgrind: Improve non-deterministic ptest reliability

Trevor Gamblin (1):
python3: upgrade 3.9.4 -> 3.9.5

meta/classes/image-live.bbclass | 2 +-
meta/classes/reproducible_build.bbclass | 13 +++++-----
.../{python3_3.9.4.bb => python3_3.9.5.bb} | 2 +-
.../valgrind/valgrind/run-ptest | 12 ++++++++++
.../valgrind/taskset_nondeterministic_tests | 4 ++++
.../valgrind/valgrind_3.16.1.bb | 2 +-
...20210315.bb => linux-firmware_20210511.bb} | 4 ++--
.../linux/linux-yocto-rt_5.10.bb | 6 ++---
.../linux/linux-yocto-rt_5.4.bb | 6 ++---
.../linux/linux-yocto-tiny_5.10.bb | 8 +++----
.../linux/linux-yocto-tiny_5.4.bb | 8 +++----
meta/recipes-kernel/linux/linux-yocto_5.10.bb | 24 +++++++++----------
meta/recipes-kernel/linux/linux-yocto_5.4.bb | 22 ++++++++---------
13 files changed, 64 insertions(+), 49 deletions(-)
rename meta/recipes-devtools/python/{python3_3.9.4.bb => python3_3.9.5.bb} (99%)
create mode 100644 meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests
rename meta/recipes-kernel/linux-firmware/{linux-firmware_20210315.bb => linux-firmware_20210511.bb} (99%)

--
2.31.1


[V3][PATCH] libjpeg-turbo: fix do_compile error on arm

Changqing Li
 

From: Changqing Li <changqing.li@...>

fix below error:
/include/arm_neon.h:31:2: error: #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard"
31 | #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard"

Signed-off-by: Changqing Li <changqing.li@...>
---
meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb | 3 +++
1 file changed, 3 insertions(+)

diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb
index 7f91cc02ac..afa0ab1be6 100644
--- a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb
+++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb
@@ -40,6 +40,9 @@ EXTRA_OECMAKE_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx3
# Work around missing non-floating point ABI support in MIPS
EXTRA_OECMAKE_append_class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "-DWITH_SIMD=False", "", d)}"

+EXTRA_OECMAKE_append_class-target_arm = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "", "-DWITH_SIMD=False", d)}"
+EXTRA_OECMAKE_append_class-target_armeb = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "", "-DWITH_SIMD=False", d)}"
+
# Provide a workaround if Altivec unit is not present in PPC
EXTRA_OECMAKE_append_class-target_powerpc = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
EXTRA_OECMAKE_append_class-target_powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
--
2.17.1


[PATCH 2/2] qemuriscv: Enable 4 core emulation

Khem Raj
 

Helps in running tests a bit faster

Signed-off-by: Khem Raj <raj.khem@...>
---
meta/conf/machine/include/riscv/qemuriscv.inc | 1 +
1 file changed, 1 insertion(+)

diff --git a/meta/conf/machine/include/riscv/qemuriscv.inc b/meta/conf/machine/include/riscv/qemuriscv.inc
index 428d28bde1..20e2d465a1 100644
--- a/meta/conf/machine/include/riscv/qemuriscv.inc
+++ b/meta/conf/machine/include/riscv/qemuriscv.inc
@@ -26,6 +26,7 @@ UBOOT_ENTRYPOINT_riscv32 = "0x80400000"
UBOOT_ENTRYPOINT_riscv64 = "0x80200000"

# qemuboot options
+QB_SMP = "-smp 4"
QB_KERNEL_CMDLINE_APPEND = "earlycon=sbi"
QB_MACHINE = "-machine virt"
QB_DEFAULT_BIOS = "fw_jump.elf"
--
2.32.0


[PATCH 1/2] libssp-nonshared: Use a different implementation for __stack_chk_fail

Khem Raj
 

Signed-off-by: Khem Raj <raj.khem@...>
---
meta/recipes-core/musl/libssp-nonshared.bb | 11 ++---
.../musl/libssp-nonshared/ssp-local.c | 45 -------------------
.../musl/libssp-nonshared/stack_chk.c | 40 +++++++++++++++++
3 files changed, 46 insertions(+), 50 deletions(-)
delete mode 100644 meta/recipes-core/musl/libssp-nonshared/ssp-local.c
create mode 100644 meta/recipes-core/musl/libssp-nonshared/stack_chk.c

diff --git a/meta/recipes-core/musl/libssp-nonshared.bb b/meta/recipes-core/musl/libssp-nonshared.bb
index bae8c81cc7..81c87e8e8d 100644
--- a/meta/recipes-core/musl/libssp-nonshared.bb
+++ b/meta/recipes-core/musl/libssp-nonshared.bb
@@ -2,11 +2,12 @@
# Released under the MIT license (see COPYING.MIT for the terms)

SUMMARY = "Minimal libssp_nonshared.a must needed for ssp to work with gcc on musl"
-LICENSE = "GPL-3.0-with-GCC-exception"
-LIC_FILES_CHKSUM = "file://ssp-local.c;beginline=1;endline=32;md5=c06d391208c0cfcbc541a6728ed65cc4"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://stack_chk.c;beginline=1;endline=30;md5=97e59d9deee678a9332c9ddb2ab6360d"
SECTION = "libs"

-SRC_URI = "file://ssp-local.c"
+# Sourced from https://github.com/intel/linux-sgx/blob/master/sdk/compiler-rt/stack_chk.c
+SRC_URI = "file://stack_chk.c"

INHIBIT_DEFAULT_DEPS = "1"

@@ -19,8 +20,8 @@ do_configure[noexec] = "1"
S = "${WORKDIR}"

do_compile() {
- ${CC} ${CPPFLAGS} ${CFLAGS} -fPIE -c ssp-local.c -o ssp-local.o
- ${AR} r libssp_nonshared.a ssp-local.o
+ ${CC} ${CPPFLAGS} ${CFLAGS} -fPIE -c stack_chk.c -o stack_chk.o
+ ${AR} r libssp_nonshared.a stack_chk.o
}
do_install() {
install -Dm 0644 ${B}/libssp_nonshared.a ${D}${base_libdir}/libssp_nonshared.a
diff --git a/meta/recipes-core/musl/libssp-nonshared/ssp-local.c b/meta/recipes-core/musl/libssp-nonshared/ssp-local.c
deleted file mode 100644
index 8f51afa2c1..0000000000
--- a/meta/recipes-core/musl/libssp-nonshared/ssp-local.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Stack protector support.
- Copyright (C) 2005-2018 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 3, or (at your option) any later
-version.
-
-In addition to the permissions in the GNU General Public License, the
-Free Software Foundation gives you unlimited permission to link the
-compiled version of this file into combinations with other programs,
-and to distribute those combinations without any restriction coming
-from the use of this file. (The General Public License restrictions
-do apply in other respects; for example, they cover modification of
-the file, and distribution when not linked into a combine
-executable.)
-
-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-<http://www.gnu.org/licenses/>. */
-
-extern void __stack_chk_fail (void);
-
-/* Some targets can avoid loading a GP for calls to hidden functions.
- Using this entry point may avoid the load of a GP entirely for the
- function, making the overall code smaller. */
-
-void
-__attribute__((visibility ("hidden")))
-__stack_chk_fail_local (void)
-{
- __stack_chk_fail ();
-}
diff --git a/meta/recipes-core/musl/libssp-nonshared/stack_chk.c b/meta/recipes-core/musl/libssp-nonshared/stack_chk.c
new file mode 100644
index 0000000000..097aae24b6
--- /dev/null
+++ b/meta/recipes-core/musl/libssp-nonshared/stack_chk.c
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011-2021 Intel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Intel Corporation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+extern void __attribute__((noreturn)) __stack_chk_fail(void);
+
+void
+__attribute__((noreturn))
+__attribute__((visibility ("hidden")))
+__stack_chk_fail_local (void)
+{
+ __stack_chk_fail ();
+}
--
2.32.0


Re: [V2][PATCH] libjpeg-turbo: fix do_compile error on armv5

Changqing Li
 

On 6/11/21 12:59 AM, Andre McCurdy wrote:
[Please note: This e-mail is from an EXTERNAL e-mail address]

On Thu, Jun 10, 2021 at 2:42 AM Changqing Li <changqing.li@...> wrote:
On 6/10/21 1:29 AM, Andre McCurdy wrote:
[Please note: This e-mail is from an EXTERNAL e-mail address]

On Wed, Jun 9, 2021 at 12:32 AM Changqing Li <changqing.li@...> wrote:
From: Changqing Li <changqing.li@...>

fix below error:
/include/arm_neon.h:31:2: error: #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard"
31 | #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard"

Neon is not supported by armv5, disable the simd extension build.
Drop this comment. Neon may be missing from other ISA levels too (i.e.
this fix is not specific to armv5).
Get it. Thanks.
Signed-off-by: Changqing Li <changqing.li@...>
---
meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb | 2 ++
1 file changed, 2 insertions(+)

diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb
index 7f91cc02ac..da21971113 100644
--- a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb
+++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb
@@ -40,6 +40,8 @@ EXTRA_OECMAKE_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx3
# Work around missing non-floating point ABI support in MIPS
EXTRA_OECMAKE_append_class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "-DWITH_SIMD=False", "", d)}"

+EXTRA_OECMAKE_append_class-target = " ${@ ('') if (d.getVar('TUNE_CCARGS_MFPU') != '') else '-DWITH_SIMD=False'}"
Shouldn't this be checking for neon in TUNE_FEATURES rather than
TUNE_CCARGS_MFPU?
Refer feature-arm-vfp.inc:

TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES',
'callconvention-hard', 'hard', 'softfp', d) if
(d.getVar('TUNE_CCARGS_MFPU') != '') else '' }"

TUNE_CCARGS .= "${@ ' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if
(d.getVar('TUNE_CCARGS_MFLOAT') != '') else ''}"


There are condition that neon is not in TUNE_FEATURES, but vfp is in it.
so TUNE_CCARGS may append -mfloat-abi=softfp, then

simd module here can be compiled sucessfully.
The SIMD code can only be used on targets which support neon. There
may be other cases where the code can be compiled but if it can never
be used at run time it's not very useful.
OK, thanks. I will send V3 patch.

It should also probably be conditional on the _arm
over-ride since neon will be missing from
TUNE_CCARGS_MFPU/TUNE_FEATURES for other architectures.Since big
endian ARM doesn't use the _arm over-ride you will also need a
duplicate line with the same logic with the _armeb override too. See
the lines below which do the equivalent for _powerpc / _powerpc64 as a
reference.
ok. thanks.

# Provide a workaround if Altivec unit is not present in PPC
EXTRA_OECMAKE_append_class-target_powerpc = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
EXTRA_OECMAKE_append_class-target_powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
--
2.17.1



[PATCH 2/2] qemurunner: Increase startup timeout 120 -> 300

Richard Purdie
 

We now spend time copying the VM image into a tmpfs and with IO load on the
system, the time + the boot time of the VM can take longer than 120s. Increase
the timeout to match the added overhead of copying the image file.

Signed-off-by: Richard Purdie <richard.purdie@...>
---
meta/lib/oeqa/utils/qemurunner.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 24af2fb20bb..5dc1a136e3b 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -65,7 +65,7 @@ class QemuRunner:
self.boot_patterns = boot_patterns
self.tmpfsdir = tmpfsdir

- self.runqemutime = 120
+ self.runqemutime = 300
if not workdir:
workdir = os.getcwd()
self.qemu_pidfile = workdir + '/pidfile_' + str(os.getpid())
--
2.30.2


[PATCH 1/2] qemurunner: Try to ensure mmap'd libs are paged in

Richard Purdie
 

We've seeing issues where IO load appears to cause strange failures due to timeouts
within qemu. One theory for these is that it is is hitting hard page faults
at in-opportune moments which cause timing problems within the VM.

This patch is a bit of a hack which tries to ensure the data is paged in
at a point when we know we can take the time delays (waiting for the QMP
start signal). Whilst this isn't ideal, it does seem to improve things on
the autobuilder and shouldn't harm anything.

The code figures out which files to read my looking at the mmap'd files
the process has open from /proc. On Centos7 systems these files are not
user readable, if that is the case we just skip them.

Signed-off-by: Richard Purdie <richard.purdie@...>
---
meta/lib/oeqa/utils/qemurunner.py | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 0032f6ed8dd..24af2fb20bb 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -342,7 +342,24 @@ class QemuRunner:
finally:
os.chdir(origpath)

- # Release the qemu porcess to continue running
+ # We worry that mmap'd libraries may cause page faults which hang the qemu VM for periods
+ # causing failures. Before we "start" qemu, read through it's mapped files to try and
+ # ensure we don't hit page faults later
+ mapdir = "/proc/" + str(self.qemupid) + "/map_files/"
+ try:
+ for f in os.listdir(mapdir):
+ linktarget = os.readlink(os.path.join(mapdir, f))
+ if not linktarget.startswith("/") or linktarget.startswith("/dev") or "deleted" in linktarget:
+ continue
+ with open(linktarget, "rb") as readf:
+ data = True
+ while data:
+ data = readf.read(4096)
+ # Centos7 doesn't allow us to read /map_files/
+ except PermissionError:
+ pass
+
+ # Release the qemu process to continue running
self.run_monitor('cont')

# We are alive: qemu is running
--
2.30.2


Re: [V2][PATCH] libjpeg-turbo: fix do_compile error on armv5

Andre McCurdy
 

On Thu, Jun 10, 2021 at 2:42 AM Changqing Li <changqing.li@...> wrote:
On 6/10/21 1:29 AM, Andre McCurdy wrote:
[Please note: This e-mail is from an EXTERNAL e-mail address]

On Wed, Jun 9, 2021 at 12:32 AM Changqing Li <changqing.li@...> wrote:
From: Changqing Li <changqing.li@...>

fix below error:
/include/arm_neon.h:31:2: error: #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard"
31 | #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard"

Neon is not supported by armv5, disable the simd extension build.
Drop this comment. Neon may be missing from other ISA levels too (i.e.
this fix is not specific to armv5).
Get it. Thanks.

Signed-off-by: Changqing Li <changqing.li@...>
---
meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb | 2 ++
1 file changed, 2 insertions(+)

diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb
index 7f91cc02ac..da21971113 100644
--- a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb
+++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb
@@ -40,6 +40,8 @@ EXTRA_OECMAKE_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx3
# Work around missing non-floating point ABI support in MIPS
EXTRA_OECMAKE_append_class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "-DWITH_SIMD=False", "", d)}"

+EXTRA_OECMAKE_append_class-target = " ${@ ('') if (d.getVar('TUNE_CCARGS_MFPU') != '') else '-DWITH_SIMD=False'}"
Shouldn't this be checking for neon in TUNE_FEATURES rather than
TUNE_CCARGS_MFPU?
Refer feature-arm-vfp.inc:

TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES',
'callconvention-hard', 'hard', 'softfp', d) if
(d.getVar('TUNE_CCARGS_MFPU') != '') else '' }"

TUNE_CCARGS .= "${@ ' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if
(d.getVar('TUNE_CCARGS_MFLOAT') != '') else ''}"


There are condition that neon is not in TUNE_FEATURES, but vfp is in it.
so TUNE_CCARGS may append -mfloat-abi=softfp, then

simd module here can be compiled sucessfully.
The SIMD code can only be used on targets which support neon. There
may be other cases where the code can be compiled but if it can never
be used at run time it's not very useful.

It should also probably be conditional on the _arm
over-ride since neon will be missing from
TUNE_CCARGS_MFPU/TUNE_FEATURES for other architectures.Since big
endian ARM doesn't use the _arm over-ride you will also need a
duplicate line with the same logic with the _armeb override too. See
the lines below which do the equivalent for _powerpc / _powerpc64 as a
reference.
ok. thanks.


# Provide a workaround if Altivec unit is not present in PPC
EXTRA_OECMAKE_append_class-target_powerpc = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
EXTRA_OECMAKE_append_class-target_powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
--
2.17.1




[PATCH] image_types: add zsync conversions

Ross Burton <ross@...>
 

Add image conversion types to create zsync[1] metadata. Use .zsync if
the image is already compressed and .gzsync if zsync should compress the
image itself.

The required tool, zsync-curl, has been submitted to meta-oe.

[1] http://zsync.moria.org.uk

Signed-off-by: Ross Burton <ross.burton@...>
---
meta/classes/image_types.bbclass | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.=
bbclass
index 2a45d45c71..954d6739ec 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -278,7 +278,7 @@ IMAGE_TYPES =3D " \
# CONVERSION_CMD/DEPENDS.
COMPRESSIONTYPES ?=3D ""
=20
-CONVERSIONTYPES =3D "gz bz2 lzma xz lz4 lzo zip zst sum md5sum sha1sum s=
ha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vhd vhdx vdi qcow=
2 base64 ${COMPRESSIONTYPES}"
+CONVERSIONTYPES =3D "gz bz2 lzma xz lz4 lzo zip zst sum md5sum sha1sum s=
ha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vhd vhdx vdi qcow=
2 base64 gzsync zsync ${COMPRESSIONTYPES}"
CONVERSION_CMD_lzma =3D "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}=
.${type}"
CONVERSION_CMD_gz =3D "gzip -f -9 -n -c --rsyncable ${IMAGE_NAME}${IMAGE=
_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
CONVERSION_CMD_bz2 =3D "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$=
{type}"
@@ -302,6 +302,8 @@ CONVERSION_CMD_vhd =3D "qemu-img convert -O vpc -o su=
bformat=3Dfixed ${IMAGE_NAME}${
CONVERSION_CMD_vdi =3D "qemu-img convert -O vdi ${IMAGE_NAME}${IMAGE_NAM=
E_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vdi"
CONVERSION_CMD_qcow2 =3D "qemu-img convert -O qcow2 ${IMAGE_NAME}${IMAGE=
_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qcow2"
CONVERSION_CMD_base64 =3D "base64 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${ty=
pe} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.base64"
+CONVERSION_CMD_zsync =3D "zsyncmake_curl ${IMAGE_NAME}${IMAGE_NAME_SUFFI=
X}.${type}"
+CONVERSION_CMD_gzsync =3D "zsyncmake_curl -z ${IMAGE_NAME}${IMAGE_NAME_S=
UFFIX}.${type}"
CONVERSION_DEPENDS_lzma =3D "xz-native"
CONVERSION_DEPENDS_gz =3D "pigz-native"
CONVERSION_DEPENDS_bz2 =3D "pbzip2-native"
@@ -319,6 +321,8 @@ CONVERSION_DEPENDS_qcow2 =3D "qemu-system-native"
CONVERSION_DEPENDS_base64 =3D "coreutils-native"
CONVERSION_DEPENDS_vhdx =3D "qemu-system-native"
CONVERSION_DEPENDS_vhd =3D "qemu-system-native"
+CONVERSION_DEPENDS_zsync =3D "zsync-curl-native"
+CONVERSION_DEPENDS_gzsync =3D "zsync-curl-native"
=20
RUNNABLE_IMAGE_TYPES ?=3D "ext2 ext3 ext4"
RUNNABLE_MACHINE_PATTERNS ?=3D "qemu"
--=20
2.25.1


[PATCH] liburcu: upgrade 0.12.2 -> 0.13.0

zhengruoqin
 

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@...>
---
.../liburcu/{liburcu_0.12.2.bb => liburcu_0.13.0.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-support/liburcu/{liburcu_0.12.2.bb => liburcu_0.13.0.bb} (86%)

diff --git a/meta/recipes-support/liburcu/liburcu_0.12.2.bb b/meta/recipes-support/liburcu/liburcu_0.13.0.bb
similarity index 86%
rename from meta/recipes-support/liburcu/liburcu_0.12.2.bb
rename to meta/recipes-support/liburcu/liburcu_0.13.0.bb
index b493e939c9..c9fef89789 100644
--- a/meta/recipes-support/liburcu/liburcu_0.12.2.bb
+++ b/meta/recipes-support/liburcu/liburcu_0.13.0.bb
@@ -12,8 +12,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \

SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2"

-SRC_URI[md5sum] = "d94347df78e3f1aa744745eb85787df5"
-SRC_URI[sha256sum] = "4eefc11e4f6c212fc7d84d871e1cc139da0669a46ff3fda557a6fdd4d74ca67b"
+SRC_URI[md5sum] = "8cb75dbb05774c03e66c63cb3186dd59"
+SRC_URI[sha256sum] = "cbb20dbe1a892c2a4d8898bac4316176e585392693d498766ccbbc68cf20ba20"

S = "${WORKDIR}/userspace-rcu-${PV}"
inherit autotools multilib_header
--
2.25.1


[PATCH] libogg: upgrade 1.3.4 -> 1.3.5

zhengruoqin
 

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@...>
---
.../libogg/{libogg_1.3.4.bb => libogg_1.3.5.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-multimedia/libogg/{libogg_1.3.4.bb => libogg_1.3.5.bb} (80%)

diff --git a/meta/recipes-multimedia/libogg/libogg_1.3.4.bb b/meta/recipes-multimedia/libogg/libogg_1.3.5.bb
similarity index 80%
rename from meta/recipes-multimedia/libogg/libogg_1.3.4.bb
rename to meta/recipes-multimedia/libogg/libogg_1.3.5.bb
index c4004619b9..b4f02e404c 100644
--- a/meta/recipes-multimedia/libogg/libogg_1.3.4.bb
+++ b/meta/recipes-multimedia/libogg/libogg_1.3.5.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \

SRC_URI = "http://downloads.xiph.org/releases/ogg/${BP}.tar.xz"

-SRC_URI[md5sum] = "eadef24aad6e3e8379ba0d14971fd64a"
-SRC_URI[sha256sum] = "c163bc12bc300c401b6aa35907ac682671ea376f13ae0969a220f7ddf71893fe"
+SRC_URI[md5sum] = "3178c98341559657a15b185bf5d700a5"
+SRC_URI[sha256sum] = "c4d91be36fc8e54deae7575241e03f4211eb102afb3fc0775fbbc1b740016705"

inherit autotools pkgconfig
--
2.25.1


Re: [V2][PATCH] libjpeg-turbo: fix do_compile error on armv5

Changqing Li
 

On 6/10/21 1:29 AM, Andre McCurdy wrote:
[Please note: This e-mail is from an EXTERNAL e-mail address]

On Wed, Jun 9, 2021 at 12:32 AM Changqing Li <changqing.li@...> wrote:
From: Changqing Li <changqing.li@...>

fix below error:
/include/arm_neon.h:31:2: error: #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard"
31 | #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard"

Neon is not supported by armv5, disable the simd extension build.
Drop this comment. Neon may be missing from other ISA levels too (i.e.
this fix is not specific to armv5).
Get it. Thanks.

Signed-off-by: Changqing Li <changqing.li@...>
---
meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb | 2 ++
1 file changed, 2 insertions(+)

diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb
index 7f91cc02ac..da21971113 100644
--- a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb
+++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.1.0.bb
@@ -40,6 +40,8 @@ EXTRA_OECMAKE_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx3
# Work around missing non-floating point ABI support in MIPS
EXTRA_OECMAKE_append_class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "-DWITH_SIMD=False", "", d)}"

+EXTRA_OECMAKE_append_class-target = " ${@ ('') if (d.getVar('TUNE_CCARGS_MFPU') != '') else '-DWITH_SIMD=False'}"
Shouldn't this be checking for neon in TUNE_FEATURES rather than
TUNE_CCARGS_MFPU?
Refer feature-arm-vfp.inc:

TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU') != '') else '' }"

TUNE_CCARGS   .= "${@ ' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '')     else ''}"


There are condition that neon is not in TUNE_FEATURES, but vfp is in it. so TUNE_CCARGS may append -mfloat-abi=softfp,  then

simd module here can be compiled  sucessfully.

It should also probably be conditional on the _arm
over-ride since neon will be missing from
TUNE_CCARGS_MFPU/TUNE_FEATURES for other architectures.Since big
endian ARM doesn't use the _arm over-ride you will also need a
duplicate line with the same logic with the _armeb override too. See
the lines below which do the equivalent for _powerpc / _powerpc64 as a
reference.
ok. thanks.


# Provide a workaround if Altivec unit is not present in PPC
EXTRA_OECMAKE_append_class-target_powerpc = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
EXTRA_OECMAKE_append_class-target_powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
--
2.17.1



[hardknott][PATCH] libx11: fix CVE-2021-31535

kai
 

From: Kai Kang <kai.kang@...>

Backport patch to fix CVE-2021-31535 of libx11. Adjust indentation as well.

Signed-off-by: Kai Kang <kai.kang@...>
---
.../xorg-lib/libx11/fix-CVE-2021-31535.patch | 320 ++++++++++++++++++
.../recipes-graphics/xorg-lib/libx11_1.7.0.bb | 5 +-
2 files changed, 323 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-graphics/xorg-lib/libx11/fix-CVE-2021-31535.patch

diff --git a/meta/recipes-graphics/xorg-lib/libx11/fix-CVE-2021-31535.patch b/meta/recipes-graphics/xorg-lib/libx11/fix-CVE-2021-31535.patch
new file mode 100644
index 0000000000..2ec5cc1688
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11/fix-CVE-2021-31535.patch
@@ -0,0 +1,320 @@
+From 8d2e02ae650f00c4a53deb625211a0527126c605 Mon Sep 17 00:00:00 2001
+From: Matthieu Herrb <matthieu@...>
+Date: Fri, 19 Feb 2021 15:30:39 +0100
+Subject: [PATCH] Reject string longer than USHRT_MAX before sending them on
+ the wire
+
+The X protocol uses CARD16 values to represent the length so
+this would overflow.
+
+CVE-2021-31535
+
+Signed-off-by: Matthieu Herrb <matthieu@...>
+
+CVE: CVE-2021-31535
+Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/8d2e02a]
+
+Signed-off-by: Kai Kang <kai.kang@...>
+---
+ src/Font.c | 4 +++-
+ src/FontInfo.c | 3 +++
+ src/FontNames.c | 3 +++
+ src/GetColor.c | 4 ++++
+ src/LoadFont.c | 4 ++++
+ src/LookupCol.c | 6 ++++--
+ src/ParseCol.c | 3 +++
+ src/QuExt.c | 5 +++++
+ src/SetFPath.c | 6 ++++++
+ src/SetHints.c | 7 +++++++
+ src/StNColor.c | 3 +++
+ src/StName.c | 7 ++++++-
+ 12 files changed, 51 insertions(+), 4 deletions(-)
+
+diff --git a/src/Font.c b/src/Font.c
+index d4ebdaca..1cd89cca 100644
+--- a/src/Font.c
++++ b/src/Font.c
+@@ -102,6 +102,8 @@ XFontStruct *XLoadQueryFont(
+ XF86BigfontCodes *extcodes = _XF86BigfontCodes(dpy);
+ #endif
+
++ if (strlen(name) >= USHRT_MAX)
++ return NULL;
+ if (_XF86LoadQueryLocaleFont(dpy, name, &font_result, (Font *)0))
+ return font_result;
+ LockDisplay(dpy);
+@@ -663,7 +665,7 @@ int _XF86LoadQueryLocaleFont(
+ if (!name)
+ return 0;
+ l = (int) strlen(name);
+- if (l < 2 || name[l - 1] != '*' || name[l - 2] != '-')
++ if (l < 2 || name[l - 1] != '*' || name[l - 2] != '-' || l >= USHRT_MAX)
+ return 0;
+ charset = NULL;
+ /* next three lines stolen from _XkbGetCharset() */
+diff --git a/src/FontInfo.c b/src/FontInfo.c
+index 694efa10..6644b3fa 100644
+--- a/src/FontInfo.c
++++ b/src/FontInfo.c
+@@ -58,6 +58,9 @@ XFontStruct **info) /* RETURN */
+ register xListFontsReq *req;
+ int j;
+
++ if (strlen(pattern) >= USHRT_MAX)
++ return NULL;
++
+ LockDisplay(dpy);
+ GetReq(ListFontsWithInfo, req);
+ req->maxNames = maxNames;
+diff --git a/src/FontNames.c b/src/FontNames.c
+index 30912925..458d80c9 100644
+--- a/src/FontNames.c
++++ b/src/FontNames.c
+@@ -51,6 +51,9 @@ int *actualCount) /* RETURN */
+ register xListFontsReq *req;
+ unsigned long rlen = 0;
+
++ if (strlen(pattern) >= USHRT_MAX)
++ return NULL;
++
+ LockDisplay(dpy);
+ GetReq(ListFonts, req);
+ req->maxNames = maxNames;
+diff --git a/src/GetColor.c b/src/GetColor.c
+index d088497f..c8178067 100644
+--- a/src/GetColor.c
++++ b/src/GetColor.c
+@@ -27,6 +27,7 @@ in this Software without prior written authorization from The Open Group.
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++#include <limits.h>
+ #include <stdio.h>
+ #include "Xlibint.h"
+ #include "Xcmsint.h"
+@@ -48,6 +49,9 @@ XColor *exact_def) /* RETURN */
+ XcmsColor cmsColor_exact;
+ Status ret;
+
++ if (strlen(colorname) >= USHRT_MAX)
++ return (0);
++
+ #ifdef XCMS
+ /*
+ * Let's Attempt to use Xcms and i18n approach to Parse Color
+diff --git a/src/LoadFont.c b/src/LoadFont.c
+index 0a3809a8..3996436f 100644
+--- a/src/LoadFont.c
++++ b/src/LoadFont.c
+@@ -27,6 +27,7 @@ in this Software without prior written authorization from The Open Group.
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++#include <limits.h>
+ #include "Xlibint.h"
+
+ Font
+@@ -38,6 +39,9 @@ XLoadFont (
+ Font fid;
+ register xOpenFontReq *req;
+
++ if (strlen(name) >= USHRT_MAX)
++ return (0);
++
+ if (_XF86LoadQueryLocaleFont(dpy, name, (XFontStruct **)0, &fid))
+ return fid;
+
+diff --git a/src/LookupCol.c b/src/LookupCol.c
+index 9608d512..cd9b1368 100644
+--- a/src/LookupCol.c
++++ b/src/LookupCol.c
+@@ -27,6 +27,7 @@ in this Software without prior written authorization from The Open Group.
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++#include <limits.h>
+ #include <stdio.h>
+ #include "Xlibint.h"
+ #include "Xcmsint.h"
+@@ -46,6 +47,9 @@ XLookupColor (
+ XcmsCCC ccc;
+ XcmsColor cmsColor_exact;
+
++ n = (int) strlen (spec);
++ if (n >= USHRT_MAX)
++ return 0;
+ #ifdef XCMS
+ /*
+ * Let's Attempt to use Xcms and i18n approach to Parse Color
+@@ -77,8 +81,6 @@ XLookupColor (
+ * Xcms and i18n methods failed, so lets pass it to the server
+ * for parsing.
+ */
+-
+- n = (int) strlen (spec);
+ LockDisplay(dpy);
+ GetReq (LookupColor, req);
+ req->cmap = cmap;
+diff --git a/src/ParseCol.c b/src/ParseCol.c
+index 2691df36..7a84a17b 100644
+--- a/src/ParseCol.c
++++ b/src/ParseCol.c
+@@ -27,6 +27,7 @@ in this Software without prior written authorization from The Open Group.
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++#include <limits.h>
+ #include <stdio.h>
+ #include "Xlibint.h"
+ #include "Xcmsint.h"
+@@ -47,6 +48,8 @@ XParseColor (
+
+ if (!spec) return(0);
+ n = (int) strlen (spec);
++ if (n >= USHRT_MAX)
++ return(0);
+ if (*spec == '#') {
+ /*
+ * RGB
+diff --git a/src/QuExt.c b/src/QuExt.c
+index 2021dca4..4cb99fcf 100644
+--- a/src/QuExt.c
++++ b/src/QuExt.c
+@@ -27,6 +27,8 @@ in this Software without prior written authorization from The Open Group.
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++#include <limits.h>
++#include <stdbool.h>
+ #include "Xlibint.h"
+
+ Bool
+@@ -40,6 +42,9 @@ XQueryExtension(
+ xQueryExtensionReply rep;
+ register xQueryExtensionReq *req;
+
++ if (strlen(name) >= USHRT_MAX)
++ return false;
++
+ LockDisplay(dpy);
+ GetReq(QueryExtension, req);
+ req->nbytes = name ? (CARD16) strlen(name) : 0;
+diff --git a/src/SetFPath.c b/src/SetFPath.c
+index 7d12f18c..13fce49e 100644
+--- a/src/SetFPath.c
++++ b/src/SetFPath.c
+@@ -26,6 +26,7 @@ in this Software without prior written authorization from The Open Group.
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
++#include <limits.h>
+ #endif
+ #include "Xlibint.h"
+
+@@ -49,6 +50,11 @@ XSetFontPath (
+ req->nFonts = ndirs;
+ for (i = 0; i < ndirs; i++) {
+ n = (int) ((size_t) n + (safestrlen (directories[i]) + 1));
++ if (n >= USHRT_MAX) {
++ UnlockDisplay(dpy);
++ SyncHandle();
++ return 0;
++ }
+ }
+ nbytes = (n + 3) & ~3;
+ req->length += nbytes >> 2;
+diff --git a/src/SetHints.c b/src/SetHints.c
+index e81aa9d3..61cb0684 100644
+--- a/src/SetHints.c
++++ b/src/SetHints.c
+@@ -49,6 +49,7 @@ SOFTWARE.
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++#include <limits.h>
+ #include <X11/Xlibint.h>
+ #include <X11/Xutil.h>
+ #include "Xatomtype.h"
+@@ -214,6 +215,8 @@ XSetCommand (
+ register char *buf, *bp;
+ for (i = 0, nbytes = 0; i < argc; i++) {
+ nbytes += safestrlen(argv[i]) + 1;
++ if (nbytes >= USHRT_MAX)
++ return 1;
+ }
+ if ((bp = buf = Xmalloc(nbytes))) {
+ /* copy arguments into single buffer */
+@@ -256,6 +259,8 @@ XSetStandardProperties (
+
+ if (name != NULL) XStoreName (dpy, w, name);
+
++ if (safestrlen(icon_string) >= USHRT_MAX)
++ return 1;
+ if (icon_string != NULL) {
+ XChangeProperty (dpy, w, XA_WM_ICON_NAME, XA_STRING, 8,
+ PropModeReplace,
+@@ -298,6 +303,8 @@ XSetClassHint(
+
+ len_nm = safestrlen(classhint->res_name);
+ len_cl = safestrlen(classhint->res_class);
++ if (len_nm + len_cl >= USHRT_MAX)
++ return 1;
+ if ((class_string = s = Xmalloc(len_nm + len_cl + 2))) {
+ if (len_nm) {
+ strcpy(s, classhint->res_name);
+diff --git a/src/StNColor.c b/src/StNColor.c
+index 3b50401b..16dc9cbc 100644
+--- a/src/StNColor.c
++++ b/src/StNColor.c
+@@ -27,6 +27,7 @@ in this Software without prior written authorization from The Open Group.
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++#include <limits.h>
+ #include <stdio.h>
+ #include "Xlibint.h"
+ #include "Xcmsint.h"
+@@ -46,6 +47,8 @@ int flags) /* DoRed, DoGreen, DoBlue */
+ XcmsColor cmsColor_exact;
+ XColor scr_def;
+
++ if (strlen(name) >= USHRT_MAX)
++ return 0;
+ #ifdef XCMS
+ /*
+ * Let's Attempt to use Xcms approach to Parse Color
+diff --git a/src/StName.c b/src/StName.c
+index 58b5a5a6..04bb3aa6 100644
+--- a/src/StName.c
++++ b/src/StName.c
+@@ -27,6 +27,7 @@ in this Software without prior written authorization from The Open Group.
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++#include <limits.h>
+ #include <X11/Xlibint.h>
+ #include <X11/Xatom.h>
+
+@@ -36,7 +37,9 @@ XStoreName (
+ Window w,
+ _Xconst char *name)
+ {
+- return XChangeProperty(dpy, w, XA_WM_NAME, XA_STRING,
++ if (strlen(name) >= USHRT_MAX)
++ return 0;
++ return XChangeProperty(dpy, w, XA_WM_NAME, XA_STRING, /* */
+ 8, PropModeReplace, (_Xconst unsigned char *)name,
+ name ? (int) strlen(name) : 0);
+ }
+@@ -47,6 +50,8 @@ XSetIconName (
+ Window w,
+ _Xconst char *icon_name)
+ {
++ if (strlen(icon_name) >= USHRT_MAX)
++ return 0;
+ return XChangeProperty(dpy, w, XA_WM_ICON_NAME, XA_STRING, 8,
+ PropModeReplace, (_Xconst unsigned char *)icon_name,
+ icon_name ? (int) strlen(icon_name) : 0);
+--
+GitLab
+
diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.7.0.bb b/meta/recipes-graphics/xorg-lib/libx11_1.7.0.bb
index 3faee6e497..c6429cbbac 100644
--- a/meta/recipes-graphics/xorg-lib/libx11_1.7.0.bb
+++ b/meta/recipes-graphics/xorg-lib/libx11_1.7.0.bb
@@ -11,8 +11,9 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/libx11:"
PE = "1"

SRC_URI += "file://Fix-hanging-issue-in-_XReply.patch \
- file://disable_tests.patch \
- "
+ file://disable_tests.patch \
+ file://fix-CVE-2021-31535.patch \
+ "

SRC_URI[sha256sum] = "36c8f93b6595437c8cfbc9f08618bcb3041cbd303e140a0013f88e4c2977cb54"

--
2.17.1

16161 - 16180 of 169003