Skip to contentSkip to conversation

Patch review

PATCH In review Steve Sakoman 4 participants 21 messages Feb 12, 2024 – Feb 22, 2024

lore
Share & tools
lore
#0 lore raw

cover Patch review

Please review this set of changes for kirkstone and have comments back by end of day Wednesday, February 14

Passed a-full on autobuilder:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/6556

The following changes since commit 2bdae590ab20dc4518ba247c903060fa67ed0fc4:

openssl: Upgrade 3.0.12 -> 3.0.13 (2024-02-05 03:56:38 -1000)

are available in the Git repository at:

https://git.openembedded.org/openembedded-core-contrib stable/kirkstone-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/kirkstone-nut

Archana Polampalli (1):
curl: Fix CVE-2023-46219

Bruce Ashfield (1):
kernel: fix localversion in v6.3+

Jermain Horsman (1):
systemd: Only add myhostname to nsswitch.conf if in PACKAGECONFIG

Kai Kang (1):
ghostscript: correct LICENSE with AGPLv3

Narpat Mali (1):
python3-pycryptodome: Fix CVE-2023-52323

Soumya Sambu (2):
go: Fix CVE-2023-45285 and CVE-2023-45287
libgit2: Fix CVE-2024-24575 and CVE-2024-24577

Vijay Anusuri (1):
libxml2: Fix for CVE-2024-25062

 meta/classes/kernel-arch.bbclass              |    7 +
 meta/classes/kernel.bbclass                   |   10 +-
 .../libxml/libxml2/CVE-2024-25062.patch       |   33 +
 meta/recipes-core/libxml/libxml2_2.9.14.bb    |    1 +
 meta/recipes-core/systemd/systemd_250.5.bb    |   16 +-
 meta/recipes-devtools/go/go-1.17.13.inc       |    2 +
 .../go/go-1.20/CVE-2023-45285.patch           |  110 ++
 .../go/go-1.20/CVE-2023-45287.patch           | 1695 +++++++++++++++++
 .../python3-pycryptodome/CVE-2023-52323.patch |  436 +++++
 .../python/python3-pycryptodome_3.14.1.bb     |    1 +
 .../CVE-2023-52323.patch                      |  436 +++++
 .../python/python3-pycryptodomex_3.14.1.bb    |    2 +
 .../ghostscript/ghostscript_9.55.0.bb         |    2 +-
 .../curl/curl/CVE-2023-46219-0001.patch       |   42 +
 .../curl/curl/CVE-2023-46219-0002.patch       |  133 ++
 .../curl/curl/CVE-2023-46219-0003.patch       |   81 +
 meta/recipes-support/curl/curl_7.82.0.bb      |    3 +
 .../libgit2/libgit2/CVE-2024-24575.patch      |   56 +
 .../libgit2/libgit2/CVE-2024-24577.patch      |   52 +
 meta/recipes-support/libgit2/libgit2_1.4.5.bb |    5 +-
 20 files changed, 3113 insertions(+), 10 deletions(-)
 create mode 100644 meta/recipes-core/libxml/libxml2/CVE-2024-25062.patch
 create mode 100644 meta/recipes-devtools/go/go-1.20/CVE-2023-45285.patch
 create mode 100644 meta/recipes-devtools/go/go-1.20/CVE-2023-45287.patch
 create mode 100644 meta/recipes-devtools/python/python3-pycryptodome/CVE-2023-52323.patch
 create mode 100644 meta/recipes-devtools/python/python3-pycryptodomex/CVE-2023-52323.patch
 create mode 100644 meta/recipes-support/curl/curl/CVE-2023-46219-0001.patch
 create mode 100644 meta/recipes-support/curl/curl/CVE-2023-46219-0002.patch
 create mode 100644 meta/recipes-support/curl/curl/CVE-2023-46219-0003.patch
 create mode 100644 meta/recipes-support/libgit2/libgit2/CVE-2024-24575.patch
 create mode 100644 meta/recipes-support/libgit2/libgit2/CVE-2024-24577.patch
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/8 libxml2: Fix for CVE-2024-25062

From: Vijay Anusuri <[email protected]>

Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/2b0aac140d739905c7848a42efc60bfe783a39b7]

---
 .../libxml/libxml2/CVE-2024-25062.patch       | 33 +++++++++++++++++++
 meta/recipes-core/libxml/libxml2_2.9.14.bb    |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-core/libxml/libxml2/CVE-2024-25062.patch
meta/recipes-core/libxml/libxml2/CVE-2024-25062.patch new file +33 -0
new file mode 100644
index 0000000000..5365d5546a
@@ -0,0 +1,33 @@
+From 2b0aac140d739905c7848a42efc60bfe783a39b7 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <[email protected]>
+Date: Sat, 14 Oct 2023 22:45:54 +0200
+Subject: [PATCH] [CVE-2024-25062] xmlreader: Don't expand XIncludes when
+ backtracking
+
+Fixes a use-after-free if XML Reader if used with DTD validation and
+XInclude expansion.
+
+Fixes #604.
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/2b0aac140d739905c7848a42efc60bfe783a39b7]
+CVE: CVE-2024-25062
+Signed-off-by: Vijay Anusuri <[email protected]>
+---
+ xmlreader.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/xmlreader.c b/xmlreader.c
+index 979385a13..fefd68e0b 100644
+--- a/xmlreader.c
++++ b/xmlreader.c
+@@ -1443,6 +1443,7 @@ node_found:
+      * Handle XInclude if asked for
+      */
+     if ((reader->xinclude) && (reader->in_xinclude == 0) &&
++        (reader->state != XML_TEXTREADER_BACKTRACK) &&
+         (reader->node != NULL) &&
+ 	(reader->node->type == XML_ELEMENT_NODE) &&
+ 	(reader->node->ns != NULL) &&
+-- 
+GitLab
+
meta/recipes-core/libxml/libxml2_2.9.14.bb +1 -0
index 533a6dae01..2b7e9999d9 100644
@@ -31,6 +31,7 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar;subdir=${BP};name=testt
            file://CVE-2023-39615-0002.patch \
            file://CVE-2023-45322-1.patch \
            file://CVE-2023-45322-2.patch \
+           file://CVE-2024-25062.patch \
            "
 
 SRC_URI[archive.sha256sum] = "60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee"
Signature · 1 line
2.34.1
#3 lore raw

PATCH 2/8 go: Fix CVE-2023-45285 and CVE-2023-45287

In reply to Steve Sakoman

From: Soumya Sambu <[email protected]>

CVE-2023-45285:
Using go get to fetch a module with the ".git" suffix may unexpectedly fallback to the insecure "git://" protocol if the module is unavailable via the secure "https://" and "git+ssh://" protocols, even if GOINSECURE is not set for said module. This only affects users who are not using the module proxy and are fetching modules directly (i.e. GOPROXY=off).

CVE-2023-45287:
Before Go 1.20, the RSA based TLS key exchanges used the math/big library, which is not constant time. RSA blinding was applied to prevent timing attacks, but analysis shows this may not have been fully effective. In particular it appears as if the removal of PKCS#1 padding may leak timing information, which in turn could be used to recover session key bits. In Go 1.20, the crypto/tls library switched to a fully constant time RSA implementation, which we do not believe exhibits any timing side channels.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-45285
https://nvd.nist.gov/vuln/detail/CVE-2023-45287
https://security-tracker.debian.org/tracker/CVE-2023-45285
https://security-tracker.debian.org/tracker/CVE-2023-45287

---
 meta/recipes-devtools/go/go-1.17.13.inc       |    2 +
 .../go/go-1.20/CVE-2023-45285.patch           |  110 ++
 .../go/go-1.20/CVE-2023-45287.patch           | 1695 +++++++++++++++++
 3 files changed, 1807 insertions(+)
 create mode 100644 meta/recipes-devtools/go/go-1.20/CVE-2023-45285.patch
 create mode 100644 meta/recipes-devtools/go/go-1.20/CVE-2023-45287.patch
meta/recipes-devtools/go/go-1.17.13.inc +2 -0
index 95c4461d3e..6fc07bb910 100644
@@ -48,6 +48,8 @@ SRC_URI += "\
     file://CVE-2023-39319.patch \
     file://CVE-2023-39318.patch \
     file://CVE-2023-39326.patch \
+    file://CVE-2023-45285.patch \
+    file://CVE-2023-45287.patch \
 "
 SRC_URI[main.sha256sum] = "a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784ada0cd300fd"
 
meta/recipes-devtools/go/go-1.20/CVE-2023-45285.patch new file +110 -0

110 lines not on this page · raw message

meta/recipes-devtools/go/go-1.20/CVE-2023-45287.patch new file +1695 -0

1,695 lines not on this page · raw message

Signature · 1 line
2.34.1
#4 lore raw

PATCH 3/8 curl: Fix CVE-2023-46219

In reply to Steve Sakoman

From: Archana Polampalli <[email protected]>

When saving HSTS data to an excessively long file name, curl could end up removing all contents, making subsequent requests using that file unaware of the HSTS status they should otherwise use.

---
 .../curl/curl/CVE-2023-46219-0001.patch       |  42 ++++++
 .../curl/curl/CVE-2023-46219-0002.patch       | 133 ++++++++++++++++++
 .../curl/curl/CVE-2023-46219-0003.patch       |  81 +++++++++++
 meta/recipes-support/curl/curl_7.82.0.bb      |   3 +
 4 files changed, 259 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2023-46219-0001.patch
 create mode 100644 meta/recipes-support/curl/curl/CVE-2023-46219-0002.patch
 create mode 100644 meta/recipes-support/curl/curl/CVE-2023-46219-0003.patch
meta/recipes-support/curl/curl/CVE-2023-46219-0001.patch new file +42 -0
new file mode 100644
index 0000000000..55e8f6fac9
@@ -0,0 +1,42 @@
+From 0c667188e0c6cda615a036b8a2b4125f2c404dde Mon Sep 17 00:00:00 2001
+From: SaltyMilk <[email protected]>
+Date: Mon, 10 Jul 2023 21:43:28 +0200
+Subject: [PATCH] fopen: optimize
+
+Closes #11419
+
+CVE: CVE-2023-46219
+
+Upstream-Status: Backport [https://github.com/curl/curl/commit/0c667188e0c6]
+
+Signed-off-by: Archana Polampalli <[email protected]>
+---
+ lib/fopen.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/lib/fopen.c b/lib/fopen.c
+index ad3691b..92f39cf 100644
+--- a/lib/fopen.c
++++ b/lib/fopen.c
+@@ -56,13 +56,13 @@ CURLcode Curl_fopen(struct Curl_easy *data, const char *filename,
+   int fd = -1;
+   *tempname = NULL;
+
+-  if(stat(filename, &sb) == -1 || !S_ISREG(sb.st_mode)) {
+-    /* a non-regular file, fallback to direct fopen() */
+-    *fh = fopen(filename, FOPEN_WRITETEXT);
+-    if(*fh)
+-      return CURLE_OK;
++  *fh = fopen(filename, FOPEN_WRITETEXT);
++  if(!*fh)
+     goto fail;
+-  }
++  if(fstat(fileno(*fh), &sb) == -1 || !S_ISREG(sb.st_mode))
++    return CURLE_OK;
++  fclose(*fh);
++  *fh = NULL;
+
+   result = Curl_rand_hex(data, randsuffix, sizeof(randsuffix));
+   if(result)
+--
+2.40.0
meta/recipes-support/curl/curl/CVE-2023-46219-0002.patch new file +133 -0

133 lines not on this page · raw message

meta/recipes-support/curl/curl/CVE-2023-46219-0003.patch new file +81 -0

81 lines not on this page · raw message

meta/recipes-support/curl/curl_7.82.0.bb +3 -0
index 965f05bc98..de69d3d53b 100644
@@ -54,6 +54,9 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \
            file://CVE-2023-38545.patch \
            file://CVE-2023-38546.patch \
            file://CVE-2023-46218.patch \
+           file://CVE-2023-46219-0001.patch \
+           file://CVE-2023-46219-0002.patch \
+           file://CVE-2023-46219-0003.patch \
            "
 SRC_URI[sha256sum] = "0aaa12d7bd04b0966254f2703ce80dd5c38dbbd76af0297d3d690cdce58a583c"
 
Signature · 1 line
2.34.1
#6 lore raw

PATCH 4/8 libgit2: Fix CVE-2024-24575 and CVE-2024-24577

In reply to Steve Sakoman

From: Soumya Sambu <[email protected]>

CVE-2024-24575:
libgit2 is a portable C implementation of the Git core methods provided as a linkable library with a solid API, allowing to build Git functionality into your application. Using well-crafted inputs to git_revparse_single can cause the function to enter an infinite loop, potentially causing a Denial of Service attack in the calling application. The revparse function in src/libgit2/revparse.c uses a loop to parse the user-provided spec string. There is an edge-case during parsing that allows a bad actor to force the loop conditions to access arbitrary memory. Potentially, this could also leak memory if the extracted rev spec is reflected back to the attacker. As such, libgit2 versions before 1.4.0 are not affected. Users should upgrade to version 1.6.5 or 1.7.2.

CVE-2024-24577:
libgit2 is a portable C implementation of the Git core methods provided as a linkable library with a solid API, allowing to build Git functionality into your application. Using well-crafted inputs to git_index_add can cause heap corruption that could be leveraged for arbitrary code execution. There is an issue in the has_dir_name function in src/libgit2/index.c, which frees an entry that should not be freed. The freed entry is later used and overwritten with potentially bad actor-controlled data leading to controlled heap corruption. Depending on the application that uses libgit2, this could lead to arbitrary code execution. This issue has been patched in version 1.6.5 and 1.7.2.

References:
https://nvd.nist.gov/vuln/detail/CVE-2024-24575
https://security-tracker.debian.org/tracker/CVE-2024-24575
https://nvd.nist.gov/vuln/detail/CVE-2024-24577
https://security-tracker.debian.org/tracker/CVE-2024-24577

---
 .../libgit2/libgit2/CVE-2024-24575.patch      | 56 +++++++++++++++++++
 .../libgit2/libgit2/CVE-2024-24577.patch      | 52 +++++++++++++++++
 meta/recipes-support/libgit2/libgit2_1.4.5.bb |  5 +-
 3 files changed, 112 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/libgit2/libgit2/CVE-2024-24575.patch
 create mode 100644 meta/recipes-support/libgit2/libgit2/CVE-2024-24577.patch
meta/recipes-support/libgit2/libgit2/CVE-2024-24575.patch new file +56 -0
new file mode 100644
index 0000000000..d3957ac5d0
@@ -0,0 +1,56 @@
+From c9d31b711e8906cf248566f43142f20b03e20cbf Mon Sep 17 00:00:00 2001
+From: Edward Thomson <[email protected]>
+Date: Fri, 17 Nov 2023 16:54:47 +0000
+Subject: [PATCH] revparse: fix parsing bug for trailing `@`
+
+When parsing a revspec that ends with a trailing `@`, explicitly stop
+parsing. Introduce a sentinel variable to explicitly stop parsing.
+
+Prior to this, we would set `spec` to `HEAD`, but were looping on the
+value of `spec[pos]`, so we would continue walking the (new) `spec`
+at offset `pos`, looking for a NUL. This is obviously an out-of-bounds
+read.
+
+Credit to Michael Rodler (@f0rki) and Amazon AWS Security.
+
+CVE: CVE-2024-24575
+
+Upstream-Status: Backport [https://github.com/libgit2/libgit2/commit/c9d31b711e8906cf248566f43142f20b03e20cbf]
+
+Signed-off-by: Soumya Sambu <[email protected]>
+---
+ src/revparse.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/revparse.c b/src/revparse.c
+index 9bc28e9fc..d3bbe840b 100644
+--- a/src/revparse.c
++++ b/src/revparse.c
+@@ -685,6 +685,7 @@ static int revparse(
+	git_object *base_rev = NULL;
+
+	bool should_return_reference = true;
++	bool parsed = false;
+
+	GIT_ASSERT_ARG(object_out);
+	GIT_ASSERT_ARG(reference_out);
+@@ -694,7 +695,7 @@ static int revparse(
+	*object_out = NULL;
+	*reference_out = NULL;
+
+-	while (spec[pos]) {
++	while (!parsed && spec[pos]) {
+		switch (spec[pos]) {
+		case '^':
+			should_return_reference = false;
+@@ -801,6 +802,8 @@ static int revparse(
+				break;
+			} else if (spec[pos+1] == '\0') {
+				spec = "HEAD";
++				identifier_len = 4;
++				parsed = true;
+				break;
+			}
+			/* fall through */
+--
+2.40.0
meta/recipes-support/libgit2/libgit2/CVE-2024-24577.patch new file +52 -0

52 lines not on this page · raw message

meta/recipes-support/libgit2/libgit2_1.4.5.bb +4 -1
index aadfe4ad02..ad8b9a536a 100644
@@ -5,7 +5,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e5a9227de4cb6afb5d35ed7b0fdf480d"
 
 DEPENDS = "curl openssl zlib libssh2 libgcrypt libpcre2"
 
-SRC_URI = "git://github.com/libgit2/libgit2.git;branch=maint/v1.4;protocol=https"
+SRC_URI = "git://github.com/libgit2/libgit2.git;branch=maint/v1.4;protocol=https \
+           file://CVE-2024-24575.patch \
+           file://CVE-2024-24577.patch \
+           "
 SRCREV = "cd6f679af401eda1f172402006ef8265f8bd58ea"
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.34.1
#7 lore raw

PATCH 5/8 python3-pycryptodome: Fix CVE-2023-52323

In reply to Steve Sakoman

From: Narpat Mali <[email protected]>

PyCryptodome and pycryptodomex before 3.19.1 allow side-channel leakage for OAEP decryption, exploitable for a Manger attack.

References:
https://security-tracker.debian.org/tracker/CVE-2023-52323
https://github.com/Legrandin/pycryptodome/blob/master/Changelog.rst

---
 .../python3-pycryptodome/CVE-2023-52323.patch | 436 ++++++++++++++++++
 .../python/python3-pycryptodome_3.14.1.bb     |   1 +
 .../CVE-2023-52323.patch                      | 436 ++++++++++++++++++
 .../python/python3-pycryptodomex_3.14.1.bb    |   2 +
 4 files changed, 875 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-pycryptodome/CVE-2023-52323.patch
 create mode 100644 meta/recipes-devtools/python/python3-pycryptodomex/CVE-2023-52323.patch
meta/recipes-devtools/python/python3-pycryptodome/CVE-2023-52323.patch new file +436 -0
new file mode 100644
index 0000000000..be3090eb8d
@@ -0,0 +1,436 @@
+From 73bbed822fadddf3c0ab4a945ee6ab16bbca6961 Mon Sep 17 00:00:00 2001
+From: Helder Eijs <[email protected]>
+Date: Thu, 1 Feb 2024 13:43:44 +0000
+Subject: [PATCH] Use constant-time (faster) padding decoding also for OAEP
+
+CVE: CVE-2023-52323
+
+Upstream-Status: Backport [https://github.com/Legrandin/pycryptodome/commit/0deea1bfe1489e8c80d2053bbb06a1aa0b181ebd]
+
+Signed-off-by: Narpat Mali <[email protected]>
+---
+ lib/Crypto/Cipher/PKCS1_OAEP.py         | 38 +++++-------
+ lib/Crypto/Cipher/PKCS1_v1_5.py         | 31 +---------
+ lib/Crypto/Cipher/_pkcs1_oaep_decode.py | 41 +++++++++++++
+ src/pkcs1_decode.c                      | 79 +++++++++++++++++++++++--
+ src/test/test_pkcs1.c                   | 22 +++----
+ 5 files changed, 145 insertions(+), 66 deletions(-)
+ create mode 100644 lib/Crypto/Cipher/_pkcs1_oaep_decode.py
+
+diff --git a/lib/Crypto/Cipher/PKCS1_OAEP.py b/lib/Crypto/Cipher/PKCS1_OAEP.py
+index 57a982b..6974584 100644
+--- a/lib/Crypto/Cipher/PKCS1_OAEP.py
++++ b/lib/Crypto/Cipher/PKCS1_OAEP.py
+@@ -23,11 +23,13 @@
+ from Crypto.Signature.pss import MGF1
+ import Crypto.Hash.SHA1
+
+-from Crypto.Util.py3compat import bord, _copy_bytes
++from Crypto.Util.py3compat import _copy_bytes
+ import Crypto.Util.number
+-from   Crypto.Util.number import ceil_div, bytes_to_long, long_to_bytes
+-from   Crypto.Util.strxor import strxor
++from Crypto.Util.number import ceil_div, bytes_to_long, long_to_bytes
++from Crypto.Util.strxor import strxor
+ from Crypto import Random
++from ._pkcs1_oaep_decode import oaep_decode
++
+
+ class PKCS1OAEP_Cipher:
+     """Cipher object for PKCS#1 v1.5 OAEP.
+@@ -68,7 +70,7 @@ class PKCS1OAEP_Cipher:
+         if mgfunc:
+             self._mgf = mgfunc
+         else:
+-            self._mgf = lambda x,y: MGF1(x,y,self._hashObj)
++            self._mgf = lambda x, y: MGF1(x, y, self._hashObj)
+
+         self._label = _copy_bytes(None, None, label)
+         self._randfunc = randfunc
+@@ -105,7 +107,7 @@ class PKCS1OAEP_Cipher:
+
+         # See 7.1.1 in RFC3447
+         modBits = Crypto.Util.number.size(self._key.n)
+-        k = ceil_div(modBits, 8) # Convert from bits to bytes
++        k = ceil_div(modBits, 8)            # Convert from bits to bytes
+         hLen = self._hashObj.digest_size
+         mLen = len(message)
+
+@@ -159,11 +161,11 @@ class PKCS1OAEP_Cipher:
+
+         # See 7.1.2 in RFC3447
+         modBits = Crypto.Util.number.size(self._key.n)
+-        k = ceil_div(modBits,8) # Convert from bits to bytes
++        k = ceil_div(modBits, 8)            # Convert from bits to bytes
+         hLen = self._hashObj.digest_size
+
+         # Step 1b and 1c
+-        if len(ciphertext) != k or k<hLen+2:
++        if len(ciphertext) != k or k < hLen+2:
+             raise ValueError("Ciphertext with incorrect length.")
+         # Step 2a (O2SIP)
+         ct_int = bytes_to_long(ciphertext)
+@@ -173,8 +175,6 @@ class PKCS1OAEP_Cipher:
+         em = long_to_bytes(m_int, k)
+         # Step 3a
+         lHash = self._hashObj.new(self._label).digest()
+-        # Step 3b
+-        y = em[0]
+         # y must be 0, but we MUST NOT check it here in order not to
+         # allow attacks like Manger's (http://dl.acm.org/citation.cfm?id=704143)
+         maskedSeed = em[1:hLen+1]
+@@ -187,22 +187,17 @@ class PKCS1OAEP_Cipher:
+         dbMask = self._mgf(seed, k-hLen-1)
+         # Step 3f
+         db = strxor(maskedDB, dbMask)
+-        # Step 3g
+-        one_pos = hLen + db[hLen:].find(b'\x01')
+-        lHash1 = db[:hLen]
+-        invalid = bord(y) | int(one_pos < hLen)
+-        hash_compare = strxor(lHash1, lHash)
+-        for x in hash_compare:
+-            invalid |= bord(x)
+-        for x in db[hLen:one_pos]:
+-            invalid |= bord(x)
+-        if invalid != 0:
++        # Step 3b + 3g
++        res = oaep_decode(em, lHash, db)
++        if res <= 0:
+             raise ValueError("Incorrect decryption.")
+         # Step 4
+-        return db[one_pos + 1:]
++        return db[res:]
++
+
+ def new(key, hashAlgo=None, mgfunc=None, label=b'', randfunc=None):
+-    """Return a cipher object :class:`PKCS1OAEP_Cipher` that can be used to perform PKCS#1 OAEP encryption or decryption.
++    """Return a cipher object :class:`PKCS1OAEP_Cipher`
++       that can be used to perform PKCS#1 OAEP encryption or decryption.
+
+     :param key:
+       The key object to use to encrypt or decrypt the message.
+@@ -236,4 +231,3 @@ def new(key, hashAlgo=None, mgfunc=None, label=b'', randfunc=None):
+     if randfunc is None:
+         randfunc = Random.get_random_bytes
+     return PKCS1OAEP_Cipher(key, hashAlgo, mgfunc, label, randfunc)
+-
+diff --git a/lib/Crypto/Cipher/PKCS1_v1_5.py b/lib/Crypto/Cipher/PKCS1_v1_5.py
+index d0d474a..94e99cf 100644
+--- a/lib/Crypto/Cipher/PKCS1_v1_5.py
++++ b/lib/Crypto/Cipher/PKCS1_v1_5.py
+@@ -25,31 +25,7 @@ __all__ = ['new', 'PKCS115_Cipher']
+ from Crypto import Random
+ from Crypto.Util.number import bytes_to_long, long_to_bytes
+ from Crypto.Util.py3compat import bord, is_bytes, _copy_bytes
+-
+-from Crypto.Util._raw_api import (load_pycryptodome_raw_lib, c_size_t,
+-                                  c_uint8_ptr)
+-
+-
+-_raw_pkcs1_decode = load_pycryptodome_raw_lib("Crypto.Cipher._pkcs1_decode",
+-                        """
+-                        int pkcs1_decode(const uint8_t *em, size_t len_em,
+-                                         const uint8_t *sentinel, size_t len_sentinel,
+-                                         size_t expected_pt_len,
+-                                         uint8_t *output);
+-                        """)
+-
+-
+-def _pkcs1_decode(em, sentinel, expected_pt_len, output):
+-    if len(em) != len(output):
+-        raise ValueError("Incorrect output length")
+-
+-    ret = _raw_pkcs1_decode.pkcs1_decode(c_uint8_ptr(em),
+-                                         c_size_t(len(em)),
+-                                         c_uint8_ptr(sentinel),
+-                                         c_size_t(len(sentinel)),
+-                                         c_size_t(expected_pt_len),
+-                                         c_uint8_ptr(output))
+-    return ret
++from ._pkcs1_oaep_decode import pkcs1_decode
+
+
+ class PKCS115_Cipher:
+@@ -113,7 +89,6 @@ class PKCS115_Cipher:
+                 continue
+             ps.append(new_byte)
+         ps = b"".join(ps)
+-        assert(len(ps) == k - mLen - 3)
+         # Step 2b
+         em = b'\x00\x02' + ps + b'\x00' + _copy_bytes(None, None, message)
+         # Step 3a (OS2IP)
+@@ -185,14 +160,14 @@ class PKCS115_Cipher:
+         # Step 3 (not constant time when the sentinel is not a byte string)
+         output = bytes(bytearray(k))
+         if not is_bytes(sentinel) or len(sentinel) > k:
+-            size = _pkcs1_decode(em, b'', expected_pt_len, output)
++            size = pkcs1_decode(em, b'', expected_pt_len, output)
+             if size < 0:
+                 return sentinel
+             else:
+                 return output[size:]
+
+         # Step 3 (somewhat constant time)
+-        size = _pkcs1_decode(em, sentinel, expected_pt_len, output)
++        size = pkcs1_decode(em, sentinel, expected_pt_len, output)
+         return output[size:]
+
+
+diff --git a/lib/Crypto/Cipher/_pkcs1_oaep_decode.py b/lib/Crypto/Cipher/_pkcs1_oaep_decode.py
+new file mode 100644
+index 0000000..fc07528
+--- /dev/null
++++ b/lib/Crypto/Cipher/_pkcs1_oaep_decode.py
+@@ -0,0 +1,41 @@
++from Crypto.Util._raw_api import (load_pycryptodome_raw_lib, c_size_t,
++                                  c_uint8_ptr)
++
++
++_raw_pkcs1_decode = load_pycryptodome_raw_lib("Crypto.Cipher._pkcs1_decode",
++                        """
++                        int pkcs1_decode(const uint8_t *em, size_t len_em,
++                                         const uint8_t *sentinel, size_t len_sentinel,
++                                         size_t expected_pt_len,
++                                         uint8_t *output);
++
++                        int oaep_decode(const uint8_t *em,
++                                        size_t em_len,
++                                        const uint8_t *lHash,
++                                        size_t hLen,
++                                        const uint8_t *db,
++                                        size_t db_len);
++                        """)
++
++
++def pkcs1_decode(em, sentinel, expected_pt_len, output):
++    if len(em) != len(output):
++        raise ValueError("Incorrect output length")
++
++    ret = _raw_pkcs1_decode.pkcs1_decode(c_uint8_ptr(em),
++                                         c_size_t(len(em)),
++                                         c_uint8_ptr(sentinel),
++                                         c_size_t(len(sentinel)),
++                                         c_size_t(expected_pt_len),
++                                         c_uint8_ptr(output))
++    return ret
++
++
++def oaep_decode(em, lHash, db):
++    ret = _raw_pkcs1_decode.oaep_decode(c_uint8_ptr(em),
++                                        c_size_t(len(em)),
++                                        c_uint8_ptr(lHash),
++                                        c_size_t(len(lHash)),
++                                        c_uint8_ptr(db),
++                                        c_size_t(len(db)))
++    return ret
+diff --git a/src/pkcs1_decode.c b/src/pkcs1_decode.c
+index 207b198..74cb4a2 100644
+--- a/src/pkcs1_decode.c
++++ b/src/pkcs1_decode.c
+@@ -130,7 +130,7 @@ STATIC size_t safe_select_idx(size_t in1, size_t in2, uint8_t choice)
+  *  - in1[] is NOT equal to in2[] where neq_mask[] is 0xFF.
+  * Return non-zero otherwise.
+  */
+-STATIC uint8_t safe_cmp(const uint8_t *in1, const uint8_t *in2,
++STATIC uint8_t safe_cmp_masks(const uint8_t *in1, const uint8_t *in2,
+                  const uint8_t *eq_mask, const uint8_t *neq_mask,
+                  size_t len)
+ {
+@@ -187,7 +187,7 @@ STATIC size_t safe_search(const uint8_t *in1, uint8_t c, size_t len)
+     return result;
+ }
+
+-#define EM_PREFIX_LEN 10
++#define PKCS1_PREFIX_LEN 10
+
+ /*
+  * Decode and verify the PKCS#1 padding, then put either the plaintext
+@@ -222,13 +222,13 @@ EXPORT_SYM int pkcs1_decode(const uint8_t *em, size_t len_em_output,
+     if (NULL == em || NULL == output || NULL == sentinel) {
+         return -1;
+     }
+-    if (len_em_output < (EM_PREFIX_LEN + 2)) {
++    if (len_em_output < (PKCS1_PREFIX_LEN + 2)) {
+         return -1;
+     }
+     if (len_sentinel > len_em_output) {
+         return -1;
+     }
+-    if (expected_pt_len > 0 && expected_pt_len > (len_em_output - EM_PREFIX_LEN - 1)) {
++    if (expected_pt_len > 0 && expected_pt_len > (len_em_output - PKCS1_PREFIX_LEN - 1)) {
+         return -1;
+     }
+
+@@ -240,7 +240,7 @@ EXPORT_SYM int pkcs1_decode(const uint8_t *em, size_t len_em_output,
+     memcpy(padded_sentinel + (len_em_output - len_sentinel), sentinel, len_sentinel);
+
+     /** The first 10 bytes must follow the pattern **/
+-    match = safe_cmp(em,
++    match = safe_cmp_masks(em,
+                      (const uint8_t*)"\x00\x02" "\x00\x00\x00\x00\x00\x00\x00\x00",
+                      (const uint8_t*)"\xFF\xFF" "\x00\x00\x00\x00\x00\x00\x00\x00",
+                      (const uint8_t*)"\x00\x00" "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF",
+@@ -283,3 +283,72 @@ end:
+     free(padded_sentinel);
+     return result;
+ }
++
++/*
++ * Decode and verify the OAEP padding in constant time.
++ *
++ * The function returns the number of bytes to ignore at the beginning
++ * of db (the rest is the plaintext), or -1 in case of problems.
++ */
++
++EXPORT_SYM int oaep_decode(const uint8_t *em,
++                           size_t em_len,
++                           const uint8_t *lHash,
++                           size_t hLen,
++                           const uint8_t *db,
++                           size_t db_len)   /* em_len - 1 - hLen */
++{
++    int result;
++    size_t one_pos, search_len, i;
++    uint8_t wrong_padding;
++    uint8_t *eq_mask = NULL;
++    uint8_t *neq_mask = NULL;
++    uint8_t *target_db = NULL;
++
++    if (NULL == em || NULL == lHash || NULL == db) {
++        return -1;
++    }
++
++    if (em_len < 2*hLen+2 || db_len != em_len-1-hLen) {
++        return -1;
++    }
++
++    /* Allocate */
++    eq_mask = (uint8_t*) calloc(1, db_len);
++    neq_mask = (uint8_t*) calloc(1, db_len);
++    target_db = (uint8_t*) calloc(1, db_len);
++    if (NULL == eq_mask || NULL == neq_mask || NULL == target_db) {
++        result = -1;
++        goto cleanup;
++    }
++
++    /* Step 3g */
++    search_len = db_len - hLen;
++
++    one_pos = safe_search(db + hLen, 0x01, search_len);
++    if (SIZE_T_MAX == one_pos) {
++        result = -1;
++        goto cleanup;
++    }
++
++    memset(eq_mask, 0xAA, db_len);
++    memcpy(target_db, lHash, hLen);
++    memset(eq_mask, 0xFF, hLen);
++
++    for (i=0; i<search_len; i++) {
++        eq_mask[hLen + i] = propagate_ones(i < one_pos);
++    }
++
++    wrong_padding = em[0];
++    wrong_padding |= safe_cmp_masks(db, target_db, eq_mask, neq_mask, db_len);
++    set_if_match(&wrong_padding, one_pos, search_len);
++
++    result = wrong_padding ? -1 : (int)(hLen + 1 + one_pos);
++
++cleanup:
++    free(eq_mask);
++    free(neq_mask);
++    free(target_db);
++
++    return result;
++}
+diff --git a/src/test/test_pkcs1.c b/src/test/test_pkcs1.c
+index 6ef63cb..69aaac5 100644
+--- a/src/test/test_pkcs1.c
++++ b/src/test/test_pkcs1.c
+@@ -5,7 +5,7 @@ void set_if_match(uint8_t *flag, size_t term1, size_t term2);
+ void set_if_no_match(uint8_t *flag, size_t term1, size_t term2);
+ void safe_select(const uint8_t *in1, const uint8_t *in2, uint8_t *out, uint8_t choice, size_t len);
+ size_t safe_select_idx(size_t in1, size_t in2, uint8_t choice);
+-uint8_t safe_cmp(const uint8_t *in1, const uint8_t *in2,
++uint8_t safe_cmp_masks(const uint8_t *in1, const uint8_t *in2,
+                  const uint8_t *eq_mask, const uint8_t *neq_mask,
+                  size_t len);
+ size_t safe_search(const uint8_t *in1, uint8_t c, size_t len);
+@@ -80,29 +80,29 @@ void test_safe_select_idx()
+     assert(safe_select_idx(0x100004, 0x223344, 1) == 0x223344);
+ }
+
+-void test_safe_cmp()
++void test_safe_cmp_masks(void)
+ {
+     uint8_t res;
+
+-    res = safe_cmp(onezero, onezero,
++    res = safe_cmp_masks(onezero, onezero,
+                    (uint8_t*)"\xFF\xFF",
+                    (uint8_t*)"\x00\x00",
+                    2);
+     assert(res == 0);
+
+-    res = safe_cmp(onezero, zerozero,
++    res = safe_cmp_masks(onezero, zerozero,
+                    (uint8_t*)"\xFF\xFF",
+                    (uint8_t*)"\x00\x00",
+                    2);
+     assert(res != 0);
+
+-    res = safe_cmp(onezero, oneone,
++    res = safe_cmp_masks(onezero, oneone,
+                    (uint8_t*)"\xFF\xFF",
+                    (uint8_t*)"\x00\x00",
+                    2);
+     assert(res != 0);
+
+-    res = safe_cmp(onezero, oneone,
++    res = safe_cmp_masks(onezero, oneone,
+                    (uint8_t*)"\xFF\x00",
+                    (uint8_t*)"\x00\x00",
+                    2);
+@@ -110,19 +110,19 @@ void test_safe_cmp()
+
+     /** -- **/
+
+-    res = safe_cmp(onezero, onezero,
++    res = safe_cmp_masks(onezero, onezero,
+                    (uint8_t*)"\x00\x00",
+                    (uint8_t*)"\xFF\xFF",
+                    2);
+     assert(res != 0);
+
+-    res = safe_cmp(oneone, zerozero,
++    res = safe_cmp_masks(oneone, zerozero,
+                    (uint8_t*)"\x00\x00",
+                    (uint8_t*)"\xFF\xFF",
+                    2);
+     assert(res == 0);
+
+-    res = safe_cmp(onezero, oneone,
++    res = safe_cmp_masks(onezero, oneone,
+                    (uint8_t*)"\x00\x00",
+                    (uint8_t*)"\x00\xFF",
+                    2);
+@@ -130,7 +130,7 @@ void test_safe_cmp()
+
+     /** -- **/
+
+-    res = safe_cmp(onezero, oneone,
++    res = safe_cmp_masks(onezero, oneone,
+                    (uint8_t*)"\xFF\x00",
+                    (uint8_t*)"\x00\xFF",
+                    2);
+@@ -158,7 +158,7 @@ int main(void)
+     test_set_if_no_match();
+     test_safe_select();
+     test_safe_select_idx();
+-    test_safe_cmp();
++    test_safe_cmp_masks();
+     test_safe_search();
+     return 0;
+ }
+--
+2.40.0
meta/recipes-devtools/python/python3-pycryptodome_3.14.1.bb +1 -0
index c0324590c2..1e6c514224 100644
@@ -3,3 +3,4 @@ inherit setuptools3
 
 SRC_URI[sha256sum] = "e04e40a7f8c1669195536a37979dd87da2c32dbdc73d6fe35f0077b0c17c803b"
 
+SRC_URI += "file://CVE-2023-52323.patch"
meta/recipes-devtools/python/python3-pycryptodomex/CVE-2023-52323.patch new file +436 -0

436 lines not on this page · raw message

meta/recipes-devtools/python/python3-pycryptodomex_3.14.1.bb +2 -0
index 79a3fee19c..31ad3fda5e 100644
@@ -3,6 +3,8 @@ inherit setuptools3
 
 SRC_URI[sha256sum] = "2ce76ed0081fd6ac8c74edc75b9d14eca2064173af79843c24fa62573263c1f2"
 
+SRC_URI += "file://CVE-2023-52323.patch"
+
 FILES:${PN}-tests = " \
     ${PYTHON_SITEPACKAGES_DIR}/Cryptodome/SelfTest/ \
     ${PYTHON_SITEPACKAGES_DIR}/Cryptodome/SelfTest/__pycache__/ \
Signature · 1 line
2.34.1
#8 lore raw

PATCH 6/8 systemd: Only add myhostname to nsswitch.conf if in PACKAGECONFIG

In reply to Steve Sakoman

From: Jermain Horsman <[email protected]>

Currently myhostname is always added to nsswitch.conf even if it is not included in PACKAGECONFIG.

This is based on changes made in OE-core rev:
ba3a78c08cb0ce08afde049610d3172b9e3b0695

Cc Chen Qi <[email protected]>
---
 meta/recipes-core/systemd/systemd_250.5.bb | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
meta/recipes-core/systemd/systemd_250.5.bb +10 -6
index 889473ee1f..80a797cf2c 100644
@@ -776,15 +776,19 @@ ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
 ALTERNATIVE_PRIORITY[runlevel] ?= "300"
 
 pkg_postinst:${PN}:libc-glibc () {
-	sed -e '/^hosts:/s/\s*\<myhostname\>//' \
-		-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
-		-i $D${sysconfdir}/nsswitch.conf
+	if ${@bb.utils.contains('PACKAGECONFIG', 'myhostname', 'true', 'false', d)}; then
+		sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+			-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
+			-i $D${sysconfdir}/nsswitch.conf
+	fi
 }
 
 pkg_prerm:${PN}:libc-glibc () {
-	sed -e '/^hosts:/s/\s*\<myhostname\>//' \
-		-e '/^hosts:/s/\s*myhostname//' \
-		-i $D${sysconfdir}/nsswitch.conf
+	if ${@bb.utils.contains('PACKAGECONFIG', 'myhostname', 'true', 'false', d)}; then
+		sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+			-e '/^hosts:/s/\s*myhostname//' \
+			-i $D${sysconfdir}/nsswitch.conf
+	fi
 }
 
 PACKAGE_WRITE_DEPS += "qemu-native"
Signature · 1 line
2.34.1
#9 lore raw

PATCH 7/8 kernel: fix localversion in v6.3+

In reply to Steve Sakoman

From: Bruce Ashfield <[email protected]>

During testing of the v6.4 reference kernel, it was noticed that on-target modules no longer matched the magic value of the running kernel.

This was due to a different localversion in the cross built kernel and the scripts / resources created on target.

This was due to changes in the setlocalversion script introduced in the v6.3 series.

The .scmversion file is no longer used (or packaged) to inhibit the addition of a "+" (through querying of the git status of the kernel) or the setting of a local version.

We recently introduced the KERNEL_LOCALVERSION variable to allow recipes to place a value in .scmversion, so we extend the use of that variable to kernel-arch.bbclass and use it to set the exported variable LOCALVERSION.

We must do it at the kernel-arch level, as the variable must be exported in any kernel build to ensure that setlocalversion always correctly sets the localversion.

Cherry-picked from master 765b13b7305c8d2f222cfc66d77c02e6a088c691

---
 meta/classes/kernel-arch.bbclass |  7 +++++++
 meta/classes/kernel.bbclass      | 10 ++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
meta/classes/kernel-arch.bbclass +7 -0
index 4cd08b96fb..0a79dea0af 100644
@@ -66,3 +66,10 @@ KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
 KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
 TOOLCHAIN ?= "gcc"
 
+# 6.3+ requires the variable LOCALVERSION to be set to not get a "+" in
+# the local version. Having it empty means nothing will be added, and any
+# value will be appended to the local kernel version. This replaces the
+# use of .scmversion file for setting a localversion without using
+# the CONFIG_LOCALVERSION option.
+KERNEL_LOCALVERSION ??= ""
+export LOCALVERSION ?= "${KERNEL_LOCALVERSION}"
meta/classes/kernel.bbclass +8 -2
index 5951347361..940f1a3cf4 100644
@@ -418,7 +418,7 @@ do_compile_kernelmodules() {
 	if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
 		oe_runmake -C ${B} ${PARALLEL_MAKE} modules ${KERNEL_EXTRA_ARGS}
 
-		# Module.symvers gets updated during the 
+		# Module.symvers gets updated during the
 		# building of the kernel modules. We need to
 		# update this in the shared workdir since some
 		# external kernel modules has a dependency on
@@ -635,7 +635,13 @@ kernel_do_configure() {
 	# $ scripts/setlocalversion . => +
 	# $ make kernelversion => 2.6.37
 	# $ make kernelrelease => 2.6.37+
-	touch ${B}/.scmversion ${S}/.scmversion
+	# See kernel-arch.bbclass for post v6.3 removal of the extra
+	# + in localversion. .scmversion is no longer used, and the
+	# variable LOCALVERSION must be used
+	if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+		echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+		echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+	fi
 
 	if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
 		mv "${S}/.config" "${B}/.config"
Signature · 1 line
2.34.1
#19 lore raw

PATCH 8/8 ghostscript: correct LICENSE with AGPLv3

In reply to Steve Sakoman

From: Kai Kang <[email protected]>

The license of ghostscript has switched to Affero GPL since version 9.07 via commit:

* 3cc5318 Switch Ghostscript/GhostPDL to Affero GPL

https://github.com/ArtifexSoftware/ghostpdl/commit/3cc5318

Correct it with AGPL-3.0-or-later.

---
 meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb +1 -1
index e0d1e4618f..e99c740685 100644
@@ -10,7 +10,7 @@ dot-matrix, inkjet and laser models. \
 HOMEPAGE = "http://www.ghostscript.com"
 SECTION = "console/utils"
 
-LICENSE = "GPL-3.0-only"
+LICENSE = "AGPL-3.0-or-later"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=f98ffa763e50cded76f49bce73aade16"
 
 DEPENDS = "ghostscript-native tiff jpeg fontconfig cups libpng"
Signature · 1 line
2.34.1
#2 lore raw

Patchtest results for [OE-core][kirkstone 1/8] libxml2: Fix for CVE-2024-25062

In reply to Steve Sakoman

Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:

---
Testing patch /home/patchtest/share/mboxes/kirkstone-1-8-libxml2-Fix-for-CVE-2024-25062.patch

FAIL: test CVE check ignore: CVE_CHECK_IGNORE is deprecated and should be replaced by CVE_STATUS (test_metadata.TestMetadata.test_cve_check_ignore)

PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE tag format (test_patch.TestPatch.test_cve_tag_format)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test Signed-off-by presence (test_patch.TestPatch.test_signed_off_by_presence)
PASS: test Upstream-Status presence (test_patch.TestPatch.test_upstream_status_presence_format)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!

#5 lore raw

Patchtest results for [OE-core][kirkstone 3/8] curl: Fix CVE-2023-46219

In reply to Steve Sakoman

Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:

---
Testing patch /home/patchtest/share/mboxes/kirkstone-3-8-curl-Fix-CVE-2023-46219.patch

FAIL: test CVE check ignore: CVE_CHECK_IGNORE is deprecated and should be replaced by CVE_STATUS (test_metadata.TestMetadata.test_cve_check_ignore)

PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE tag format (test_patch.TestPatch.test_cve_tag_format)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test Signed-off-by presence (test_patch.TestPatch.test_signed_off_by_presence)
PASS: test Upstream-Status presence (test_patch.TestPatch.test_upstream_status_presence_format)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!

#20 lore raw

Patchtest results for [OE-core][kirkstone 8/8] ghostscript: correct LICENSE with AGPLv3

In reply to Steve Sakoman

Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:

---
Testing patch /home/patchtest/share/mboxes/kirkstone-8-8-ghostscript-correct-LICENSE-with-AGPLv3.patch

FAIL: test CVE check ignore: CVE_CHECK_IGNORE is deprecated and should be replaced by CVE_STATUS (test_metadata.TestMetadata.test_cve_check_ignore)

PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!

#10 lore raw

Re: [OE-core][kirkstone 7/8] kernel: fix localversion in v6.3+

In reply to Steve Sakoman

With this patch in place we are seeing a breakage on our kernel builds. This patch was cherry picked from master, but the next patch on this file in master removes the LOCALVERSION setting...

https://git.openembedded.org/openembedded-core/commit/meta/classes-recipe/kernel-arch.bbclass?h=master-next&id=b378eec156998eea55ba61e59103cb34fab0d07c

There is a disconnect here. Why did we change kirkstone, a stable LTS version with a partial patch series based on master?

Quoted 91 lines · Steve Sakoman

From: Bruce Ashfield <[email protected]>

During testing of the v6.4 reference kernel, it was noticed that on-target modules no longer matched the magic value of the running kernel.

This was due to a different localversion in the cross built kernel and the scripts / resources created on target.

This was due to changes in the setlocalversion script introduced in the v6.3 series.

The .scmversion file is no longer used (or packaged) to inhibit the addition of a "+" (through querying of the git status of the kernel) or the setting of a local version.

We recently introduced the KERNEL_LOCALVERSION variable to allow recipes to place a value in .scmversion, so we extend the use of that variable to kernel-arch.bbclass and use it to set the exported variable LOCALVERSION.

We must do it at the kernel-arch level, as the variable must be exported in any kernel build to ensure that setlocalversion always correctly sets the localversion.

Cherry-picked from master 765b13b7305c8d2f222cfc66d77c02e6a088c691

---
  meta/classes/kernel-arch.bbclass |  7 +++++++
  meta/classes/kernel.bbclass      | 10 ++++++++--
  2 files changed, 15 insertions(+), 2 deletions(-)
meta/classes/kernel-arch.bbclass +7 -0
index 4cd08b96fb..0a79dea0af 100644
@@ -66,3 +66,10 @@ KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
  KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
  TOOLCHAIN ?= "gcc"
 
+# 6.3+ requires the variable LOCALVERSION to be set to not get a "+" in
+# the local version. Having it empty means nothing will be added, and any
+# value will be appended to the local kernel version. This replaces the
+# use of .scmversion file for setting a localversion without using
+# the CONFIG_LOCALVERSION option.
+KERNEL_LOCALVERSION ??= ""
+export LOCALVERSION ?= "${KERNEL_LOCALVERSION}"
meta/classes/kernel.bbclass +8 -3
index 5951347361..940f1a3cf4 100644
@@ -418,7 +418,7 @@ do_compile_kernelmodules() {
  	if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
  		oe_runmake -C ${B} ${PARALLEL_MAKE} modules ${KERNEL_EXTRA_ARGS}
 
-		# Module.symvers gets updated during the
+		# Module.symvers gets updated during the
  		# building of the kernel modules. We need to
  		# update this in the shared workdir since some
  		# external kernel modules has a dependency on
@@ -635,7 +635,13 @@ kernel_do_configure() {
  	# $ scripts/setlocalversion . => +
  	# $ make kernelversion => 2.6.37
  	# $ make kernelrelease => 2.6.37+
-	touch ${B}/.scmversion ${S}/.scmversion
+	# See kernel-arch.bbclass for post v6.3 removal of the extra
+	# + in localversion. .scmversion is no longer used, and the
+	# variable LOCALVERSION must be used
+	if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+		echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+		echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+	fi
 
  	if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
  		mv "${S}/.config" "${B}/.config"
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#195328): https://lists.openembedded.org/g/openembedded-core/message/195328
Mute This Topic: https://lists.openembedded.org/mt/104311283/6551054
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
#11 lore raw

Re: [OE-core][kirkstone 7/8] kernel: fix localversion in v6.3+

Quoted 11 lines · Ryan Eatmon

With this patch in place we are seeing a breakage on our kernel builds. This patch was cherry picked from master, but the next patch on this file in master removes the LOCALVERSION setting...

https://git.openembedded.org/openembedded-core/commit/meta/classes-recipe/kernel-arch.bbclass?h=master-next&id=b378eec156998eea55ba61e59103cb34fab0d07c

There is a disconnect here. Why did we change kirkstone, a stable LTS version with a partial patch series based on master?

The original kirkstone backport request for this patch was sent to the list for review on February 9.

There were no comments or objections, so I added it to the patch test queue. No issues were encountered on the autobuilder, so I sent this patch (along with the rest of the patch queue) to the list for a second review opportunity on February 12. Once again there were no comments or objections, so it was merged today February 15.

I follow this process because I'm not smart enough, nor do I have time enough to thoroughly research all implications of every patch. I rely on autobuilder testing and community review to minimize breakage.

This normally works quite well, but this time it didn't. I'll revert this patch and if someone would like to resubmit a proper series to deal with the issue it is trying to fix I will consider it and run it through the same process.

Steve

Quoted 97 lines · Steve Sakoman
Quoted 84 lines

From: Bruce Ashfield <[email protected]>

During testing of the v6.4 reference kernel, it was noticed that on-target modules no longer matched the magic value of the running kernel.

This was due to a different localversion in the cross built kernel and the scripts / resources created on target.

This was due to changes in the setlocalversion script introduced in the v6.3 series.

The .scmversion file is no longer used (or packaged) to inhibit the addition of a "+" (through querying of the git status of the kernel) or the setting of a local version.

We recently introduced the KERNEL_LOCALVERSION variable to allow recipes to place a value in .scmversion, so we extend the use of that variable to kernel-arch.bbclass and use it to set the exported variable LOCALVERSION.

We must do it at the kernel-arch level, as the variable must be exported in any kernel build to ensure that setlocalversion always correctly sets the localversion.

Cherry-picked from master 765b13b7305c8d2f222cfc66d77c02e6a088c691

---
  meta/classes/kernel-arch.bbclass |  7 +++++++
  meta/classes/kernel.bbclass      | 10 ++++++++--
  2 files changed, 15 insertions(+), 2 deletions(-)
meta/classes/kernel-arch.bbclass +7 -0
index 4cd08b96fb..0a79dea0af 100644
@@ -66,3 +66,10 @@ KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
  KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
  TOOLCHAIN ?= "gcc"
 
+# 6.3+ requires the variable LOCALVERSION to be set to not get a "+" in
+# the local version. Having it empty means nothing will be added, and any
+# value will be appended to the local kernel version. This replaces the
+# use of .scmversion file for setting a localversion without using
+# the CONFIG_LOCALVERSION option.
+KERNEL_LOCALVERSION ??= ""
+export LOCALVERSION ?= "${KERNEL_LOCALVERSION}"
meta/classes/kernel.bbclass +8 -3
index 5951347361..940f1a3cf4 100644
@@ -418,7 +418,7 @@ do_compile_kernelmodules() {
      if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
              oe_runmake -C ${B} ${PARALLEL_MAKE} modules ${KERNEL_EXTRA_ARGS}
 
-             # Module.symvers gets updated during the
+             # Module.symvers gets updated during the
              # building of the kernel modules. We need to
              # update this in the shared workdir since some
              # external kernel modules has a dependency on
@@ -635,7 +635,13 @@ kernel_do_configure() {
      # $ scripts/setlocalversion . => +
      # $ make kernelversion => 2.6.37
      # $ make kernelrelease => 2.6.37+
-     touch ${B}/.scmversion ${S}/.scmversion
+     # See kernel-arch.bbclass for post v6.3 removal of the extra
+     # + in localversion. .scmversion is no longer used, and the
+     # variable LOCALVERSION must be used
+     if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+             echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+             echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+     fi
 
      if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
              mv "${S}/.config" "${B}/.config"
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 7 lines

Links: You receive all messages sent to this group.
View/Reply Online (#195328): https://lists.openembedded.org/g/openembedded-core/message/195328
Mute This Topic: https://lists.openembedded.org/mt/104311283/6551054
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
Ryan Eatmon [email protected]
-----------------------------------------
Texas Instruments, Inc. - LCPD - MGTS

#12 lore raw

Re: [OE-core][kirkstone 7/8] kernel: fix localversion in v6.3+

Quoted 22 lines · Steve Sakoman
Quoted 11 lines · Ryan Eatmon

With this patch in place we are seeing a breakage on our kernel builds. This patch was cherry picked from master, but the next patch on this file in master removes the LOCALVERSION setting...

https://git.openembedded.org/openembedded-core/commit/meta/classes-recipe/kernel-arch.bbclass?h=master-next&id=b378eec156998eea55ba61e59103cb34fab0d07c

There is a disconnect here. Why did we change kirkstone, a stable LTS version with a partial patch series based on master?

The original kirkstone backport request for this patch was sent to the list for review on February 9.

There were no comments or objections, so I added it to the patch test queue. No issues were encountered on the autobuilder, so I sent this patch (along with the rest of the patch queue) to the list for a second review opportunity on February 12. Once again there were no comments or objections, so it was merged today February 15.

Quoted 8 lines

I follow this process because I'm not smart enough, nor do I have time enough to thoroughly research all implications of every patch. I rely on autobuilder testing and community review to minimize breakage.

This normally works quite well, but this time it didn't. I'll revert this patch and if someone would like to resubmit a proper series to deal with the issue it is trying to fix I will consider it and run it through the same process.

I can appreciate that. My comment was more for the person who sent the patch in the first place. You are doing a great job. I will try and pay attention for a replacement patch coming in and review as well.

Quoted 100 lines

Steve

Quoted 97 lines · Steve Sakoman
Quoted 84 lines

From: Bruce Ashfield <[email protected]>

During testing of the v6.4 reference kernel, it was noticed that on-target modules no longer matched the magic value of the running kernel.

This was due to a different localversion in the cross built kernel and the scripts / resources created on target.

This was due to changes in the setlocalversion script introduced in the v6.3 series.

The .scmversion file is no longer used (or packaged) to inhibit the addition of a "+" (through querying of the git status of the kernel) or the setting of a local version.

We recently introduced the KERNEL_LOCALVERSION variable to allow recipes to place a value in .scmversion, so we extend the use of that variable to kernel-arch.bbclass and use it to set the exported variable LOCALVERSION.

We must do it at the kernel-arch level, as the variable must be exported in any kernel build to ensure that setlocalversion always correctly sets the localversion.

Cherry-picked from master 765b13b7305c8d2f222cfc66d77c02e6a088c691

---
   meta/classes/kernel-arch.bbclass |  7 +++++++
   meta/classes/kernel.bbclass      | 10 ++++++++--
   2 files changed, 15 insertions(+), 2 deletions(-)
meta/classes/kernel-arch.bbclass +7 -0
index 4cd08b96fb..0a79dea0af 100644
@@ -66,3 +66,10 @@ KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
   KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
   TOOLCHAIN ?= "gcc"
 
+# 6.3+ requires the variable LOCALVERSION to be set to not get a "+" in
+# the local version. Having it empty means nothing will be added, and any
+# value will be appended to the local kernel version. This replaces the
+# use of .scmversion file for setting a localversion without using
+# the CONFIG_LOCALVERSION option.
+KERNEL_LOCALVERSION ??= ""
+export LOCALVERSION ?= "${KERNEL_LOCALVERSION}"
meta/classes/kernel.bbclass +8 -3
index 5951347361..940f1a3cf4 100644
@@ -418,7 +418,7 @@ do_compile_kernelmodules() {
       if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
               oe_runmake -C ${B} ${PARALLEL_MAKE} modules ${KERNEL_EXTRA_ARGS}
 
-             # Module.symvers gets updated during the
+             # Module.symvers gets updated during the
               # building of the kernel modules. We need to
               # update this in the shared workdir since some
               # external kernel modules has a dependency on
@@ -635,7 +635,13 @@ kernel_do_configure() {
       # $ scripts/setlocalversion . => +
       # $ make kernelversion => 2.6.37
       # $ make kernelrelease => 2.6.37+
-     touch ${B}/.scmversion ${S}/.scmversion
+     # See kernel-arch.bbclass for post v6.3 removal of the extra
+     # + in localversion. .scmversion is no longer used, and the
+     # variable LOCALVERSION must be used
+     if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+             echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+             echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+     fi
 
       if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
               mv "${S}/.config" "${B}/.config"
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 7 lines

Links: You receive all messages sent to this group.
View/Reply Online (#195328): https://lists.openembedded.org/g/openembedded-core/message/195328
Mute This Topic: https://lists.openembedded.org/mt/104311283/6551054
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
Ryan Eatmon [email protected]
-----------------------------------------
Texas Instruments, Inc. - LCPD - MGTS

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
#13 lore raw

Re: [OE-core][kirkstone 7/8] kernel: fix localversion in v6.3+

Quoted 28 lines · Ryan Eatmon via lists.openembedded.org
Quoted 26 lines · Steve Sakoman
Quoted 11 lines · Ryan Eatmon

With this patch in place we are seeing a breakage on our kernel builds. This patch was cherry picked from master, but the next patch on this file in master removes the LOCALVERSION setting...

https://git.openembedded.org/openembedded-core/commit/meta/classes-recipe/kernel-arch.bbclass?h=master-next&id=b378eec156998eea55ba61e59103cb34fab0d07c

There is a disconnect here. Why did we change kirkstone, a stable LTS version with a partial patch series based on master?

The original kirkstone backport request for this patch was sent to the list for review on February 9.

There were no comments or objections, so I added it to the patch test queue. No issues were encountered on the autobuilder, so I sent this patch (along with the rest of the patch queue) to the list for a second review opportunity on February 12. Once again there were no comments or objections, so it was merged today February 15.

I follow this process because I'm not smart enough, nor do I have time enough to thoroughly research all implications of every patch. I rely on autobuilder testing and community review to minimize breakage.

Quoted 8 lines
Quoted 4 lines

This normally works quite well, but this time it didn't. I'll revert this patch and if someone would like to resubmit a proper series to deal with the issue it is trying to fix I will consider it and run it through the same process.

I can appreciate that. My comment was more for the person who sent the patch in the first place. You are doing a great job. I will try and pay attention for a replacement patch coming in and review as well.

I'm sorry about that. I need to use a 6.6 kernel on kirkstone, and this patch fixed my usecase. It looked like a simple bugfix, and I was not aware that there was a later fix for this change.

Is there any way I can reproduce the error you saw Ryan?

And would it make sense to add an automated test for this usecase?

I'll test my usecase with both patches backported and re-submit.

/Andreas

PS: This is my first submission to oe-core, so I'm just starting to learn. I have no idea what or how the autobuilder tests, but I'm willing to learn.

Quoted 105 lines
Quoted 96 lines

Steve

Quoted 91 lines · Steve Sakoman
Quoted 75 lines

From: Bruce Ashfield <[email protected]>

During testing of the v6.4 reference kernel, it was noticed that on-target modules no longer matched the magic value of the running kernel.

This was due to a different localversion in the cross built kernel and the scripts / resources created on target.

This was due to changes in the setlocalversion script introduced in the v6.3 series.

The .scmversion file is no longer used (or packaged) to inhibit the addition of a "+" (through querying of the git status of the kernel) or the setting of a local version.

We recently introduced the KERNEL_LOCALVERSION variable to allow recipes to place a value in .scmversion, so we extend the use of that variable to kernel-arch.bbclass and use it to set the exported variable LOCALVERSION.

We must do it at the kernel-arch level, as the variable must be exported in any kernel build to ensure that setlocalversion always correctly sets the localversion.

Cherry-picked from master 765b13b7305c8d2f222cfc66d77c02e6a088c691

---
   meta/classes/kernel-arch.bbclass |  7 +++++++
   meta/classes/kernel.bbclass      | 10 ++++++++--
   2 files changed, 15 insertions(+), 2 deletions(-)
meta/classes/kernel-arch.bbclass +7 -0
index 4cd08b96fb..0a79dea0af 100644
@@ -66,3 +66,10 @@ KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
   KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
   TOOLCHAIN ?= "gcc"
 
+# 6.3+ requires the variable LOCALVERSION to be set to not get a "+" in
+# the local version. Having it empty means nothing will be added, and any
+# value will be appended to the local kernel version. This replaces the
+# use of .scmversion file for setting a localversion without using
+# the CONFIG_LOCALVERSION option.
+KERNEL_LOCALVERSION ??= ""
+export LOCALVERSION ?= "${KERNEL_LOCALVERSION}"
meta/classes/kernel.bbclass +1 -2
index 5951347361..940f1a3cf4 100644
@@ -418,7 +418,7 @@ do_compile_kernelmodules() {
       if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
               oe_runmake -C ${B} ${PARALLEL_MAKE} modules ${KERNEL_EXTRA_ARGS}
 
-             # Module.symvers gets updated during the
+             # Module.symvers gets updated during the
               # building of the kernel modules. We need to
               # update this in the shared workdir since some
               # external kernel modules has a dependency on
@@ -635,7 +635,13 @@ kernel_do_configure() {
       # $ scripts/setlocalversion . => +
       # $ make kernelversion => 2.6.37
       # $ make kernelrelease => 2.6.37+
-     touch ${B}/.scmversion ${S}/.scmversion

meta/classes/kernel.bbclass kernel_do_configure() { · line 647

Quoted 10 lines
meta/classes/kernel.bbclass +7 -0
+     # See kernel-arch.bbclass for post v6.3 removal of the extra
+     # + in localversion. .scmversion is no longer used, and the
+     # variable LOCALVERSION must be used
+     if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+             echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+             echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+     fi
 
       if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
               mv "${S}/.config" "${B}/.config"

--
Ryan Eatmon [email protected]
-----------------------------------------
Texas Instruments, Inc. - LCPD - MGTS

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195736): https://lists.openembedded.org/g/openembedded-core/message/195736
Mute This Topic: https://lists.openembedded.org/mt/104311283/7501392
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#14 lore raw

Re: [OE-core][kirkstone 7/8] kernel: fix localversion in v6.3+

Quoted 43 lines · Andreas Helbech Kleist
Quoted 28 lines · Ryan Eatmon via lists.openembedded.org
Quoted 26 lines · Steve Sakoman
Quoted 11 lines · Ryan Eatmon

With this patch in place we are seeing a breakage on our kernel builds. This patch was cherry picked from master, but the next patch on this file in master removes the LOCALVERSION setting...

https://git.openembedded.org/openembedded-core/commit/meta/classes-recipe/kernel-arch.bbclass?h=master-next&id=b378eec156998eea55ba61e59103cb34fab0d07c

There is a disconnect here. Why did we change kirkstone, a stable LTS version with a partial patch series based on master?

The original kirkstone backport request for this patch was sent to the list for review on February 9.

There were no comments or objections, so I added it to the patch test queue. No issues were encountered on the autobuilder, so I sent this patch (along with the rest of the patch queue) to the list for a second review opportunity on February 12. Once again there were no comments or objections, so it was merged today February 15.

I follow this process because I'm not smart enough, nor do I have time enough to thoroughly research all implications of every patch. I rely on autobuilder testing and community review to minimize breakage.

Quoted 8 lines
Quoted 4 lines

This normally works quite well, but this time it didn't. I'll revert this patch and if someone would like to resubmit a proper series to deal with the issue it is trying to fix I will consider it and run it through the same process.

I can appreciate that. My comment was more for the person who sent the patch in the first place. You are doing a great job. I will try and pay attention for a replacement patch coming in and review as well.

I'm sorry about that. I need to use a 6.6 kernel on kirkstone, and this patch fixed my usecase. It looked like a simple bugfix, and I was not aware that there was a later fix for this change.

Quoted 5 lines

Is there any way I can reproduce the error you saw Ryan?

And would it make sense to add an automated test for this usecase?

I'll test my usecase with both patches backported and re-submit.

I've now looked into it and can make it work in my setup by backporting these three commits from master:

kernel.bbclass: introduce KERNEL_LOCALVERSION

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=229435a52f36ddec5f85fb6d5ccd42044b688397

kernel: fix localversion in v6.3+

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=765b13b7305c8d2f222cfc66d77c02e6a088c691

kernel: make LOCALVERSION consistent between recipes

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=b378eec156998eea55ba61e59103cb34fab0d07c

The cherry-pick's apply cleanly without any conflicts.

Would they be appropriate for kirkstone? I'm wondering if there would be any issue with backporting the KERNEL_LOCALVERSION variable specifically.

If I hear nothing before the middle of next week, I'll submit the patch series (CC'ing you Ryan).

/Andreas

Quoted 111 lines

PS: This is my first submission to oe-core, so I'm just starting to learn. I have no idea what or how the autobuilder tests, but I'm willing to learn.

Quoted 105 lines
Quoted 96 lines

Steve

Quoted 91 lines · Steve Sakoman
Quoted 75 lines

From: Bruce Ashfield <[email protected]>

During testing of the v6.4 reference kernel, it was noticed that on-target modules no longer matched the magic value of the running kernel.

This was due to a different localversion in the cross built kernel and the scripts / resources created on target.

This was due to changes in the setlocalversion script introduced in the v6.3 series.

The .scmversion file is no longer used (or packaged) to inhibit the addition of a "+" (through querying of the git status of the kernel) or the setting of a local version.

We recently introduced the KERNEL_LOCALVERSION variable to allow recipes to place a value in .scmversion, so we extend the use of that variable to kernel-arch.bbclass and use it to set the exported variable LOCALVERSION.

We must do it at the kernel-arch level, as the variable must be exported in any kernel build to ensure that setlocalversion always correctly sets the localversion.

Cherry-picked from master 765b13b7305c8d2f222cfc66d77c02e6a088c691

---
   meta/classes/kernel-arch.bbclass |  7 +++++++
   meta/classes/kernel.bbclass      | 10 ++++++++--
   2 files changed, 15 insertions(+), 2 deletions(-)
meta/classes/kernel-arch.bbclass +7 -0
index 4cd08b96fb..0a79dea0af 100644
@@ -66,3 +66,10 @@ KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
   KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
   TOOLCHAIN ?= "gcc"
 
+# 6.3+ requires the variable LOCALVERSION to be set to not get a "+" in
+# the local version. Having it empty means nothing will be added, and any
+# value will be appended to the local kernel version. This replaces the
+# use of .scmversion file for setting a localversion without using
+# the CONFIG_LOCALVERSION option.
+KERNEL_LOCALVERSION ??= ""
+export LOCALVERSION ?= "${KERNEL_LOCALVERSION}"
meta/classes/kernel.bbclass +1 -2
index 5951347361..940f1a3cf4 100644
@@ -418,7 +418,7 @@ do_compile_kernelmodules() {
       if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
               oe_runmake -C ${B} ${PARALLEL_MAKE} modules ${KERNEL_EXTRA_ARGS}
 
-             # Module.symvers gets updated during the
+             # Module.symvers gets updated during the
               # building of the kernel modules. We need to
               # update this in the shared workdir since some
               # external kernel modules has a dependency on
@@ -635,7 +635,13 @@ kernel_do_configure() {
       # $ scripts/setlocalversion . => +
       # $ make kernelversion => 2.6.37
       # $ make kernelrelease => 2.6.37+
-     touch ${B}/.scmversion ${S}/.scmversion

meta/classes/kernel.bbclass kernel_do_configure() { · line 647

Quoted 10 lines
meta/classes/kernel.bbclass +7 -0
+     # See kernel-arch.bbclass for post v6.3 removal of the extra
+     # + in localversion. .scmversion is no longer used, and the
+     # variable LOCALVERSION must be used
+     if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+             echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+             echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+     fi
 
       if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
               mv "${S}/.config" "${B}/.config"

--
Ryan Eatmon [email protected]
-----------------------------------------
Texas Instruments, Inc. - LCPD - MGTS

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195736): https://lists.openembedded.org/g/openembedded-core/message/195736
Mute This Topic: https://lists.openembedded.org/mt/104311283/7501392
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#18 lore raw

Re: [OE-core][kirkstone 7/8] kernel: fix localversion in v6.3+

In reply to Andreas Helbech Kleist
Quoted 47 lines · Andreas Helbech Kleist
Quoted 28 lines · Ryan Eatmon via lists.openembedded.org
Quoted 26 lines · Steve Sakoman
Quoted 11 lines · Ryan Eatmon

With this patch in place we are seeing a breakage on our kernel builds. This patch was cherry picked from master, but the next patch on this file in master removes the LOCALVERSION setting...

https://git.openembedded.org/openembedded-core/commit/meta/classes-recipe/kernel-arch.bbclass?h=master-next&id=b378eec156998eea55ba61e59103cb34fab0d07c

There is a disconnect here. Why did we change kirkstone, a stable LTS version with a partial patch series based on master?

The original kirkstone backport request for this patch was sent to the list for review on February 9.

There were no comments or objections, so I added it to the patch test queue. No issues were encountered on the autobuilder, so I sent this patch (along with the rest of the patch queue) to the list for a second review opportunity on February 12. Once again there were no comments or objections, so it was merged today February 15.

I follow this process because I'm not smart enough, nor do I have time enough to thoroughly research all implications of every patch. I rely on autobuilder testing and community review to minimize breakage.

Quoted 8 lines
Quoted 4 lines

This normally works quite well, but this time it didn't. I'll revert this patch and if someone would like to resubmit a proper series to deal with the issue it is trying to fix I will consider it and run it through the same process.

I can appreciate that. My comment was more for the person who sent the patch in the first place. You are doing a great job. I will try and pay attention for a replacement patch coming in and review as well.

I'm sorry about that. I need to use a 6.6 kernel on kirkstone, and this patch fixed my usecase. It looked like a simple bugfix, and I was not aware that there was a later fix for this change.

Is there any way I can reproduce the error you saw Ryan?

And would it make sense to add an automated test for this usecase?

Quoted 7 lines

I'll test my usecase with both patches backported and re-submit.

/Andreas

PS: This is my first submission to oe-core, so I'm just starting to learn. I have no idea what or how the autobuilder tests, but I'm willing to learn.

The meta-ti layer kernel recipes set KERNEL_LOCALVERSION. With this change in place the modules directory was being name incorrectly which means that our boot testing failed. For example, if we set:

KERNEL_LOCALVERSION="xxxx"

Then the directory was created:

/lib/modules-xxxx-xxxx

One too many xxxx in the name.

We never saw this issue on master in our testing because they patched the file and backed it out a few days later.

Quoted 110 lines
Quoted 84 lines
Quoted 84 lines

Steve

Quoted 79 lines · Steve Sakoman
Quoted 78 lines

From: Bruce Ashfield <[email protected]>

During testing of the v6.4 reference kernel, it was noticed that on-target modules no longer matched the magic value of the running kernel.

This was due to a different localversion in the cross built kernel and the scripts / resources created on target.

This was due to changes in the setlocalversion script introduced in the v6.3 series.

The .scmversion file is no longer used (or packaged) to inhibit the addition of a "+" (through querying of the git status of the kernel) or the setting of a local version.

We recently introduced the KERNEL_LOCALVERSION variable to allow recipes to place a value in .scmversion, so we extend the use of that variable to kernel-arch.bbclass and use it to set the exported variable LOCALVERSION.

We must do it at the kernel-arch level, as the variable must be exported in any kernel build to ensure that setlocalversion always correctly sets the localversion.

Cherry-picked from master 765b13b7305c8d2f222cfc66d77c02e6a088c691

---
    meta/classes/kernel-arch.bbclass |  7 +++++++
    meta/classes/kernel.bbclass      | 10 ++++++++--
    2 files changed, 15 insertions(+), 2 deletions(-)
meta/classes/kernel-arch.bbclass +7 -0
index 4cd08b96fb..0a79dea0af 100644
@@ -66,3 +66,10 @@ KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
    KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
    TOOLCHAIN ?= "gcc"
 
+# 6.3+ requires the variable LOCALVERSION to be set to not get a "+" in
+# the local version. Having it empty means nothing will be added, and any
+# value will be appended to the local kernel version. This replaces the
+# use of .scmversion file for setting a localversion without using
+# the CONFIG_LOCALVERSION option.
+KERNEL_LOCALVERSION ??= ""
+export LOCALVERSION ?= "${KERNEL_LOCALVERSION}"
meta/classes/kernel.bbclass +8 -2
index 5951347361..940f1a3cf4 100644
@@ -418,7 +418,7 @@ do_compile_kernelmodules() {
        if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
                oe_runmake -C ${B} ${PARALLEL_MAKE} modules ${KERNEL_EXTRA_ARGS}
 
-             # Module.symvers gets updated during the
+             # Module.symvers gets updated during the
                # building of the kernel modules. We need to
                # update this in the shared workdir since some
                # external kernel modules has a dependency on
@@ -635,7 +635,13 @@ kernel_do_configure() {
        # $ scripts/setlocalversion . => +
        # $ make kernelversion => 2.6.37
        # $ make kernelrelease => 2.6.37+
-     touch ${B}/.scmversion ${S}/.scmversion
+     # See kernel-arch.bbclass for post v6.3 removal of the extra
+     # + in localversion. .scmversion is no longer used, and the
+     # variable LOCALVERSION must be used
+     if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+             echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+             echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+     fi
 
Quoted 15 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
meta/classes/kernel.bbclass +0 -0
        if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
                mv "${S}/.config" "${B}/.config"
Quoted 4 lines
Quoted 4 lines

--
Ryan Eatmon [email protected]
-----------------------------------------
Texas Instruments, Inc. - LCPD - MGTS

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195740): https://lists.openembedded.org/g/openembedded-core/message/195740
Mute This Topic: https://lists.openembedded.org/mt/104311283/6551054
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
#15 lore raw

Re: [OE-core][kirkstone 7/8] kernel: fix localversion in v6.3+

In reply to Andreas Helbech Kleist
Quoted 65 lines · Andreas Helbech Kleist
Quoted 43 lines · Andreas Helbech Kleist
Quoted 28 lines · Ryan Eatmon via lists.openembedded.org
Quoted 26 lines · Steve Sakoman
Quoted 11 lines · Ryan Eatmon

With this patch in place we are seeing a breakage on our kernel builds. This patch was cherry picked from master, but the next patch on this file in master removes the LOCALVERSION setting...

https://git.openembedded.org/openembedded-core/commit/meta/classes-recipe/kernel-arch.bbclass?h=master-next&id=b378eec156998eea55ba61e59103cb34fab0d07c

There is a disconnect here. Why did we change kirkstone, a stable LTS version with a partial patch series based on master?

The original kirkstone backport request for this patch was sent to the list for review on February 9.

There were no comments or objections, so I added it to the patch test queue. No issues were encountered on the autobuilder, so I sent this patch (along with the rest of the patch queue) to the list for a second review opportunity on February 12. Once again there were no comments or objections, so it was merged today February 15.

I follow this process because I'm not smart enough, nor do I have time enough to thoroughly research all implications of every patch. I rely on autobuilder testing and community review to minimize breakage.

Quoted 8 lines
Quoted 4 lines

This normally works quite well, but this time it didn't. I'll revert this patch and if someone would like to resubmit a proper series to deal with the issue it is trying to fix I will consider it and run it through the same process.

I can appreciate that. My comment was more for the person who sent the patch in the first place. You are doing a great job. I will try and pay attention for a replacement patch coming in and review as well.

I'm sorry about that. I need to use a 6.6 kernel on kirkstone, and this patch fixed my usecase. It looked like a simple bugfix, and I was not aware that there was a later fix for this change.

Quoted 5 lines

Is there any way I can reproduce the error you saw Ryan?

And would it make sense to add an automated test for this usecase?

I'll test my usecase with both patches backported and re-submit.

I've now looked into it and can make it work in my setup by backporting these three commits from master:

kernel.bbclass: introduce KERNEL_LOCALVERSION

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=229435a52f36ddec5f85fb6d5ccd42044b688397

kernel: fix localversion in v6.3+

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=765b13b7305c8d2f222cfc66d77c02e6a088c691

kernel: make LOCALVERSION consistent between recipes

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=b378eec156998eea55ba61e59103cb34fab0d07c

Quoted 9 lines

The cherry-pick's apply cleanly without any conflicts.

Would they be appropriate for kirkstone? I'm wondering if there would be any issue with backporting the KERNEL_LOCALVERSION variable specifically.

If I hear nothing before the middle of next week, I'll submit the patch series (CC'ing you Ryan).

Can you send me the patch series that you want to want to send in against kirkstone? I'll apply them locally and run some tests on our setup to make sure they don't cause an issue. I don't foresee them being a problem, but I'm more than happy to verify.

Quoted 113 lines

/Andreas

Quoted 111 lines

PS: This is my first submission to oe-core, so I'm just starting to learn. I have no idea what or how the autobuilder tests, but I'm willing to learn.

Quoted 105 lines
Quoted 96 lines

Steve

Quoted 91 lines · Steve Sakoman
Quoted 75 lines

From: Bruce Ashfield <[email protected]>

During testing of the v6.4 reference kernel, it was noticed that on-target modules no longer matched the magic value of the running kernel.

This was due to a different localversion in the cross built kernel and the scripts / resources created on target.

This was due to changes in the setlocalversion script introduced in the v6.3 series.

The .scmversion file is no longer used (or packaged) to inhibit the addition of a "+" (through querying of the git status of the kernel) or the setting of a local version.

We recently introduced the KERNEL_LOCALVERSION variable to allow recipes to place a value in .scmversion, so we extend the use of that variable to kernel-arch.bbclass and use it to set the exported variable LOCALVERSION.

We must do it at the kernel-arch level, as the variable must be exported in any kernel build to ensure that setlocalversion always correctly sets the localversion.

Cherry-picked from master 765b13b7305c8d2f222cfc66d77c02e6a088c691

---
    meta/classes/kernel-arch.bbclass |  7 +++++++
    meta/classes/kernel.bbclass      | 10 ++++++++--
    2 files changed, 15 insertions(+), 2 deletions(-)
meta/classes/kernel-arch.bbclass +7 -0
index 4cd08b96fb..0a79dea0af 100644
@@ -66,3 +66,10 @@ KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
    KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
    TOOLCHAIN ?= "gcc"
 
+# 6.3+ requires the variable LOCALVERSION to be set to not get a "+" in
+# the local version. Having it empty means nothing will be added, and any
+# value will be appended to the local kernel version. This replaces the
+# use of .scmversion file for setting a localversion without using
+# the CONFIG_LOCALVERSION option.
+KERNEL_LOCALVERSION ??= ""
+export LOCALVERSION ?= "${KERNEL_LOCALVERSION}"
meta/classes/kernel.bbclass +1 -2
index 5951347361..940f1a3cf4 100644
@@ -418,7 +418,7 @@ do_compile_kernelmodules() {
        if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
                oe_runmake -C ${B} ${PARALLEL_MAKE} modules ${KERNEL_EXTRA_ARGS}
 
-             # Module.symvers gets updated during the
+             # Module.symvers gets updated during the
                # building of the kernel modules. We need to
                # update this in the shared workdir since some
                # external kernel modules has a dependency on
@@ -635,7 +635,13 @@ kernel_do_configure() {
        # $ scripts/setlocalversion . => +
        # $ make kernelversion => 2.6.37
        # $ make kernelrelease => 2.6.37+
-     touch ${B}/.scmversion ${S}/.scmversion

meta/classes/kernel.bbclass kernel_do_configure() { · line 647

Quoted 10 lines
meta/classes/kernel.bbclass +7 -0
+     # See kernel-arch.bbclass for post v6.3 removal of the extra
+     # + in localversion. .scmversion is no longer used, and the
+     # variable LOCALVERSION must be used
+     if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+             echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+             echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+     fi
 
        if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
                mv "${S}/.config" "${B}/.config"

--
Ryan Eatmon [email protected]
-----------------------------------------
Texas Instruments, Inc. - LCPD - MGTS

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195736): https://lists.openembedded.org/g/openembedded-core/message/195736
Mute This Topic: https://lists.openembedded.org/mt/104311283/7501392
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
#16 lore raw

Re: [OE-core][kirkstone 7/8] kernel: fix localversion in v6.3+

Quoted 73 lines · Ryan Eatmon
Quoted 71 lines · Andreas Helbech Kleist
Quoted 43 lines · Andreas Helbech Kleist
Quoted 28 lines · Ryan Eatmon via lists.openembedded.org
Quoted 26 lines · Steve Sakoman
Quoted 11 lines · Ryan Eatmon

With this patch in place we are seeing a breakage on our kernel builds. This patch was cherry picked from master, but the next patch on this file in master removes the LOCALVERSION setting...

https://git.openembedded.org/openembedded-core/commit/meta/classes-recipe/kernel-arch.bbclass?h=master-next&id=b378eec156998eea55ba61e59103cb34fab0d07c

There is a disconnect here. Why did we change kirkstone, a stable LTS version with a partial patch series based on master?

The original kirkstone backport request for this patch was sent to the list for review on February 9.

There were no comments or objections, so I added it to the patch test queue. No issues were encountered on the autobuilder, so I sent this patch (along with the rest of the patch queue) to the list for a second review opportunity on February 12. Once again there were no comments or objections, so it was merged today February 15.

I follow this process because I'm not smart enough, nor do I have time enough to thoroughly research all implications of every patch. I rely on autobuilder testing and community review to minimize breakage.

Quoted 8 lines
Quoted 4 lines

This normally works quite well, but this time it didn't. I'll revert this patch and if someone would like to resubmit a proper series to deal with the issue it is trying to fix I will consider it and run it through the same process.

I can appreciate that. My comment was more for the person who sent the patch in the first place. You are doing a great job. I will try and pay attention for a replacement patch coming in and review as well.

I'm sorry about that. I need to use a 6.6 kernel on kirkstone, and this patch fixed my usecase. It looked like a simple bugfix, and I was not aware that there was a later fix for this change.

Quoted 5 lines

Is there any way I can reproduce the error you saw Ryan?

And would it make sense to add an automated test for this usecase?

I'll test my usecase with both patches backported and re-submit.

I've now looked into it and can make it work in my setup by backporting these three commits from master:

kernel.bbclass: introduce KERNEL_LOCALVERSION

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=229435a52f36ddec5f85fb6d5ccd42044b688397

kernel: fix localversion in v6.3+

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=765b13b7305c8d2f222cfc66d77c02e6a088c691

kernel: make LOCALVERSION consistent between recipes

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=b378eec156998eea55ba61e59103cb34fab0d07c

The cherry-pick's apply cleanly without any conflicts.

Would they be appropriate for kirkstone? I'm wondering if there would be any issue with backporting the KERNEL_LOCALVERSION variable specifically.

Quoted 8 lines
Quoted 3 lines

If I hear nothing before the middle of next week, I'll submit the patch series (CC'ing you Ryan).

Can you send me the patch series that you want to want to send in against kirkstone? I'll apply them locally and run some tests on our setup to make sure they don't cause an issue. I don't foresee them being a problem, but I'm more than happy to verify.

I send them to the list and CC'ed you, hope that is ok.

See
https://lore.kernel.org/openembedded-core/[email protected]/T/#t

Quoted 114 lines
Quoted 113 lines

/Andreas

Quoted 111 lines

PS: This is my first submission to oe-core, so I'm just starting to learn. I have no idea what or how the autobuilder tests, but I'm willing to learn.

Quoted 105 lines
Quoted 96 lines

Steve

Quoted 91 lines · Steve Sakoman
Quoted 75 lines

From: Bruce Ashfield <[email protected]>

During testing of the v6.4 reference kernel, it was noticed that on-target modules no longer matched the magic value of the running kernel.

This was due to a different localversion in the cross built kernel and the scripts / resources created on target.

This was due to changes in the setlocalversion script introduced in the v6.3 series.

The .scmversion file is no longer used (or packaged) to inhibit the addition of a "+" (through querying of the git status of the kernel) or the setting of a local version.

We recently introduced the KERNEL_LOCALVERSION variable to allow recipes to place a value in .scmversion, so we extend the use of that variable to kernel-arch.bbclass and use it to set the exported variable LOCALVERSION.

We must do it at the kernel-arch level, as the variable must be exported in any kernel build to ensure that setlocalversion always correctly sets the localversion.

Cherry-picked from master 765b13b7305c8d2f222cfc66d77c02e6a088c691

---
    meta/classes/kernel-arch.bbclass |  7 +++++++
    meta/classes/kernel.bbclass      | 10 ++++++++--
    2 files changed, 15 insertions(+), 2 deletions(-)
meta/classes/kernel-arch.bbclass +7 -0
index 4cd08b96fb..0a79dea0af 100644
@@ -66,3 +66,10 @@ KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
    KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
    TOOLCHAIN ?= "gcc"
 
+# 6.3+ requires the variable LOCALVERSION to be set to not get a "+" in
+# the local version. Having it empty means nothing will be added, and any
+# value will be appended to the local kernel version. This replaces the
+# use of .scmversion file for setting a localversion without using
+# the CONFIG_LOCALVERSION option.
+KERNEL_LOCALVERSION ??= ""
+export LOCALVERSION ?= "${KERNEL_LOCALVERSION}"
meta/classes/kernel.bbclass +1 -2
index 5951347361..940f1a3cf4 100644
@@ -418,7 +418,7 @@ do_compile_kernelmodules() {
        if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
                oe_runmake -C ${B} ${PARALLEL_MAKE} modules ${KERNEL_EXTRA_ARGS}
 
-             # Module.symvers gets updated during the
+             # Module.symvers gets updated during the
                # building of the kernel modules. We need to
                # update this in the shared workdir since some
                # external kernel modules has a dependency on
@@ -635,7 +635,13 @@ kernel_do_configure() {
        # $ scripts/setlocalversion . => +
        # $ make kernelversion => 2.6.37
        # $ make kernelrelease => 2.6.37+
-     touch ${B}/.scmversion ${S}/.scmversion

meta/classes/kernel.bbclass kernel_do_configure() { · line 647

Quoted 10 lines
meta/classes/kernel.bbclass +7 -0
+     # See kernel-arch.bbclass for post v6.3 removal of the extra
+     # + in localversion. .scmversion is no longer used, and the
+     # variable LOCALVERSION must be used
+     if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+             echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+             echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+     fi
 
        if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
                mv "${S}/.config" "${B}/.config"

--
Ryan Eatmon [email protected]
-----------------------------------------
Texas Instruments, Inc. - LCPD - MGTS

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195736): https://lists.openembedded.org/g/openembedded-core/message/195736
Mute This Topic: https://lists.openembedded.org/mt/104311283/7501392
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#17 lore raw

Re: [OE-core][kirkstone 7/8] kernel: fix localversion in v6.3+

Quoted 78 lines · Andreas Helbech Kleist
Quoted 77 lines · Ryan Eatmon
Quoted 74 lines · Andreas Helbech Kleist
Quoted 43 lines · Andreas Helbech Kleist
Quoted 28 lines · Ryan Eatmon via lists.openembedded.org
Quoted 26 lines · Steve Sakoman
Quoted 11 lines · Ryan Eatmon

With this patch in place we are seeing a breakage on our kernel builds. This patch was cherry picked from master, but the next patch on this file in master removes the LOCALVERSION setting...

https://git.openembedded.org/openembedded-core/commit/meta/classes-recipe/kernel-arch.bbclass?h=master-next&id=b378eec156998eea55ba61e59103cb34fab0d07c

There is a disconnect here. Why did we change kirkstone, a stable LTS version with a partial patch series based on master?

The original kirkstone backport request for this patch was sent to the list for review on February 9.

There were no comments or objections, so I added it to the patch test queue. No issues were encountered on the autobuilder, so I sent this patch (along with the rest of the patch queue) to the list for a second review opportunity on February 12. Once again there were no comments or objections, so it was merged today February 15.

I follow this process because I'm not smart enough, nor do I have time enough to thoroughly research all implications of every patch. I rely on autobuilder testing and community review to minimize breakage.

Quoted 8 lines
Quoted 4 lines

This normally works quite well, but this time it didn't. I'll revert this patch and if someone would like to resubmit a proper series to deal with the issue it is trying to fix I will consider it and run it through the same process.

I can appreciate that. My comment was more for the person who sent the patch in the first place. You are doing a great job. I will try and pay attention for a replacement patch coming in and review as well.

I'm sorry about that. I need to use a 6.6 kernel on kirkstone, and this patch fixed my usecase. It looked like a simple bugfix, and I was not aware that there was a later fix for this change.

Quoted 5 lines

Is there any way I can reproduce the error you saw Ryan?

And would it make sense to add an automated test for this usecase?

I'll test my usecase with both patches backported and re-submit.

I've now looked into it and can make it work in my setup by backporting these three commits from master:

kernel.bbclass: introduce KERNEL_LOCALVERSION

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=229435a52f36ddec5f85fb6d5ccd42044b688397

kernel: fix localversion in v6.3+

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=765b13b7305c8d2f222cfc66d77c02e6a088c691

kernel: make LOCALVERSION consistent between recipes

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=b378eec156998eea55ba61e59103cb34fab0d07c

The cherry-pick's apply cleanly without any conflicts.

Would they be appropriate for kirkstone? I'm wondering if there would be any issue with backporting the KERNEL_LOCALVERSION variable specifically.

If I hear nothing before the middle of next week, I'll submit the patch series (CC'ing you Ryan).

Quoted 6 lines
Quoted 4 lines

Can you send me the patch series that you want to want to send in against kirkstone? I'll apply them locally and run some tests on our setup to make sure they don't cause an issue. I don't foresee them being a problem, but I'm more than happy to verify.

I send them to the list and CC'ed you, hope that is ok.

Yep. I'll test them and reply to the patches.

Quoted 118 lines

See
https://lore.kernel.org/openembedded-core/[email protected]/T/#t

Quoted 114 lines
Quoted 113 lines

/Andreas

Quoted 111 lines

PS: This is my first submission to oe-core, so I'm just starting to learn. I have no idea what or how the autobuilder tests, but I'm willing to learn.

Quoted 105 lines
Quoted 96 lines

Steve

Quoted 91 lines · Steve Sakoman
Quoted 75 lines

From: Bruce Ashfield <[email protected]>

During testing of the v6.4 reference kernel, it was noticed that on-target modules no longer matched the magic value of the running kernel.

This was due to a different localversion in the cross built kernel and the scripts / resources created on target.

This was due to changes in the setlocalversion script introduced in the v6.3 series.

The .scmversion file is no longer used (or packaged) to inhibit the addition of a "+" (through querying of the git status of the kernel) or the setting of a local version.

We recently introduced the KERNEL_LOCALVERSION variable to allow recipes to place a value in .scmversion, so we extend the use of that variable to kernel-arch.bbclass and use it to set the exported variable LOCALVERSION.

We must do it at the kernel-arch level, as the variable must be exported in any kernel build to ensure that setlocalversion always correctly sets the localversion.

Cherry-picked from master 765b13b7305c8d2f222cfc66d77c02e6a088c691

---
     meta/classes/kernel-arch.bbclass |  7 +++++++
     meta/classes/kernel.bbclass      | 10 ++++++++--
     2 files changed, 15 insertions(+), 2 deletions(-)
meta/classes/kernel-arch.bbclass +7 -0
index 4cd08b96fb..0a79dea0af 100644
@@ -66,3 +66,10 @@ KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
     KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
     TOOLCHAIN ?= "gcc"
 
+# 6.3+ requires the variable LOCALVERSION to be set to not get a "+" in
+# the local version. Having it empty means nothing will be added, and any
+# value will be appended to the local kernel version. This replaces the
+# use of .scmversion file for setting a localversion without using
+# the CONFIG_LOCALVERSION option.
+KERNEL_LOCALVERSION ??= ""
+export LOCALVERSION ?= "${KERNEL_LOCALVERSION}"
meta/classes/kernel.bbclass +1 -2
index 5951347361..940f1a3cf4 100644
@@ -418,7 +418,7 @@ do_compile_kernelmodules() {
         if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
                 oe_runmake -C ${B} ${PARALLEL_MAKE} modules ${KERNEL_EXTRA_ARGS}
 
-             # Module.symvers gets updated during the
+             # Module.symvers gets updated during the
                 # building of the kernel modules. We need to
                 # update this in the shared workdir since some
                 # external kernel modules has a dependency on
@@ -635,7 +635,13 @@ kernel_do_configure() {
         # $ scripts/setlocalversion . => +
         # $ make kernelversion => 2.6.37
         # $ make kernelrelease => 2.6.37+
-     touch ${B}/.scmversion ${S}/.scmversion

meta/classes/kernel.bbclass kernel_do_configure() { · line 647

Quoted 10 lines
meta/classes/kernel.bbclass +7 -0
+     # See kernel-arch.bbclass for post v6.3 removal of the extra
+     # + in localversion. .scmversion is no longer used, and the
+     # variable LOCALVERSION must be used
+     if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+             echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+             echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+     fi
 
         if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
                 mv "${S}/.config" "${B}/.config"

--
Ryan Eatmon [email protected]
-----------------------------------------
Texas Instruments, Inc. - LCPD - MGTS

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195736): https://lists.openembedded.org/g/openembedded-core/message/195736
Mute This Topic: https://lists.openembedded.org/mt/104311283/7501392
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS