From patchwork Sun Aug 4 17:09:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47257 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA88BC52D71 for ; Sun, 4 Aug 2024 17:09:31 +0000 (UTC) Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) by mx.groups.io with SMTP id smtpd.web10.30108.1722791369232762718 for ; Sun, 04 Aug 2024 10:09:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=qrN0Jg6I; spf=softfail (domain: sakoman.com, ip: 209.85.167.181, mailfrom: steve@sakoman.com) Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-3db35ec5688so4873648b6e.3 for ; Sun, 04 Aug 2024 10:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791368; x=1723396168; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=MzhDJaP1VPa8mENH7bFMIhJytAlnSnYeHXwVwPV6ZDg=; b=qrN0Jg6IjkATelaNpa3J2ml8PrqieNaOcIAVDaKU/dgnUgpne7v+QYqdtNWyxNeqES aPtslM/5Qb1K22d/24MA6LrGVfPBBLkPGCWmw27vjzCeeTgkUnSIBmVWpmrNKxDgc3N4 RFGPLAT8F+OlzuaOTrymbWsVktaK9vxV387QCCyB1pxV9b7syk61kebWIbclL7AlhI3p qSXDDh5f7xMEkrLjjf91/Xv0EquC6lFhd2ZCgQtaIrmaBA3z4urQ1vWQPBFoRF+V42BR 8W/4Y7QfiQUePMduleMJyIl3jSTrXQ+z4cr4mNe+BjwoKzJ2T/ucUi/TVV+FHBOzl9PL DMeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791368; x=1723396168; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MzhDJaP1VPa8mENH7bFMIhJytAlnSnYeHXwVwPV6ZDg=; b=doKHTVGxX6vu29R21a2YfVyxrimnqUFWT78wSFp9TBmY7loHqe7dPut6ZFgDXi6Jxv xBTuxe4nhJ5AkzqGJULp0s3VFs/BGzQq02I5wtHTTV7zsk6xaFtTjUzn2Gudd5lCKFDz z7Yoze+Joe9/bcHQ/Xj74EMta9hP1dks27JCI9k8+k/LJhsaay/glVinTU+zBWeGXmlP c4B5icJ7iUnCZq+wjXkJFO4McOnIoHtqxvM1bb8dKspO9ZwU2/zSYzQLpCMbtixdqmnO s1emNQ/tVdJ19swqmJW79YUSatNr9Yk8cxCzAzZ9bBK+c9p1CT8HJiLOroy/hijD4rNT 0KAA== X-Gm-Message-State: AOJu0Ywr+rurV8m+0NIEukBAMjBmZLc8aax8o2g55+l8WedhICfDvNV0 ulyIimhQ75rMY9jZTEBwwxFmF6v2GNx1au6iKICq/DUSKmt9m+Vl6lNEG9+CxdtqhvjtSZFDsFW m7DRXEQ== X-Google-Smtp-Source: AGHT+IHLSx699g3dT/SAvaSsZEy3qCwyGs1kXihUc6Kq+jAf3ZuiMBgoEtgO+BpccLAxU4w3RfE4/A== X-Received: by 2002:a05:6870:7187:b0:260:e611:c09 with SMTP id 586e51a60fabf-26891f27131mr11747797fac.47.1722791368241; Sun, 04 Aug 2024 10:09:28 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:27 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 01/18] libstd-rs,rust-cross-canadian: set CVE_PRODUCT to rust Date: Sun, 4 Aug 2024 10:09:04 -0700 Message-Id: <91bfe1f64ee3e2b8534baa8a3eb2fb7fa3521657.1722790925.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202960 From: Peter Marko These recipes come from rust sources and CVEs are reported for them under rust-lang:rust vendor:product touple. Especially libstd-rs needs correct CVE_PRODUCT as is it installed on target devices (being statically linked to rust compiled binaries). before: cargo: CVE_PRODUCT="cargo" cargo-c-native: CVE_PRODUCT="cargo-c" libstd-rs: CVE_PRODUCT="libstd-rs" rust: CVE_PRODUCT="rust" rust-cross-canadian: CVE_PRODUCT="rust-cross-canadian-" rust-llvm: CVE_PRODUCT="rust-llvm" after: cargo: CVE_PRODUCT="cargo" cargo-c-native: CVE_PRODUCT="cargo-c" libstd-rs: CVE_PRODUCT="rust" rust: CVE_PRODUCT="rust" rust-cross-canadian-x86-64: CVE_PRODUCT="rust" rust-llvm: CVE_PRODUCT="rust-llvm" Product for rust-llvm is uncertain and, should be handled in another commit if it is desired to align it, too. sqlite> select vendor, product, count(product) from products where vendor="rust-lang" group by product; rust-lang|async-h1|2 rust-lang|cargo|5 rust-lang|future-utils|2 rust-lang|futures-task|2 rust-lang|mdbook|1 rust-lang|regex|2 rust-lang|rsa|2 rust-lang|rust|45 rust-lang|socket2|1 Signed-off-by: Peter Marko Signed-off-by: Richard Purdie (cherry picked from commit e8cf1df16a6ec2785cacaf608bec5cd8496103af) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/rust/libstd-rs_1.75.0.bb | 2 ++ meta/recipes-devtools/rust/rust-cross-canadian.inc | 1 + 2 files changed, 3 insertions(+) diff --git a/meta/recipes-devtools/rust/libstd-rs_1.75.0.bb b/meta/recipes-devtools/rust/libstd-rs_1.75.0.bb index d2bf266f9d..fe016e72d4 100644 --- a/meta/recipes-devtools/rust/libstd-rs_1.75.0.bb +++ b/meta/recipes-devtools/rust/libstd-rs_1.75.0.bb @@ -15,6 +15,8 @@ S = "${RUSTSRC}/library/sysroot" RUSTLIB_DEP = "" inherit cargo +CVE_PRODUCT = "rust" + DEPENDS:append:libc-musl = " libunwind" # rv32 does not have libunwind ported yet DEPENDS:remove:riscv32 = "libunwind" diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc b/meta/recipes-devtools/rust/rust-cross-canadian.inc index 7bfef6d175..8a51a02293 100644 --- a/meta/recipes-devtools/rust/rust-cross-canadian.inc +++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc @@ -1,5 +1,6 @@ SUMMARY = "Rust compiler and runtime libaries (cross-canadian for ${TARGET_ARCH} target)" PN = "rust-cross-canadian-${TRANSLATED_TARGET_ARCH}" +CVE_PRODUCT = "rust" inherit rust-target-config inherit rust-common From patchwork Sun Aug 4 17:09:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47258 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1743C3DA7F for ; Sun, 4 Aug 2024 17:09:31 +0000 (UTC) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mx.groups.io with SMTP id smtpd.web10.30109.1722791370428528947 for ; Sun, 04 Aug 2024 10:09:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=yROMzJ3U; spf=softfail (domain: sakoman.com, ip: 209.85.210.171, mailfrom: steve@sakoman.com) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-70d18112b60so3721105b3a.1 for ; Sun, 04 Aug 2024 10:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791370; x=1723396170; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=VedhL7dwolt0tlAjGDfRbDv6dJRWjubxzBYN0Tot8Ig=; b=yROMzJ3U3HLT6xN4C25ufzMZb8VIIUuIHEQSKhM40T/fl+B+m9JYFO+j1XQkELnbd7 1a0ZFqh/JMNwPvmAtzSEEyRGPnAIGTDbAlnKBK3Fy+TIEmUVPIs4NHDc9wcyKBfOsdXG RJk7pMRKguV1RvdOz73mJaTloVhbIme4SpdbwntFwAsNN4BntFev8gMow4jasLOnE5Bw kLt++av5NPTC0bHk2CRyer+tbHcB017W/6jYuQxXv6xI3rE+E7hExboMzPdW9+eNa9Xa Otx8VLfsz3xFLSwHYmOMGYajXWziSm+hjNYLudlX+ub3g9A5vhfGBzakD4TNY3G0Gkur txRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791370; x=1723396170; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VedhL7dwolt0tlAjGDfRbDv6dJRWjubxzBYN0Tot8Ig=; b=vZZfMGVH6N97/zxi5eGaUzSXHzNG6DSx93P4sz+nn9YX5ApzDgcugGjHYnWAnSzJ+o TlLw1DIukMd5smPrPUQQvHvMlyRKGvacoNCAUBVfpwoKUcOBT55Blg/VMC8HbJdXks/M 8HgCFx9cymn71N2RMueh1Rk20et/Y8/myCfeytq715AkzyuNc0XobKWQgLpny1HiMK6D 1dxQZ797SFp4SXc8Ap9wZtq20cgPuQ1Ur+BTRAyL45CeizSmGMPUPRYJDE9o0apBpTCO E44/g37Ha3jL4oqd5j0zuehD3+MSDTf4ep+ZLZxICUhF1rZbSdt+r+yrdAN3iD/be63w QMAg== X-Gm-Message-State: AOJu0Yw+ebFZbVB9uDF+DROa7vgOhls3NZa0s9PAQLJympYGmletNW3j tBFH1+yUucrrEF51QO8FPOiURixGJ8OYNJwrzsv5nwXsTHP6OXHnfkGp9oQ9rWS9sDS7SOth9jt 0NzhFiw== X-Google-Smtp-Source: AGHT+IFLe60ZahBu0znFHDAJJW7UGMZ0yFsTOglFrhRfzyczPSL/eKb3heeF3ghTDIr/nZMe4PoRkw== X-Received: by 2002:a05:6a20:4392:b0:1bd:2a05:5f24 with SMTP id adf61e73a8af0-1c69a6dbbbfmr11503784637.27.1722791369572; Sun, 04 Aug 2024 10:09:29 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:29 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 02/18] busybox: CVE-2023-42364 and CVE-2023-42365 fixes Date: Sun, 4 Aug 2024 10:09:05 -0700 Message-Id: <7fa82243e587563172c0c2c4ab005a873583d26e.1722790925.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202961 From: Khem Raj backport upstream fix for CVEs and fix the regression that introduced [1] [1] http://lists.busybox.net/pipermail/busybox/2024-May/090766.html Signed-off-by: Khem Raj Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie Signed-off-by: Guðni Már Gilbert Signed-off-by: Steve Sakoman --- ...01-awk-fix-precedence-of-relative-to.patch | 197 ++++++++++++++++++ ...x-ternary-operator-and-precedence-of.patch | 96 +++++++++ meta/recipes-core/busybox/busybox_1.36.1.bb | 2 + 3 files changed, 295 insertions(+) create mode 100644 meta/recipes-core/busybox/busybox/0001-awk-fix-precedence-of-relative-to.patch create mode 100644 meta/recipes-core/busybox/busybox/0002-awk-fix-ternary-operator-and-precedence-of.patch diff --git a/meta/recipes-core/busybox/busybox/0001-awk-fix-precedence-of-relative-to.patch b/meta/recipes-core/busybox/busybox/0001-awk-fix-precedence-of-relative-to.patch new file mode 100644 index 0000000000..5836cf8a00 --- /dev/null +++ b/meta/recipes-core/busybox/busybox/0001-awk-fix-precedence-of-relative-to.patch @@ -0,0 +1,197 @@ +From dedc9380c76834ba64c8b526aef6f461ea4e7f2e Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko +Date: Tue, 30 May 2023 16:42:18 +0200 +Subject: [PATCH 1/2] awk: fix precedence of = relative to == + +Discovered while adding code to disallow assignments to non-lvalues + +function old new delta +parse_expr 936 991 +55 +.rodata 105243 105247 +4 +------------------------------------------------------------------------------ +(add/remove: 0/0 grow/shrink: 2/0 up/down: 59/0) Total: 59 bytes + +CVE: CVE-2023-42364 CVE-2023-42365 + +Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=0256e00a9d077588bd3a39f5a1ef7e2eaa2911e4] +Signed-off-by: Denys Vlasenko +(cherry picked from commit 0256e00a9d077588bd3a39f5a1ef7e2eaa2911e4) +Signed-off-by: Khem Raj +--- + editors/awk.c | 66 ++++++++++++++++++++++++++++++--------------- + testsuite/awk.tests | 5 ++++ + 2 files changed, 50 insertions(+), 21 deletions(-) + +diff --git a/editors/awk.c b/editors/awk.c +index ec9301e..aff86fe 100644 +--- a/editors/awk.c ++++ b/editors/awk.c +@@ -337,7 +337,9 @@ static void debug_parse_print_tc(uint32_t n) + #undef P + #undef PRIMASK + #undef PRIMASK2 +-#define P(x) (x << 24) ++/* Smaller 'x' means _higher_ operator precedence */ ++#define PRECEDENCE(x) (x << 24) ++#define P(x) PRECEDENCE(x) + #define PRIMASK 0x7F000000 + #define PRIMASK2 0x7E000000 + +@@ -360,7 +362,7 @@ enum { + OC_MOVE = 0x1f00, OC_PGETLINE = 0x2000, OC_REGEXP = 0x2100, + OC_REPLACE = 0x2200, OC_RETURN = 0x2300, OC_SPRINTF = 0x2400, + OC_TERNARY = 0x2500, OC_UNARY = 0x2600, OC_VAR = 0x2700, +- OC_DONE = 0x2800, ++ OC_CONST = 0x2800, OC_DONE = 0x2900, + + ST_IF = 0x3000, ST_DO = 0x3100, ST_FOR = 0x3200, + ST_WHILE = 0x3300 +@@ -440,9 +442,9 @@ static const uint32_t tokeninfo[] ALIGN4 = { + #define TI_PREINC (OC_UNARY|xV|P(9)|'P') + #define TI_PREDEC (OC_UNARY|xV|P(9)|'M') + TI_PREINC, TI_PREDEC, OC_FIELD|xV|P(5), +- OC_COMPARE|VV|P(39)|5, OC_MOVE|VV|P(74), OC_REPLACE|NV|P(74)|'+', OC_REPLACE|NV|P(74)|'-', +- OC_REPLACE|NV|P(74)|'*', OC_REPLACE|NV|P(74)|'/', OC_REPLACE|NV|P(74)|'%', OC_REPLACE|NV|P(74)|'&', +- OC_BINARY|NV|P(29)|'+', OC_BINARY|NV|P(29)|'-', OC_REPLACE|NV|P(74)|'&', OC_BINARY|NV|P(15)|'&', ++ OC_COMPARE|VV|P(39)|5, OC_MOVE|VV|P(38), OC_REPLACE|NV|P(38)|'+', OC_REPLACE|NV|P(38)|'-', ++ OC_REPLACE|NV|P(38)|'*', OC_REPLACE|NV|P(38)|'/', OC_REPLACE|NV|P(38)|'%', OC_REPLACE|NV|P(38)|'&', ++ OC_BINARY|NV|P(29)|'+', OC_BINARY|NV|P(29)|'-', OC_REPLACE|NV|P(38)|'&', OC_BINARY|NV|P(15)|'&', + OC_BINARY|NV|P(25)|'/', OC_BINARY|NV|P(25)|'%', OC_BINARY|NV|P(15)|'&', OC_BINARY|NV|P(25)|'*', + OC_COMPARE|VV|P(39)|4, OC_COMPARE|VV|P(39)|3, OC_COMPARE|VV|P(39)|0, OC_COMPARE|VV|P(39)|1, + #define TI_LESS (OC_COMPARE|VV|P(39)|2) +@@ -1290,7 +1292,7 @@ static uint32_t next_token(uint32_t expected) + save_tclass = tc; + save_info = t_info; + tc = TC_BINOPX; +- t_info = OC_CONCAT | SS | P(35); ++ t_info = OC_CONCAT | SS | PRECEDENCE(35); + } + + t_tclass = tc; +@@ -1350,9 +1352,8 @@ static node *parse_expr(uint32_t term_tc) + { + node sn; + node *cn = &sn; +- node *vn, *glptr; ++ node *glptr; + uint32_t tc, expected_tc; +- var *v; + + debug_printf_parse("%s() term_tc(%x):", __func__, term_tc); + debug_parse_print_tc(term_tc); +@@ -1363,11 +1364,12 @@ static node *parse_expr(uint32_t term_tc) + expected_tc = TS_OPERAND | TS_UOPPRE | TC_REGEXP | term_tc; + + while (!((tc = next_token(expected_tc)) & term_tc)) { ++ node *vn; + + if (glptr && (t_info == TI_LESS)) { + /* input redirection (<) attached to glptr node */ + debug_printf_parse("%s: input redir\n", __func__); +- cn = glptr->l.n = new_node(OC_CONCAT | SS | P(37)); ++ cn = glptr->l.n = new_node(OC_CONCAT | SS | PRECEDENCE(37)); + cn->a.n = glptr; + expected_tc = TS_OPERAND | TS_UOPPRE; + glptr = NULL; +@@ -1379,24 +1381,42 @@ static node *parse_expr(uint32_t term_tc) + * previous operators with higher priority */ + vn = cn; + while (((t_info & PRIMASK) > (vn->a.n->info & PRIMASK2)) +- || ((t_info == vn->info) && t_info == TI_COLON) ++ || (t_info == vn->info && t_info == TI_COLON) + ) { + vn = vn->a.n; + if (!vn->a.n) syntax_error(EMSG_UNEXP_TOKEN); + } + if (t_info == TI_TERNARY) + //TODO: why? +- t_info += P(6); ++ t_info += PRECEDENCE(6); + cn = vn->a.n->r.n = new_node(t_info); + cn->a.n = vn->a.n; + if (tc & TS_BINOP) { + cn->l.n = vn; +-//FIXME: this is the place to detect and reject assignments to non-lvalues. +-//Currently we allow "assignments" to consts and temporaries, nonsense like this: +-// awk 'BEGIN { "qwe" = 1 }' +-// awk 'BEGIN { 7 *= 7 }' +-// awk 'BEGIN { length("qwe") = 1 }' +-// awk 'BEGIN { (1+1) += 3 }' ++ ++ /* Prevent: ++ * awk 'BEGIN { "qwe" = 1 }' ++ * awk 'BEGIN { 7 *= 7 }' ++ * awk 'BEGIN { length("qwe") = 1 }' ++ * awk 'BEGIN { (1+1) += 3 }' ++ */ ++ /* Assignment? (including *= and friends) */ ++ if (((t_info & OPCLSMASK) == OC_MOVE) ++ || ((t_info & OPCLSMASK) == OC_REPLACE) ++ ) { ++ debug_printf_parse("%s: MOVE/REPLACE vn->info:%08x\n", __func__, vn->info); ++ /* Left side is a (variable or array element) ++ * or function argument ++ * or $FIELD ? ++ */ ++ if ((vn->info & OPCLSMASK) != OC_VAR ++ && (vn->info & OPCLSMASK) != OC_FNARG ++ && (vn->info & OPCLSMASK) != OC_FIELD ++ ) { ++ syntax_error(EMSG_UNEXP_TOKEN); /* no. bad */ ++ } ++ } ++ + expected_tc = TS_OPERAND | TS_UOPPRE | TC_REGEXP; + if (t_info == TI_PGETLINE) { + /* it's a pipe */ +@@ -1432,6 +1452,8 @@ static node *parse_expr(uint32_t term_tc) + /* one should be very careful with switch on tclass - + * only simple tclasses should be used (TC_xyz, not TS_xyz) */ + switch (tc) { ++ var *v; ++ + case TC_VARIABLE: + case TC_ARRAY: + debug_printf_parse("%s: TC_VARIABLE | TC_ARRAY\n", __func__); +@@ -1452,14 +1474,14 @@ static node *parse_expr(uint32_t term_tc) + case TC_NUMBER: + case TC_STRING: + debug_printf_parse("%s: TC_NUMBER | TC_STRING\n", __func__); +- cn->info = OC_VAR; ++ cn->info = OC_CONST; + v = cn->l.v = xzalloc(sizeof(var)); +- if (tc & TC_NUMBER) ++ if (tc & TC_NUMBER) { + setvar_i(v, t_double); +- else { ++ } else { + setvar_s(v, t_string); +- expected_tc &= ~TC_UOPPOST; /* "str"++ is not allowed */ + } ++ expected_tc &= ~TC_UOPPOST; /* NUM++, "str"++ not allowed */ + break; + + case TC_REGEXP: +@@ -3107,6 +3129,8 @@ static var *evaluate(node *op, var *res) + + /* -- recursive node type -- */ + ++ case XC( OC_CONST ): ++ debug_printf_eval("CONST "); + case XC( OC_VAR ): + debug_printf_eval("VAR\n"); + L.v = op->l.v; +diff --git a/testsuite/awk.tests b/testsuite/awk.tests +index ddc5104..a78fdcd 100755 +--- a/testsuite/awk.tests ++++ b/testsuite/awk.tests +@@ -540,4 +540,9 @@ testing 'awk assign while assign' \ + │ trim/eff : 57.02%/26, 0.00% │ [cpu000:100%] + └────────────────────────────────────────────────────┘^C" + ++testing "awk = has higher precedence than == (despite what gawk manpage claims)" \ ++ "awk 'BEGIN { v=1; print 2==v; print 2==v=2; print v; print v=3==3; print v}'" \ ++ '0\n1\n2\n1\n3\n' \ ++ '' '' ++ + exit $FAILCOUNT diff --git a/meta/recipes-core/busybox/busybox/0002-awk-fix-ternary-operator-and-precedence-of.patch b/meta/recipes-core/busybox/busybox/0002-awk-fix-ternary-operator-and-precedence-of.patch new file mode 100644 index 0000000000..ea3c84897b --- /dev/null +++ b/meta/recipes-core/busybox/busybox/0002-awk-fix-ternary-operator-and-precedence-of.patch @@ -0,0 +1,96 @@ +From c3bfdac8e0e9a21d524ad72036953f68d2193e52 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Tue, 21 May 2024 14:46:08 +0200 +Subject: [PATCH 2/2] awk: fix ternary operator and precedence of = + +Adjust the = precedence test to match behavior of gawk, mawk and +FreeBSD. awk 'BEGIN {print v=3==3; print v}' should print two '1'. + +To fix this, and to unbreak the ternary conditional operator, we restore +the precedence of = in the token list, but override this with a lower +priority when the assignment is on the right side of a compare. + +This fixes commit 0256e00a9d07 (awk: fix precedence of = relative to ==) [1] + +CVE: CVE-2023-42364 CVE-2023-42365 + +Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2024-May/090766.html] + +[1] https://bugs.busybox.net/show_bug.cgi?id=15871#c6 + +Signed-off-by: Natanael Copa +(cherry picked from commit 1714301c405ef03b39605c85c23f22a190cddd95) +Signed-off-by: Khem Raj +--- + editors/awk.c | 18 ++++++++++++++---- + testsuite/awk.tests | 9 +++++++-- + 2 files changed, 21 insertions(+), 6 deletions(-) + +diff --git a/editors/awk.c b/editors/awk.c +index aff86fe..f320d8c 100644 +--- a/editors/awk.c ++++ b/editors/awk.c +@@ -442,9 +442,10 @@ static const uint32_t tokeninfo[] ALIGN4 = { + #define TI_PREINC (OC_UNARY|xV|P(9)|'P') + #define TI_PREDEC (OC_UNARY|xV|P(9)|'M') + TI_PREINC, TI_PREDEC, OC_FIELD|xV|P(5), +- OC_COMPARE|VV|P(39)|5, OC_MOVE|VV|P(38), OC_REPLACE|NV|P(38)|'+', OC_REPLACE|NV|P(38)|'-', +- OC_REPLACE|NV|P(38)|'*', OC_REPLACE|NV|P(38)|'/', OC_REPLACE|NV|P(38)|'%', OC_REPLACE|NV|P(38)|'&', +- OC_BINARY|NV|P(29)|'+', OC_BINARY|NV|P(29)|'-', OC_REPLACE|NV|P(38)|'&', OC_BINARY|NV|P(15)|'&', ++#define TI_ASSIGN (OC_MOVE|VV|P(74)) ++ OC_COMPARE|VV|P(39)|5, TI_ASSIGN, OC_REPLACE|NV|P(74)|'+', OC_REPLACE|NV|P(74)|'-', ++ OC_REPLACE|NV|P(74)|'*', OC_REPLACE|NV|P(74)|'/', OC_REPLACE|NV|P(74)|'%', OC_REPLACE|NV|P(74)|'&', ++ OC_BINARY|NV|P(29)|'+', OC_BINARY|NV|P(29)|'-', OC_REPLACE|NV|P(74)|'&', OC_BINARY|NV|P(15)|'&', + OC_BINARY|NV|P(25)|'/', OC_BINARY|NV|P(25)|'%', OC_BINARY|NV|P(15)|'&', OC_BINARY|NV|P(25)|'*', + OC_COMPARE|VV|P(39)|4, OC_COMPARE|VV|P(39)|3, OC_COMPARE|VV|P(39)|0, OC_COMPARE|VV|P(39)|1, + #define TI_LESS (OC_COMPARE|VV|P(39)|2) +@@ -1376,11 +1377,19 @@ static node *parse_expr(uint32_t term_tc) + continue; + } + if (tc & (TS_BINOP | TC_UOPPOST)) { ++ int prio; + debug_printf_parse("%s: TS_BINOP | TC_UOPPOST tc:%x\n", __func__, tc); + /* for binary and postfix-unary operators, jump back over + * previous operators with higher priority */ + vn = cn; +- while (((t_info & PRIMASK) > (vn->a.n->info & PRIMASK2)) ++ /* Let assignment get higher priority when used on right ++ * side in compare. i.e: 2==v=3 */ ++ if (t_info == TI_ASSIGN && (vn->a.n->info & OPCLSMASK) == OC_COMPARE) { ++ prio = PRECEDENCE(38); ++ } else { ++ prio = (t_info & PRIMASK); ++ } ++ while ((prio > (vn->a.n->info & PRIMASK2)) + || (t_info == vn->info && t_info == TI_COLON) + ) { + vn = vn->a.n; +@@ -1412,6 +1421,7 @@ static node *parse_expr(uint32_t term_tc) + if ((vn->info & OPCLSMASK) != OC_VAR + && (vn->info & OPCLSMASK) != OC_FNARG + && (vn->info & OPCLSMASK) != OC_FIELD ++ && (vn->info & OPCLSMASK) != OC_COMPARE + ) { + syntax_error(EMSG_UNEXP_TOKEN); /* no. bad */ + } +diff --git a/testsuite/awk.tests b/testsuite/awk.tests +index a78fdcd..d2706de 100755 +--- a/testsuite/awk.tests ++++ b/testsuite/awk.tests +@@ -540,9 +540,14 @@ testing 'awk assign while assign' \ + │ trim/eff : 57.02%/26, 0.00% │ [cpu000:100%] + └────────────────────────────────────────────────────┘^C" + +-testing "awk = has higher precedence than == (despite what gawk manpage claims)" \ ++testing "awk = has higher precedence than == on right side" \ + "awk 'BEGIN { v=1; print 2==v; print 2==v=2; print v; print v=3==3; print v}'" \ +- '0\n1\n2\n1\n3\n' \ ++ '0\n1\n2\n1\n1\n' \ ++ '' '' ++ ++testing 'awk ternary precedence' \ ++ "awk 'BEGIN { a = 0 ? \"yes\": \"no\"; print a }'" \ ++ 'no\n' \ + '' '' + + exit $FAILCOUNT diff --git a/meta/recipes-core/busybox/busybox_1.36.1.bb b/meta/recipes-core/busybox/busybox_1.36.1.bb index 170447743c..86dc9e86bf 100644 --- a/meta/recipes-core/busybox/busybox_1.36.1.bb +++ b/meta/recipes-core/busybox/busybox_1.36.1.bb @@ -53,6 +53,8 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://CVE-2021-42380.patch \ file://0001-awk-fix-segfault-when-compiled-by-clang.patch \ file://CVE-2023-42363.patch \ + file://0001-awk-fix-precedence-of-relative-to.patch \ + file://0002-awk-fix-ternary-operator-and-precedence-of.patch \ " SRC_URI:append:libc-musl = " file://musl.cfg " # TODO http://lists.busybox.net/pipermail/busybox/2023-January/090078.html From patchwork Sun Aug 4 17:09:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47255 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1F33C3DA64 for ; Sun, 4 Aug 2024 17:09:31 +0000 (UTC) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mx.groups.io with SMTP id smtpd.web10.30111.1722791371629627258 for ; Sun, 04 Aug 2024 10:09:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=q3ZOpBGg; spf=softfail (domain: sakoman.com, ip: 209.85.210.180, mailfrom: steve@sakoman.com) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-70d333d57cdso6953810b3a.3 for ; Sun, 04 Aug 2024 10:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791371; x=1723396171; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=6MwsdBJPBWcMD+kJIih8oEFYb0QIEYk//P3J997Ffyg=; b=q3ZOpBGgj/s0ayuKVIpbCLv+3esssaOkEFAxBFvQDnP3Jucd7YQmbzPw7AYdd4D9FE vQYG0A64OYgjciknC2ClX8QBggRqfUQTI8x/FWlbuTOq/NAO/8TqlvcMEQfSvke9l3rC epcbgl63mTKdZJd3UQH2aLPx1PPdquTdRwf9ZAhadZHbym3k9hRLBBh8XKu/9vjZfPGS N73XLoyAfJtZlXswrhE9y8gZ7Azwxj4SYwmEo4yDUTVJY//cME4JPpSPMzsd5wwnBNNf GguPmZDXieK7Vg2dluDe6fIAF3LIsmIdm0/gBmBhnxBFS0SoI/xbbk9/b7DzLDuNo4F3 2fcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791371; x=1723396171; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6MwsdBJPBWcMD+kJIih8oEFYb0QIEYk//P3J997Ffyg=; b=O2cPQsVNuZ6uVJH1ddDSgWJjOUH83sUiajE7Sw1aNC50Bz9qHhz1aKWl+IddMoLhEO dryoma+BPp85eSkHNYRbD/W3KNAlqlVXpDKlWCQQ+T9t4bBSo7JB2a/i46uw8dt/aVxb KIZE36AzVgkiFN9BUEpCBJ4S1+rmx1Jri8KRWDLYi0sNxSTgmwaWBWDtjP5fYrx35aTM YrBGY9cWW4/NaGcdIi6mt6NqH8PDM293azyswuedcZx0+zogjoV/U6HzgCFZw4JRH2S6 eSPp6hI6HDiowCn6KA+AD/euHbxFtVUgD3ar7uxVbttmmqz29bkmvJM+YnGSELwoq4lG cYAA== X-Gm-Message-State: AOJu0Yyf7cb6eeMDuDQhybmi4fz5fM8umQAcAsOAd9XoHSl/ENFeHYDj zpOcVCCzOTZZUbTRQZjDCpURCGA4rgzSJ4EsFp1uwtm8ZE15fNiBM2XBT/JhPEblCaPSyKS4SQ0 IpW0B1g== X-Google-Smtp-Source: AGHT+IHp51woAkvqFbpcccPjNfWNEhZyFwklDKfTOZSVs5GASVhJXEFUDCla4z7h/XwcWKa6cUMpww== X-Received: by 2002:aa7:8887:0:b0:70d:2583:7227 with SMTP id d2e1a72fcca58-7106cf8c01amr9847861b3a.6.1722791370841; Sun, 04 Aug 2024 10:09:30 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:30 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 03/18] busybox: Add fix for CVE-2023-42366 Date: Sun, 4 Aug 2024 10:09:06 -0700 Message-Id: <25554f0a542894416ad17e1334c8a05feb56b12e.1722790925.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202962 From: Khem Raj Signed-off-by: Khem Raj Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie Signed-off-by: Guðni Már Gilbert Signed-off-by: Steve Sakoman --- ...1-awk.c-fix-CVE-2023-42366-bug-15874.patch | 37 +++++++++++++++++++ meta/recipes-core/busybox/busybox_1.36.1.bb | 1 + 2 files changed, 38 insertions(+) create mode 100644 meta/recipes-core/busybox/busybox/0001-awk.c-fix-CVE-2023-42366-bug-15874.patch diff --git a/meta/recipes-core/busybox/busybox/0001-awk.c-fix-CVE-2023-42366-bug-15874.patch b/meta/recipes-core/busybox/busybox/0001-awk.c-fix-CVE-2023-42366-bug-15874.patch new file mode 100644 index 0000000000..282c2fde5a --- /dev/null +++ b/meta/recipes-core/busybox/busybox/0001-awk.c-fix-CVE-2023-42366-bug-15874.patch @@ -0,0 +1,37 @@ +From 8542236894a8d5f7393327117bc7f64787444efc Mon Sep 17 00:00:00 2001 +From: Valery Ushakov +Date: Wed, 24 Jan 2024 22:24:41 +0300 +Subject: [PATCH] awk.c: fix CVE-2023-42366 (bug #15874) + +Make sure we don't read past the end of the string in next_token() +when backslash is the last character in an (invalid) regexp. +a fix and issue reported in bugzilla + +https://bugs.busybox.net/show_bug.cgi?id=15874 + +Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2024-May/090766.html] + +CVE: CVE-2023-42366 +Signed-off-by: Khem Raj +--- + editors/awk.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/editors/awk.c b/editors/awk.c +index f320d8c..a53b193 100644 +--- a/editors/awk.c ++++ b/editors/awk.c +@@ -1168,9 +1168,11 @@ static uint32_t next_token(uint32_t expected) + s[-1] = bb_process_escape_sequence((const char **)&pp); + if (*p == '\\') + *s++ = '\\'; +- if (pp == p) ++ if (pp == p) { ++ if (*p == '\0') ++ syntax_error(EMSG_UNEXP_EOS); + *s++ = *p++; +- else ++ } else + p = pp; + } + } diff --git a/meta/recipes-core/busybox/busybox_1.36.1.bb b/meta/recipes-core/busybox/busybox_1.36.1.bb index 86dc9e86bf..bc1619d1a8 100644 --- a/meta/recipes-core/busybox/busybox_1.36.1.bb +++ b/meta/recipes-core/busybox/busybox_1.36.1.bb @@ -55,6 +55,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://CVE-2023-42363.patch \ file://0001-awk-fix-precedence-of-relative-to.patch \ file://0002-awk-fix-ternary-operator-and-precedence-of.patch \ + file://0001-awk.c-fix-CVE-2023-42366-bug-15874.patch \ " SRC_URI:append:libc-musl = " file://musl.cfg " # TODO http://lists.busybox.net/pipermail/busybox/2023-January/090078.html From patchwork Sun Aug 4 17:09:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47259 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2150C3DA64 for ; Sun, 4 Aug 2024 17:09:41 +0000 (UTC) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mx.groups.io with SMTP id smtpd.web10.30113.1722791373037440827 for ; Sun, 04 Aug 2024 10:09:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=fkmWN04Q; spf=softfail (domain: sakoman.com, ip: 209.85.210.176, mailfrom: steve@sakoman.com) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-70d18112b60so3721117b3a.1 for ; Sun, 04 Aug 2024 10:09:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791372; x=1723396172; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=5PWp87SsgOxFa4yAetmQEXncHujSIOog4M/PnYxCh8A=; b=fkmWN04Q2mLLqv7ADlGBF7oahhg9RdjlCUwrkKdUKNA95rJD9b+mPpmVKp5KFPyscM Mh0EawzaJtBPNxNRyrV48sl4LK/ArNW2cKBvrw+m7QNCcA72B2GrbaL8A0xM440Jar+Z Y5izV+1enJLlkxjmsJjKvMxaG68kYk21i0VYUEfgCewA2Myb87GndBOsy7ohQ+l7KMca MKZssZ8RV46Kl1ZjuYtDIIMIMKK1VA28UyfBhEQ9a+a/RS3Fd5utOlTLbQ9v+qvgOQv5 dHoGUP66qH7tZYl/uExQ6rZW8jwmOU+Ak7vIng4VwEujEvLxQCjaWNSXicLblkNMUQ8/ bkyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791372; x=1723396172; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5PWp87SsgOxFa4yAetmQEXncHujSIOog4M/PnYxCh8A=; b=Fl3i7WE8tsVvQLFqm+iuVECD/uoZKUf3UgBr/WFdxyyYsxDVqsDqa9ENpQocFtJkTI +NAjqyUiB8ewKg9vYXuUVXEhcrwmytL4NTrZ09CZGXPAIPHwWlWRemYX1h/4PaSGPN6x KlYHvwxJFbSFYBecpMndAp16aoDO+eWBS59lKsXuGhnEWfGG3jv+hHRh1G4z9qawDvOx QD5XB9Ddhnm49j2sBPcXnti8vgDJ0nEAPptHYuTPqDQ56AKAdlpn+qy9Jdw2RIa7XDvk +/gsB7YTE2fed8JjzQ+/HxxtWC8iYmHdbbymKW8b7OlDW09fhr69VhdV7G9vZPRRd5Kc ahZg== X-Gm-Message-State: AOJu0YwhkmWJLHSqLaRWzyNpMBYi14EANCVjKOjx71ojVofv9LOK1pVG COAqNGz+Naax3r8r8hzmcAu3cOxZ0pIsvLJG9c2YXXJZ4BGpDyjLaXCxT72qZzGc56Fyo4s8i7O DXM/ecw== X-Google-Smtp-Source: AGHT+IEq/heJ1mMRTAWsz9zAPTKudspcDLpN0lLwC/vPC4oRZMqXK3g2Xd/cJDu/z18QI2EM84qldA== X-Received: by 2002:a05:6a00:92a0:b0:70e:cf2a:4503 with SMTP id d2e1a72fcca58-71065f1e257mr21138106b3a.11.1722791372179; Sun, 04 Aug 2024 10:09:32 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:31 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 04/18] libyaml: Fix warning regarding unpatched CVE Date: Sun, 4 Aug 2024 10:09:07 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202963 From: Niko Mauno This commit incorporates changes in following master branch commits: f3479f74c9 libyaml: Amend CVE status as 'upstream-wontfix' 3ebb2ca832 libyaml: Change CVE status to wontfix 56b6b35626 libyaml: Update status of CVE-2024-35328 which mitigate the following warning with cve-check.bbclass: WARNING: libyaml-native-0.2.5-r0 do_cve_check: Found unpatched CVE (CVE-2024-35328), for more information check .../tmp/work/x86_64-linux/libyaml-native/0.2.5/temp/cve.log Signed-off-by: Niko Mauno Signed-off-by: Steve Sakoman --- meta/recipes-support/libyaml/libyaml_0.2.5.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-support/libyaml/libyaml_0.2.5.bb b/meta/recipes-support/libyaml/libyaml_0.2.5.bb index 4cb5717ece..1c6a5fcb45 100644 --- a/meta/recipes-support/libyaml/libyaml_0.2.5.bb +++ b/meta/recipes-support/libyaml/libyaml_0.2.5.bb @@ -18,4 +18,6 @@ inherit autotools DISABLE_STATIC:class-nativesdk = "" DISABLE_STATIC:class-native = "" +CVE_STATUS[CVE-2024-35328] = "upstream-wontfix: Upstream thinks there is no working code that is exploitable - https://github.com/yaml/libyaml/issues/302" + BBCLASSEXTEND = "native nativesdk" From patchwork Sun Aug 4 17:09:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47265 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D7BEC52D73 for ; Sun, 4 Aug 2024 17:09:42 +0000 (UTC) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mx.groups.io with SMTP id smtpd.web10.30114.1722791374610951779 for ; Sun, 04 Aug 2024 10:09:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=xjUrn4hD; spf=softfail (domain: sakoman.com, ip: 209.85.210.182, mailfrom: steve@sakoman.com) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-7104f939aaaso3570242b3a.1 for ; Sun, 04 Aug 2024 10:09:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791374; x=1723396174; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=j9wh7Ggn4hMSX27Osg06amV0n1dR/ojzNalqfIZ5EU0=; b=xjUrn4hDtgHxSN7l5SnWWM4z7+5dcihQBRiN0wkg1mQnhE6+PL3AOERr3nqvWiYdO7 h0IwQPlPhyyC3j6GdfT8Ys2J6bGoYst8ncKcMvSF82RdGtOhH6VfNORdLXJ5Q8zR1nLM bgRFOlCHPnGR883/2h89lByagBoiEUl0JXVgXHCsv80+6Peh6vQslgiZVwrg3WUaDmLx 7Gw3awrGU6qVFrhE1LtUb1mqM+lzyTMtwqJ3DgDj9gjoDBuVudLmbhudzLyjwtaP4T6L JWQIgFT3ZcQP6e4mu4vy4Stk93rxAYBeTuAw69rGc9tM67A9PAkAom9V8c/Sfzq/6jXT zSFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791374; x=1723396174; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j9wh7Ggn4hMSX27Osg06amV0n1dR/ojzNalqfIZ5EU0=; b=ipzXRul1QdYwY9WvrxVslNy+sbdHLjMfPatK+3ZO897kjc8MNpRsbUFIeJUqUwj2pS tB+vwdENerZ31MY/ejn9jqWHZmmmqv5TtPbZ5c89b0Adc3WfBtUdH4g5ucjwEfxksLAp PyPHy7Fy+8jewjMhqG9n6GgBaJAK142sL+Bu9mrBgNm5iiCNJTsrAtkj1OP42EnA8YNd d0Qwi3NQhCU0xpJmggFyzWEeCOq8C5zvBOZT6gEzhjKvmX4cVsqtiZ/66TiNn7Too/eZ YBQ6DHXLQGl9ue06H4MWP1lcQPs9mRsm3JQg5gWd6XwH142s5OsvjyG1U54k7Onw7pXj Kyqw== X-Gm-Message-State: AOJu0Yw7T9Zc41gsCBaU6XRDOMi5cUADkivKza8ZGoSz8tUBKlLF/1T/ 4/6x9i2LYbUE1AIwAPM+cnsbH3qnOEljJZYkZK6Lj3luayJS4hTSzt+vMLkecLckLVGyOWdRmgh wzI3YHw== X-Google-Smtp-Source: AGHT+IHN78G+XfI1kBKVqn9ht+3KCi8qxrXNd7j/SHyiXhyEUs44Qf3bO2nHkgNIV92NqvLe9G1LQg== X-Received: by 2002:a05:6a00:3e19:b0:706:5dab:83c4 with SMTP id d2e1a72fcca58-7106cfd77e7mr9549727b3a.14.1722791373656; Sun, 04 Aug 2024 10:09:33 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:33 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 05/18] qemu: upgrade 8.2.2 -> 8.2.3 Date: Sun, 4 Aug 2024 10:09:08 -0700 Message-Id: <1a6d502c04fad0d190bb665e9d454b85c0853fcc.1722790925.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202964 From: Yogita Urade This includes fix for: CVE-2024-26327, CVE-2024-26328 and CVE-2024-3447 General changelog for 8.2: https://wiki.qemu.org/ChangeLog/8.2 Droped 0001-linux-user-x86_64-Handle-the-vsyscall-page-in-open_s.patch, CVE-2024-3446 and CVE-2024-3567 since already contained the fix. Signed-off-by: Yogita Urade Signed-off-by: Steve Sakoman --- ...u-native_8.2.2.bb => qemu-native_8.2.3.bb} | 0 ...e_8.2.2.bb => qemu-system-native_8.2.3.bb} | 0 meta/recipes-devtools/qemu/qemu.inc | 8 +- ...4-Handle-the-vsyscall-page-in-open_s.patch | 56 -------------- .../qemu/qemu/CVE-2024-3446-01.patch | 73 ------------------- .../qemu/qemu/CVE-2024-3446-02.patch | 48 ------------ .../qemu/qemu/CVE-2024-3446-03.patch | 47 ------------ .../qemu/qemu/CVE-2024-3446-04.patch | 52 ------------- .../qemu/qemu/CVE-2024-3567.patch | 48 ------------ .../qemu/{qemu_8.2.2.bb => qemu_8.2.3.bb} | 0 10 files changed, 1 insertion(+), 331 deletions(-) rename meta/recipes-devtools/qemu/{qemu-native_8.2.2.bb => qemu-native_8.2.3.bb} (100%) rename meta/recipes-devtools/qemu/{qemu-system-native_8.2.2.bb => qemu-system-native_8.2.3.bb} (100%) delete mode 100644 meta/recipes-devtools/qemu/qemu/0001-linux-user-x86_64-Handle-the-vsyscall-page-in-open_s.patch delete mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-3446-01.patch delete mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-3446-02.patch delete mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-3446-03.patch delete mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-3446-04.patch delete mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2024-3567.patch rename meta/recipes-devtools/qemu/{qemu_8.2.2.bb => qemu_8.2.3.bb} (100%) diff --git a/meta/recipes-devtools/qemu/qemu-native_8.2.2.bb b/meta/recipes-devtools/qemu/qemu-native_8.2.3.bb similarity index 100% rename from meta/recipes-devtools/qemu/qemu-native_8.2.2.bb rename to meta/recipes-devtools/qemu/qemu-native_8.2.3.bb diff --git a/meta/recipes-devtools/qemu/qemu-system-native_8.2.2.bb b/meta/recipes-devtools/qemu/qemu-system-native_8.2.3.bb similarity index 100% rename from meta/recipes-devtools/qemu/qemu-system-native_8.2.2.bb rename to meta/recipes-devtools/qemu/qemu-system-native_8.2.3.bb diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index e121ae70cc..41af9ca045 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -34,18 +34,12 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://fixedmeson.patch \ file://no-pip.patch \ file://4a8579ad8629b57a43daa62e46cc7af6e1078116.patch \ - file://0001-linux-user-x86_64-Handle-the-vsyscall-page-in-open_s.patch \ file://0002-linux-user-loongarch64-Remove-TARGET_FORCE_SHMLBA.patch \ file://0003-linux-user-Add-strace-for-shmat.patch \ file://0004-linux-user-Rewrite-target_shmat.patch \ file://0005-tests-tcg-Check-that-shmat-does-not-break-proc-self-.patch \ file://qemu-guest-agent.init \ file://qemu-guest-agent.udev \ - file://CVE-2024-3446-01.patch \ - file://CVE-2024-3446-02.patch \ - file://CVE-2024-3446-03.patch \ - file://CVE-2024-3446-04.patch \ - file://CVE-2024-3567.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P\d+(\.\d+)+)\.tar" @@ -62,7 +56,7 @@ SRC_URI:append:class-native = " \ file://0012-linux-user-workaround-for-missing-MAP_SHARED_VALIDAT.patch \ " -SRC_URI[sha256sum] = "847346c1b82c1a54b2c38f6edbd85549edeb17430b7d4d3da12620e2962bc4f3" +SRC_URI[sha256sum] = "dc747fb366809455317601c4876bd1f6829a32a23e83fb76e45ab12c2a569964" CVE_STATUS[CVE-2007-0998] = "not-applicable-config: The VNC server can expose host files uder some circumstances. We don't enable it by default." diff --git a/meta/recipes-devtools/qemu/qemu/0001-linux-user-x86_64-Handle-the-vsyscall-page-in-open_s.patch b/meta/recipes-devtools/qemu/qemu/0001-linux-user-x86_64-Handle-the-vsyscall-page-in-open_s.patch deleted file mode 100644 index 2eaebe883c..0000000000 --- a/meta/recipes-devtools/qemu/qemu/0001-linux-user-x86_64-Handle-the-vsyscall-page-in-open_s.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 4517e2046610722879761bcdb60edbb2b929c848 Mon Sep 17 00:00:00 2001 -From: Richard Henderson -Date: Wed, 28 Feb 2024 10:25:14 -1000 -Subject: [PATCH 1/5] linux-user/x86_64: Handle the vsyscall page in - open_self_maps_{2,4} - -This is the only case in which we expect to have no host memory backing -for a guest memory page, because in general linux user processes cannot -map any pages in the top half of the 64-bit address space. - -Upstream-Status: Submitted [https://www.mail-archive.com/qemu-devel@nongnu.org/msg1026793.html] - -Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2170 -Signed-off-by: Richard Henderson -Signed-off-by: Richard Purdie ---- - linux-user/syscall.c | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index a114f29a8..8307a8a61 100644 ---- a/linux-user/syscall.c -+++ b/linux-user/syscall.c -@@ -7922,6 +7922,10 @@ static void open_self_maps_4(const struct open_self_maps_data *d, - path = "[heap]"; - } else if (start == info->vdso) { - path = "[vdso]"; -+#ifdef TARGET_X86_64 -+ } else if (start == TARGET_VSYSCALL_PAGE) { -+ path = "[vsyscall]"; -+#endif - } - - /* Except null device (MAP_ANON), adjust offset for this fragment. */ -@@ -8010,6 +8014,18 @@ static int open_self_maps_2(void *opaque, target_ulong guest_start, - uintptr_t host_start = (uintptr_t)g2h_untagged(guest_start); - uintptr_t host_last = (uintptr_t)g2h_untagged(guest_end - 1); - -+#ifdef TARGET_X86_64 -+ /* -+ * Because of the extremely high position of the page within the guest -+ * virtual address space, this is not backed by host memory at all. -+ * Therefore the loop below would fail. This is the only instance -+ * of not having host backing memory. -+ */ -+ if (guest_start == TARGET_VSYSCALL_PAGE) { -+ return open_self_maps_3(opaque, guest_start, guest_end, flags); -+ } -+#endif -+ - while (1) { - IntervalTreeNode *n = - interval_tree_iter_first(d->host_maps, host_start, host_start); --- -2.34.1 - diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2024-3446-01.patch b/meta/recipes-devtools/qemu/qemu/CVE-2024-3446-01.patch deleted file mode 100644 index 15dbca92cd..0000000000 --- a/meta/recipes-devtools/qemu/qemu/CVE-2024-3446-01.patch +++ /dev/null @@ -1,73 +0,0 @@ -rom eb546a3f49f45e6870ec91d792cd09f8a662c16e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= -Date: Thu, 4 Apr 2024 20:56:11 +0200 -Subject: [PATCH] hw/virtio: Introduce virtio_bh_new_guarded() helper -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Introduce virtio_bh_new_guarded(), similar to qemu_bh_new_guarded() -but using the transport memory guard, instead of the device one -(there can only be one virtio device per virtio bus). - -Inspired-by: Gerd Hoffmann -Reviewed-by: Gerd Hoffmann -Acked-by: Michael S. Tsirkin -Signed-off-by: Philippe Mathieu-Daudé -Reviewed-by: Michael S. Tsirkin -Message-Id: <20240409105537.18308-2-philmd@linaro.org> -(cherry picked from commit ec0504b989ca61e03636384d3602b7bf07ffe4da) -Signed-off-by: Michael Tokarev - -Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/eb546a3f49f45e6870ec91d792cd09f8a662c16e] -CVE: CVE-2024-3446 -Signed-off-by: Hitendra Prajapati ---- - hw/virtio/virtio.c | 10 ++++++++++ - include/hw/virtio/virtio.h | 7 +++++++ - 2 files changed, 17 insertions(+) - -diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c -index 3a160f86e..8590b8971 100644 ---- a/hw/virtio/virtio.c -+++ b/hw/virtio/virtio.c -@@ -4095,3 +4095,13 @@ static void virtio_register_types(void) - } - - type_init(virtio_register_types) -+ -+QEMUBH *virtio_bh_new_guarded_full(DeviceState *dev, -+ QEMUBHFunc *cb, void *opaque, -+ const char *name) -+{ -+ DeviceState *transport = qdev_get_parent_bus(dev)->parent; -+ -+ return qemu_bh_new_full(cb, opaque, name, -+ &transport->mem_reentrancy_guard); -+} -diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h -index c8f72850b..7d5ffdc14 100644 ---- a/include/hw/virtio/virtio.h -+++ b/include/hw/virtio/virtio.h -@@ -22,6 +22,7 @@ - #include "standard-headers/linux/virtio_config.h" - #include "standard-headers/linux/virtio_ring.h" - #include "qom/object.h" -+#include "block/aio.h" - - /* - * A guest should never accept this. It implies negotiation is broken -@@ -508,4 +509,10 @@ static inline bool virtio_device_disabled(VirtIODevice *vdev) - bool virtio_legacy_allowed(VirtIODevice *vdev); - bool virtio_legacy_check_disabled(VirtIODevice *vdev); - -+QEMUBH *virtio_bh_new_guarded_full(DeviceState *dev, -+ QEMUBHFunc *cb, void *opaque, -+ const char *name); -+#define virtio_bh_new_guarded(dev, cb, opaque) \ -+ virtio_bh_new_guarded_full((dev), (cb), (opaque), (stringify(cb))) -+ - #endif --- -2.25.1 - diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2024-3446-02.patch b/meta/recipes-devtools/qemu/qemu/CVE-2024-3446-02.patch deleted file mode 100644 index 843ed43ba8..0000000000 --- a/meta/recipes-devtools/qemu/qemu/CVE-2024-3446-02.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 4f01537ced3e787bd985b8f8de5869b92657160a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= -Date: Thu, 4 Apr 2024 20:56:41 +0200 -Subject: [PATCH] hw/virtio/virtio-crypto: Protect from DMA re-entrancy bugs -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Replace qemu_bh_new_guarded() by virtio_bh_new_guarded() -so the bus and device use the same guard. Otherwise the -DMA-reentrancy protection can be bypassed. - -Fixes: CVE-2024-3446 -Cc: qemu-stable@nongnu.org -Suggested-by: Alexander Bulekov -Reviewed-by: Gerd Hoffmann -Acked-by: Michael S. Tsirkin -Signed-off-by: Philippe Mathieu-Daudé -Reviewed-by: Michael S. Tsirkin -Message-Id: <20240409105537.18308-5-philmd@linaro.org> -(cherry picked from commit f4729ec39ad97a42ceaa7b5697f84f440ea6e5dc) -Signed-off-by: Michael Tokarev - -Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/4f01537ced3e787bd985b8f8de5869b92657160a] -CVE: CVE-2024-3446 -Signed-off-by: Hitendra Prajapati ---- - hw/virtio/virtio-crypto.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/hw/virtio/virtio-crypto.c b/hw/virtio/virtio-crypto.c -index 0e2cc8d5a..4aaced74b 100644 ---- a/hw/virtio/virtio-crypto.c -+++ b/hw/virtio/virtio-crypto.c -@@ -1080,8 +1080,8 @@ static void virtio_crypto_device_realize(DeviceState *dev, Error **errp) - vcrypto->vqs[i].dataq = - virtio_add_queue(vdev, 1024, virtio_crypto_handle_dataq_bh); - vcrypto->vqs[i].dataq_bh = -- qemu_bh_new_guarded(virtio_crypto_dataq_bh, &vcrypto->vqs[i], -- &dev->mem_reentrancy_guard); -+ virtio_bh_new_guarded(dev, virtio_crypto_dataq_bh, -+ &vcrypto->vqs[i]); - vcrypto->vqs[i].vcrypto = vcrypto; - } - --- -2.25.1 - diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2024-3446-03.patch b/meta/recipes-devtools/qemu/qemu/CVE-2024-3446-03.patch deleted file mode 100644 index a24652dea3..0000000000 --- a/meta/recipes-devtools/qemu/qemu/CVE-2024-3446-03.patch +++ /dev/null @@ -1,47 +0,0 @@ -From fbeb0a160cbcc067c0e1f0d380cea4a31de213e3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= -Date: Thu, 4 Apr 2024 20:56:35 +0200 -Subject: [PATCH] hw/char/virtio-serial-bus: Protect from DMA re-entrancy bugs -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Replace qemu_bh_new_guarded() by virtio_bh_new_guarded() -so the bus and device use the same guard. Otherwise the -DMA-reentrancy protection can be bypassed. - -Fixes: CVE-2024-3446 -Cc: qemu-stable@nongnu.org -Suggested-by: Alexander Bulekov -Reviewed-by: Gerd Hoffmann -Acked-by: Michael S. Tsirkin -Signed-off-by: Philippe Mathieu-Daudé -Reviewed-by: Michael S. Tsirkin -Message-Id: <20240409105537.18308-4-philmd@linaro.org> -(cherry picked from commit b4295bff25f7b50de1d9cc94a9c6effd40056bca) -Signed-off-by: Michael Tokarev - -Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/fbeb0a160cbcc067c0e1f0d380cea4a31de213e3] -CVE: CVE-2024-3446 -Signed-off-by: Hitendra Prajapati ---- - hw/char/virtio-serial-bus.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c -index dd619f073..1221fb7f1 100644 ---- a/hw/char/virtio-serial-bus.c -+++ b/hw/char/virtio-serial-bus.c -@@ -985,8 +985,7 @@ static void virtser_port_device_realize(DeviceState *dev, Error **errp) - return; - } - -- port->bh = qemu_bh_new_guarded(flush_queued_data_bh, port, -- &dev->mem_reentrancy_guard); -+ port->bh = virtio_bh_new_guarded(dev, flush_queued_data_bh, port); - port->elem = NULL; - } - --- -2.25.1 - diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2024-3446-04.patch b/meta/recipes-devtools/qemu/qemu/CVE-2024-3446-04.patch deleted file mode 100644 index 7f0293242d..0000000000 --- a/meta/recipes-devtools/qemu/qemu/CVE-2024-3446-04.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 1b2a52712b249e14d246cd9c7db126088e6e64db Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= -Date: Thu, 4 Apr 2024 20:56:27 +0200 -Subject: [PATCH] hw/display/virtio-gpu: Protect from DMA re-entrancy bugs -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -qemu-system-i386: warning: Blocked re-entrant IO on MemoryRegion: virtio-pci-common-virtio-gpu at addr: 0x6 - -Fixes: CVE-2024-3446 -Cc: qemu-stable@nongnu.org -Reported-by: Alexander Bulekov -Reported-by: Yongkang Jia -Reported-by: Xiao Lei -Reported-by: Yiming Tao -Buglink: https://bugs.launchpad.net/qemu/+bug/1888606 -Reviewed-by: Gerd Hoffmann -Acked-by: Michael S. Tsirkin -Signed-off-by: Philippe Mathieu-Daudé -Reviewed-by: Michael S. Tsirkin -Message-Id: <20240409105537.18308-3-philmd@linaro.org> -(cherry picked from commit ba28e0ff4d95b56dc334aac2730ab3651ffc3132) -Signed-off-by: Michael Tokarev - -Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/1b2a52712b249e14d246cd9c7db126088e6e64db] -CVE: CVE-2024-3446 -Signed-off-by: Hitendra Prajapati ---- - hw/display/virtio-gpu.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c -index b016d3bac..a7b16ba07 100644 ---- a/hw/display/virtio-gpu.c -+++ b/hw/display/virtio-gpu.c -@@ -1463,10 +1463,8 @@ void virtio_gpu_device_realize(DeviceState *qdev, Error **errp) - - g->ctrl_vq = virtio_get_queue(vdev, 0); - g->cursor_vq = virtio_get_queue(vdev, 1); -- g->ctrl_bh = qemu_bh_new_guarded(virtio_gpu_ctrl_bh, g, -- &qdev->mem_reentrancy_guard); -- g->cursor_bh = qemu_bh_new_guarded(virtio_gpu_cursor_bh, g, -- &qdev->mem_reentrancy_guard); -+ g->ctrl_bh = virtio_bh_new_guarded(qdev, virtio_gpu_ctrl_bh, g); -+ g->cursor_bh = virtio_bh_new_guarded(qdev, virtio_gpu_cursor_bh, g); - g->reset_bh = qemu_bh_new(virtio_gpu_reset_bh, g); - qemu_cond_init(&g->reset_cond); - QTAILQ_INIT(&g->reslist); --- -2.25.1 - diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2024-3567.patch b/meta/recipes-devtools/qemu/qemu/CVE-2024-3567.patch deleted file mode 100644 index f14178f881..0000000000 --- a/meta/recipes-devtools/qemu/qemu/CVE-2024-3567.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 1cfe45956e03070f894e91b304e233b4d5b99719 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= -Date: Tue, 9 Apr 2024 19:54:05 +0200 -Subject: [PATCH] hw/net/net_tx_pkt: Fix overrun in update_sctp_checksum() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -If a fragmented packet size is too short, do not try to -calculate its checksum. - -Fixes: CVE-2024-3567 -Cc: qemu-stable@nongnu.org -Reported-by: Zheyu Ma -Fixes: f199b13bc1 ("igb: Implement Tx SCTP CSO") -Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2273 -Signed-off-by: Philippe Mathieu-Daudé -Reviewed-by: Akihiko Odaki -Acked-by: Jason Wang -Message-Id: <20240410070459.49112-1-philmd@linaro.org> -(cherry picked from commit 83ddb3dbba2ee0f1767442ae6ee665058aeb1093) -Signed-off-by: Michael Tokarev - -Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/1cfe45956e03070f894e91b304e233b4d5b99719] -CVE: CVE-2024-3567 -Signed-off-by: Hitendra Prajapati ---- - hw/net/net_tx_pkt.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/hw/net/net_tx_pkt.c b/hw/net/net_tx_pkt.c -index 2e5f58b3c..d40d508a1 100644 ---- a/hw/net/net_tx_pkt.c -+++ b/hw/net/net_tx_pkt.c -@@ -141,6 +141,10 @@ bool net_tx_pkt_update_sctp_checksum(struct NetTxPkt *pkt) - uint32_t csum = 0; - struct iovec *pl_start_frag = pkt->vec + NET_TX_PKT_PL_START_FRAG; - -+ if (iov_size(pl_start_frag, pkt->payload_frags) < 8 + sizeof(csum)) { -+ return false; -+ } -+ - if (iov_from_buf(pl_start_frag, pkt->payload_frags, 8, &csum, sizeof(csum)) < sizeof(csum)) { - return false; - } --- -2.25.1 - diff --git a/meta/recipes-devtools/qemu/qemu_8.2.2.bb b/meta/recipes-devtools/qemu/qemu_8.2.3.bb similarity index 100% rename from meta/recipes-devtools/qemu/qemu_8.2.2.bb rename to meta/recipes-devtools/qemu/qemu_8.2.3.bb From patchwork Sun Aug 4 17:09:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47264 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09F56C52D74 for ; Sun, 4 Aug 2024 17:09:42 +0000 (UTC) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mx.groups.io with SMTP id smtpd.web10.30117.1722791375807573879 for ; Sun, 04 Aug 2024 10:09:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=ZD+xEYGg; spf=softfail (domain: sakoman.com, ip: 209.85.210.182, mailfrom: steve@sakoman.com) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-70d23caf8ddso8443711b3a.0 for ; Sun, 04 Aug 2024 10:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791375; x=1723396175; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=DtooNiUyFQ/RQ5ZXCnW8fShAhen+eRdmNRHJwxguMEc=; b=ZD+xEYGgVgncNddRp2qtrA5Hdw223xe2sFGGudjqMiVQPYJEXBF3YsiH7flDKRk98v KY502NtE6tgHRkYvQ0Gtcqf++J3x4B6OFMqeYEND6H4HGuf9iRLpYWIdTimD8+yG04uO 871tmIcSwWV8m9e1IG/JwcUr1J39DYRcvU0GDEPLuUkmgZN2Pg9g8Oqkg5asPY+hUZuI 2u3wXJ8W138xnHfaH1+84WSR57lreoCQQpgMxWoK3Dw3gUOOQS6CpZ16LzVmKjH5UhoO unViEMAyLWDSj7KWvlUEubYu3zJzjZNsdyIwLdL1u7vfn8GIkSlVuUni46neLEGP4e2C cFpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791375; x=1723396175; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DtooNiUyFQ/RQ5ZXCnW8fShAhen+eRdmNRHJwxguMEc=; b=oR7VGW+3bbpw1pm62Y5LiEYt5WT5ZxIp2wrqQ2B+SRRdDzYTmHa4s/0EWWwVecwO1o +rWmUt8toRlSyP8p50vJtgXKYn3qxgk8P59MjvTmVIjkwVOeFU4i9WnibLgb4znuB0Ed hVeB4Vb3qm6EndaixsnA2isKD/zTRGS7mUvyyIf7WbCpNVf4L9vyTCUMrlHYGuREZ0fp lQ4YxbfY7RyWqUaFnMWUguY/fbmqZd46G543/vsFX1eZgUx81r1K84rZ1ZWuHnn+J2Ml KnGRfuMjq665cQrDkDG1Eaqa8L7CcKABQN+i4Y3QFbiqlKluPuX/aClaPo56Hl59csZ5 3Swg== X-Gm-Message-State: AOJu0YxT4Ypv33DIWEyFtIKROUOHOY4Hyyqk82gy5U0tYEyWDBGPp9Hv Jbcio1kHiu1ZUcji1cfiFNEy9YD73wLFjFyk6k5pybNhuiByazzBT2wZ1ZFg8whZwryHifkZHOi dEA9qLA== X-Google-Smtp-Source: AGHT+IGiKkrpGaMOINHtWLPR8+3FyuFyUYHnlsSvtRVqTTan+4uDlHn7uCG/wKpkbF7fgoQZps7/qA== X-Received: by 2002:a05:6a21:3292:b0:1c3:b239:83e2 with SMTP id adf61e73a8af0-1c69958158amr13347146637.12.1722791375050; Sun, 04 Aug 2024 10:09:35 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:34 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 06/18] package.py: Fix static debuginfo split Date: Sun, 4 Aug 2024 10:09:09 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202965 From: Mark Hatle Fix: NameError: name 'shutil' is not defined Signed-off-by: Mark Hatle Signed-off-by: Mark Hatle Signed-off-by: Richard Purdie (cherry picked from commit 13bdd750ae54d57a5f459e4b7d8636c864978241) Signed-off-by: Mark Hatle Signed-off-by: Steve Sakoman --- meta/lib/oe/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py index 1511ba47c4..ffe5a2157b 100644 --- a/meta/lib/oe/package.py +++ b/meta/lib/oe/package.py @@ -14,6 +14,7 @@ import glob import stat import mmap import subprocess +import shutil import oe.cachedpath From patchwork Sun Aug 4 17:09:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47261 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 023CAC52D71 for ; Sun, 4 Aug 2024 17:09:42 +0000 (UTC) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mx.groups.io with SMTP id smtpd.web11.30091.1722791377197813709 for ; Sun, 04 Aug 2024 10:09:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=kOcbj7z8; spf=softfail (domain: sakoman.com, ip: 209.85.210.176, mailfrom: steve@sakoman.com) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-70d150e8153so3199988b3a.0 for ; Sun, 04 Aug 2024 10:09:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791376; x=1723396176; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QSidrCShGbJuugfeH/ISorc0o/1RW4R5HZ7EpB813og=; b=kOcbj7z8u61liP0DnLZTtKhsETTPXoMTchNoHjpPrDxtZ9d0v4gR5af7L8/r+No3Za 0opA9mdzqJV3LhpTKgGxvrjsY/8IAWM6+nmKodUgAU3+NJaKmqwnIplhxV3EWeoUtXgL 1mBHu4eVTXT4tk+Qo6769KzRQStRwSVz/M2gwI8FVONkscPIqDCLnScTROgzgYb+liKV 9qYvKO+16VoWSlHtyccF8/HHeseEl+GD74RiAybIKwp4tlKmLEJAqTpHf0YLh/Gts0i8 JMLQI02eGwWHesGCLsjNy0YP9tJ1FIRhK9WiOdQiJ3ThJ8nfFJ07iL4XdqlKsDfy3/+P RBpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791376; x=1723396176; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QSidrCShGbJuugfeH/ISorc0o/1RW4R5HZ7EpB813og=; b=XEnPOvSZd1Aj9tYPnnRTI5r1JSZjoF2pYvfLIwVahlX9AMBZn81J6B/TWcDa13H0lT cEEX7ZXz9EBfkEO3hoJ36DsHh0ovnq8PYKCp9ZHiLrKkoZ+pHU+W8VADGqTjQsQlqQpm FkD5taBMEGkorGuvGXf/oPA6uX7wlsfnc14LWKxTVMZIE9YW5wl+3zLv7ShY3cL2UFSK vduYYG3VNHmPDH2pD6cn4FrSSmES6cvPJCgMQPDHLMi6DiUtzBjOQcpcnziLvBqOVFG6 ear2VZq5Z5/OX4hoZH+PRptsCwLmfla+0qKwEu0xm1CF/WV9P8gagtasuw/q6JIi3b6i iWbA== X-Gm-Message-State: AOJu0YxFw/eC7R+tOpX6Oa1sPEsy+BpgJed6RvauaFs0pcoRecC0GCJy xC9yd/wk5x/FamcxtflJQ53RYjMC1zCJbDouf0Ow7uRBajymP5dG/14K+3oAwivqZTbghKj/yZU P95Ki7Q== X-Google-Smtp-Source: AGHT+IFvFOz9Dy9I4OocCVniSIUsnwXpKBtwwIEJjQ3GHhwDB+DACNZW+ROhAnaUQE2b/NBY6s2eBg== X-Received: by 2002:a05:6a00:85a3:b0:70d:2a1b:422c with SMTP id d2e1a72fcca58-7106da29926mr14565827b3a.7.1722791376352; Sun, 04 Aug 2024 10:09:36 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:36 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 07/18] package.py: Fix static library processing Date: Sun, 4 Aug 2024 10:09:10 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202966 From: Mark Hatle When PACKAGE_STRIP_STATIC is enabled the system did not pay attention to hardlinks. This could trigger a race condition during stripping of static libraries where multiple strips (through hardlinks) could run at the same time triggering a truncated or modified file error. The hardlink breaking code is based on the existing code for elf files, but due to the nature of the symlinks needed to be done in a separate block of code. Add support for static-library debugfs hardlinking through the existing inode processing code. Print a note to the logs if the link target can't be found. This isn't strictly an error, but may be useful for debugging an issue where a file isn't present. Signed-off-by: Mark Hatle Signed-off-by: Mark Hatle Signed-off-by: Richard Purdie (cherry picked from commit ff371d69f60a1529ed456acb7d8e9305242e74bd) Signed-off-by: Mark Hatle Signed-off-by: Steve Sakoman --- meta/lib/oe/package.py | 56 +++++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py index ffe5a2157b..af0923a63f 100644 --- a/meta/lib/oe/package.py +++ b/meta/lib/oe/package.py @@ -1065,6 +1065,7 @@ def process_split_and_strip_files(d): d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'): checkelf = {} checkelflinks = {} + checkstatic = {} for root, dirs, files in cpath.walk(dvar): for f in files: file = os.path.join(root, f) @@ -1078,10 +1079,6 @@ def process_split_and_strip_files(d): if file in skipfiles: continue - if oe.package.is_static_lib(file): - staticlibs.append(file) - continue - try: ltarget = cpath.realpath(file, dvar, False) s = cpath.lstat(ltarget) @@ -1093,6 +1090,13 @@ def process_split_and_strip_files(d): continue if not s: continue + + if oe.package.is_static_lib(file): + # Use a reference of device ID and inode number to identify files + file_reference = "%d_%d" % (s.st_dev, s.st_ino) + checkstatic[file] = (file, file_reference) + continue + # Check its an executable if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) \ or (s[stat.ST_MODE] & stat.S_IXOTH) \ @@ -1157,6 +1161,27 @@ def process_split_and_strip_files(d): # Modified the file so clear the cache cpath.updatecache(file) + # Do the same hardlink processing as above, but for static libraries + results = list(checkstatic.keys()) + + # As above, sort the results. + results.sort(key=lambda x: x[0]) + + for file in results: + # Use a reference of device ID and inode number to identify files + file_reference = checkstatic[file][1] + if file_reference in inodes: + os.unlink(file) + os.link(inodes[file_reference][0], file) + inodes[file_reference].append(file) + else: + inodes[file_reference] = [file] + # break hardlink + bb.utils.break_hardlinks(file) + staticlibs.append(file) + # Modified the file so clear the cache + cpath.updatecache(file) + def strip_pkgd_prefix(f): nonlocal dvar @@ -1195,11 +1220,24 @@ def process_split_and_strip_files(d): dest = dv["libdir"] + os.path.dirname(src) + dv["dir"] + "/" + os.path.basename(target) + dv["append"] fpath = dvar + dest ftarget = dvar + dv["libdir"] + os.path.dirname(target) + dv["dir"] + "/" + os.path.basename(target) + dv["append"] - bb.utils.mkdirhier(os.path.dirname(fpath)) - # Only one hardlink of separated debug info file in each directory - if not os.access(fpath, os.R_OK): - #bb.note("Link %s -> %s" % (fpath, ftarget)) - os.link(ftarget, fpath) + if os.access(ftarget, os.R_OK): + bb.utils.mkdirhier(os.path.dirname(fpath)) + # Only one hardlink of separated debug info file in each directory + if not os.access(fpath, os.R_OK): + #bb.note("Link %s -> %s" % (fpath, ftarget)) + os.link(ftarget, fpath) + elif (d.getVar('PACKAGE_DEBUG_STATIC_SPLIT') == '1'): + deststatic = dv["staticlibdir"] + os.path.dirname(src) + dv["staticdir"] + "/" + os.path.basename(file) + dv["staticappend"] + fpath = dvar + deststatic + ftarget = dvar + dv["staticlibdir"] + os.path.dirname(target) + dv["staticdir"] + "/" + os.path.basename(target) + dv["staticappend"] + if os.access(ftarget, os.R_OK): + bb.utils.mkdirhier(os.path.dirname(fpath)) + # Only one hardlink of separated debug info file in each directory + if not os.access(fpath, os.R_OK): + #bb.note("Link %s -> %s" % (fpath, ftarget)) + os.link(ftarget, fpath) + else: + bb.note("Unable to find inode link target %s" % (target)) # Create symlinks for all cases we were able to split symbols for file in symlinks: From patchwork Sun Aug 4 17:09:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47262 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8799C3DA7F for ; Sun, 4 Aug 2024 17:09:41 +0000 (UTC) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mx.groups.io with SMTP id smtpd.web11.30092.1722791378394105205 for ; Sun, 04 Aug 2024 10:09:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=EhWwhvvf; spf=softfail (domain: sakoman.com, ip: 209.85.210.172, mailfrom: steve@sakoman.com) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-70d333d5890so9020132b3a.0 for ; Sun, 04 Aug 2024 10:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791378; x=1723396178; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=b4fUdSdjQVVWPEo5y2852mTW0CPQ1vm95QXac7TyLGo=; b=EhWwhvvfO6w7u/c9ok3464yOCGP9aw5jikYftW82lDBhvFVlMiGS4mJGEP9VEfq1Ax QiPYra9M1HemM607FskH/yctM8JxurI0rCF5f++KvyW1Fnuf6iFKvJZEsg7/CFcbw0eQ l5xHYfA/NOicbvyJ5i6RoAG6daAmWz4usZ/SkN5odju4rRJuP6JNunZpnUvppPWDASci xccQKl4LtNRhBDsI7oOn6w1e/HNbmREJJP67DW1drTSFbXYLwc5dl+yjkOYGTlSJcp1e z3ZPlKDhCQYSZoTg5SkbhAKwpsnRfsGdDRNrIx2XhmtOjitY8GC96MtOIOs23Yoju1O+ RLeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791378; x=1723396178; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b4fUdSdjQVVWPEo5y2852mTW0CPQ1vm95QXac7TyLGo=; b=uHfNazvtooPPcHifHbhSmJBQ0RQk5HbMJev3pKFHHusaTmw5wUHcTnPSS/iOghsWvK 2leyesMiNK5mF3XJVQ4bgCzJQIVE+8nMdAP7xHGZfjjBNTH4oEplNcTsorYvAUgcuDhl RxPnU4QAlNkyMUSY5Bg6QsxHSa5VnOJgAzIOyicBZI+kzqzHi4Dnpag5j/y4VAxBCw4Q aCtLfSCKUyQRsyrDr65US8iP6ybKpEiTfyjTdTKFqAaqpzzGAZm1lMUluqiRT/LbEach AT5DFgcKASHtexsQLeoHnHfxgUTxuNkZ1rHXsme2jRTaepHW3eNFa/vqczRxdSwf38Xh o0ww== X-Gm-Message-State: AOJu0YxR95h5qum4aOk5j26s4kvSS49b07dat6z9RyjVwITMLoLP/u4w D0nAWQrJpE/2hPhTpqcliiLqANvLLHW2MpYJq0TtIFvFVXmTsakYoB0PYcsZB9ViyxC28cFFbpx CVMI37g== X-Google-Smtp-Source: AGHT+IFTJxknjyDWmEACNTjdurTZ0dkXMXjhdjoeAsWYth6dM2UqgbppTuFWpY+rVEK4J8XlripCsA== X-Received: by 2002:a05:6a00:182a:b0:710:5a64:30d5 with SMTP id d2e1a72fcca58-7106cf9362emr12912433b3a.6.1722791377654; Sun, 04 Aug 2024 10:09:37 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:37 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 08/18] selftest-hardlink: Add additional test cases Date: Sun, 4 Aug 2024 10:09:11 -0700 Message-Id: <39823d3211411e661320e1164ba4c50370804425.1722790925.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202967 From: Mark Hatle Additional test cases for debug symlink generation both binaries and static libraries. This also has the side effect of testing for race conditions in the hardlink debug generation and stripping. Signed-off-by: Mark Hatle Signed-off-by: Mark Hatle Signed-off-by: Richard Purdie (cherry picked from commit 7171f41c07a39a7543bb64f075d38b8e74563089) Signed-off-by: Mark Hatle Signed-off-by: Steve Sakoman --- .../selftest-hardlink/selftest-hardlink.bb | 13 ++++++++++ meta/lib/oeqa/selftest/cases/package.py | 26 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb index be346b8a0e..052bf0c92a 100644 --- a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb +++ b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb @@ -10,6 +10,9 @@ S = "${WORKDIR}" do_compile () { ${CC} hello.c -o hello1 ${CFLAGS} ${LDFLAGS} + + ${CC} hello.c -c -o hello.o ${CFLAGS} + ${AR} rcs libhello.a hello.o } do_install () { @@ -22,9 +25,19 @@ do_install () { ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello3 ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello4 + # We need so many hardlink copies to look for specific race conditions + install -d ${D}${libdir} + install -m 0644 libhello.a ${D}${libdir} + for num in `seq 1 100` ; do + ln ${D}${libdir}/libhello.a ${D}${libdir}/libhello-${num}.a + done + dd if=/dev/zero of=${D}${bindir}/sparsetest bs=1 count=0 seek=1M } RDEPENDS:${PN}-gdb += "gdb" PACKAGES =+ "${PN}-gdb" FILES:${PN}-gdb = "${bindir}/gdb.sh" + +PACKAGE_STRIP_STATIC = "1" +PACKAGE_DEBUG_STATIC_SPLIT = "1" diff --git a/meta/lib/oeqa/selftest/cases/package.py b/meta/lib/oeqa/selftest/cases/package.py index 1aa6c03f8a..38ed7173fe 100644 --- a/meta/lib/oeqa/selftest/cases/package.py +++ b/meta/lib/oeqa/selftest/cases/package.py @@ -103,11 +103,37 @@ class PackageTests(OESelftestTestCase): dest = get_bb_var('PKGDEST', 'selftest-hardlink') bindir = get_bb_var('bindir', 'selftest-hardlink') + libdir = get_bb_var('libdir', 'selftest-hardlink') + libexecdir = get_bb_var('libexecdir', 'selftest-hardlink') def checkfiles(): # Recipe creates 4 hardlinked files, there is a copy in package/ and a copy in packages-split/ # so expect 8 in total. self.assertEqual(os.stat(dest + "/selftest-hardlink" + bindir + "/hello1").st_nlink, 8) + self.assertEqual(os.stat(dest + "/selftest-hardlink" + libexecdir + "/hello3").st_nlink, 8) + + # Check dbg version + # 2 items, a copy in both package/packages-split so 4 + self.assertEqual(os.stat(dest + "/selftest-hardlink-dbg" + bindir + "/.debug/hello1").st_nlink, 4) + self.assertEqual(os.stat(dest + "/selftest-hardlink-dbg" + libexecdir + "/.debug/hello1").st_nlink, 4) + + # Even though the libexecdir name is 'hello3' or 'hello4', that isn't the debug target name + self.assertEqual(os.path.exists(dest + "/selftest-hardlink-dbg" + libexecdir + "/.debug/hello3"), False) + self.assertEqual(os.path.exists(dest + "/selftest-hardlink-dbg" + libexecdir + "/.debug/hello4"), False) + + # Check the staticdev libraries + # 101 items, a copy in both package/packages-split so 202 + self.assertEqual(os.stat(dest + "/selftest-hardlink-staticdev" + libdir + "/libhello.a").st_nlink, 202) + self.assertEqual(os.stat(dest + "/selftest-hardlink-staticdev" + libdir + "/libhello-25.a").st_nlink, 202) + self.assertEqual(os.stat(dest + "/selftest-hardlink-staticdev" + libdir + "/libhello-50.a").st_nlink, 202) + self.assertEqual(os.stat(dest + "/selftest-hardlink-staticdev" + libdir + "/libhello-75.a").st_nlink, 202) + + # Check static dbg + # 101 items, a copy in both package/packages-split so 202 + self.assertEqual(os.stat(dest + "/selftest-hardlink-dbg" + libdir + "/.debug-static/libhello.a").st_nlink, 202) + self.assertEqual(os.stat(dest + "/selftest-hardlink-dbg" + libdir + "/.debug-static/libhello-25.a").st_nlink, 202) + self.assertEqual(os.stat(dest + "/selftest-hardlink-dbg" + libdir + "/.debug-static/libhello-50.a").st_nlink, 202) + self.assertEqual(os.stat(dest + "/selftest-hardlink-dbg" + libdir + "/.debug-static/libhello-75.a").st_nlink, 202) # Test a sparse file remains sparse sparsestat = os.stat(dest + "/selftest-hardlink" + bindir + "/sparsetest") From patchwork Sun Aug 4 17:09:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47263 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8AF3C52D72 for ; Sun, 4 Aug 2024 17:09:41 +0000 (UTC) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mx.groups.io with SMTP id smtpd.web11.30097.1722791379925534040 for ; Sun, 04 Aug 2024 10:09:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=nKCo2FtI; spf=softfail (domain: sakoman.com, ip: 209.85.210.175, mailfrom: steve@sakoman.com) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-70d23caf8ddso8443749b3a.0 for ; Sun, 04 Aug 2024 10:09:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791379; x=1723396179; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=WtRvxK9eHW1trUtssjiTrCYI6K5Fv4uXzUC64P1M0cw=; b=nKCo2FtIwZwQslsE85k2J0PhglOxoDqrrj+kc/EZLQr59nRsMESb6SyMJH5vs9/MUT QdEufLHecfvpCzM6IyoL0crBh46rThOznu7fShxZs8LtrtM+qBB2qH7hrIQXo6Ecui6x znct1AUDemCaEehW5kxefy80V3rIb4sdDUx2o7q+abqJPF0Cuc8Gx9vz3YiPeYgr/rZc oCI3sJX3Ic9IcUaGfOZWOykWMQs5AU7CN9Vdm51fiTFL8uzCYXZA9HdtjHLpbhC8MxBU RZQ2msjONcT8U6X307MLKSaW/D74IHg8grIUJAH0bRSYekT5mCFgCXGCDtYkClymHNXH xxyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791379; x=1723396179; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WtRvxK9eHW1trUtssjiTrCYI6K5Fv4uXzUC64P1M0cw=; b=oigNi8VF/L0C0M6KAb0TRHyHGbd7ROGYVRRjJ6ZI+TuM3TxruS+AUQ5W13d1BAhji3 O1kLsiYwarZixcSozpSknXjCBafAuQ+QnxgCT1jDVk008sI+JZjM1Vzc2y2osFaEqZob YB1YtmT4RQrisrojxbDm5x0Erng/nGf7NQlpUOUfP8PIrH5PLTZ4sGYhZyvh6grhecpb A0D+U/sDY61pfc8fmHtGKNdMHhB7HFaMqU2ZnFtlqOQaZ1d50TgToVq+hxHLK61qNGQx pL4f1V4hiNZP7yyLu2sH/qSgJCAVVudJTkoHH3s9XLl06uoRVOqGNnv2jn/6PQeRpZKn hy1g== X-Gm-Message-State: AOJu0Yxc24nr/vrxGg4LHOqVGd357UhK+kvFolzIoi4nsY9/VTzRgSyp xmdYxwh1UGpjgCXGhWLROVYwlMFKAm97m5/REw4yVByzDB2InVGiA2tTCo3e990Kv+/4/VeVkmo racfp/A== X-Google-Smtp-Source: AGHT+IFuD/C3JaRheQ9IBqCdqyL29uz0mmFic+rEj7xsp9LyrdPArBJuhqhfj5tL7sdeu/7Pf8ZB9Q== X-Received: by 2002:a05:6a00:858f:b0:70d:14d1:1bb7 with SMTP id d2e1a72fcca58-7106d0466b0mr11507005b3a.28.1722791378958; Sun, 04 Aug 2024 10:09:38 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:38 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 09/18] create-spdx-*: Support multilibs via SPDX_MULTILIB_SSTATE_ARCHS Date: Sun, 4 Aug 2024 10:09:12 -0700 Message-Id: <5c1ce317fff6df6818f72d93197e5ec59ad4c462.1722790925.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202968 From: Mark Hatle When a create-spdx-* classes is processing documents, it needs to find the document in a path that is related to the SSTATE_ARCH when a packge is generated. The SSTATE_ARCH can be affected by multilib configurations, resulting is something like armv8a-mlib. When the image (or SDK) is being generated and the components are collected, the system has no knowledge of the multilib arch and will fail to find it, such as: ERROR: meta-toolchain-1.0-r0 do_populate_sdk: No SPDX file found for package libilp32-libgcc-dbg, False sstate:libilp32-libgcc:armv8a-ilp32-mllibilp32-elf:14.1.0:r0:armv8a-ilp32:12: sstate:libilp32-libgcc::14.1.0:r0::12: Adding in the new SPDX_MULTILIB_SSTATE_ARCHS will provide a full set of SSTATE_ARCHS including ones that contain the multilib extension which will allow create-spdx-* to correctly find the document it is looking for. This would also be valuable to any other function doing a similar search through SSTATE_ARCH that may have been extended with multilib configurations. Signed-off-by: Mark Hatle Signed-off-by: Richard Purdie (cherry picked from commit f1499c36c1054fc90f7b7268cc95285f2eca72f7) spdx-3.0 items are not application and were removed. spdx-common.bbclass item was moved into create-sdpx-2.2.bbclass. Signed-off-by: Mark Hatle Signed-off-by: Steve Sakoman --- meta/classes-recipe/populate_sdk_base.bbclass | 4 ++++ meta/classes/create-spdx-2.2.bbclass | 14 ++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/meta/classes-recipe/populate_sdk_base.bbclass b/meta/classes-recipe/populate_sdk_base.bbclass index 81896d808f..6cb43ade30 100644 --- a/meta/classes-recipe/populate_sdk_base.bbclass +++ b/meta/classes-recipe/populate_sdk_base.bbclass @@ -6,6 +6,10 @@ PACKAGES = "" +# This exists as an optimization for SPDX processing to only run in image and +# SDK processing context. This class happens to be common to these usages. +SPDX_MULTILIB_SSTATE_ARCHS = "${@all_multilib_tune_values(d, 'SSTATE_ARCHS')}" + inherit image-postinst-intercepts image-artifact-names # Wildcards specifying complementary packages to install for every package that has been explicitly diff --git a/meta/classes/create-spdx-2.2.bbclass b/meta/classes/create-spdx-2.2.bbclass index 4ea91f6499..d104668ffd 100644 --- a/meta/classes/create-spdx-2.2.bbclass +++ b/meta/classes/create-spdx-2.2.bbclass @@ -35,6 +35,8 @@ SPDX_LICENSES ??= "${COREBASE}/meta/files/spdx-licenses.json" SPDX_CUSTOM_ANNOTATION_VARS ??= "" +SPDX_MULTILIB_SSTATE_ARCHS ??= "${SSTATE_ARCHS}" + SPDX_ORG ??= "OpenEmbedded ()" SPDX_SUPPLIER ??= "Organization: ${SPDX_ORG}" SPDX_SUPPLIER[doc] = "The SPDX PackageSupplier field for SPDX packages created from \ @@ -349,7 +351,7 @@ def collect_dep_recipes(d, doc, spdx_recipe): deploy_dir_spdx = Path(d.getVar("DEPLOY_DIR_SPDX")) spdx_deps_file = Path(d.getVar("SPDXDEPS")) - package_archs = d.getVar("SSTATE_ARCHS").split() + package_archs = d.getVar("SPDX_MULTILIB_SSTATE_ARCHS").split() package_archs.reverse() dep_recipes = [] @@ -389,7 +391,7 @@ def collect_dep_recipes(d, doc, spdx_recipe): return dep_recipes -collect_dep_recipes[vardepsexclude] = "SSTATE_ARCHS" +collect_dep_recipes[vardepsexclude] = "SPDX_MULTILIB_SSTATE_ARCHS" def collect_dep_sources(d, dep_recipes): import oe.sbom @@ -763,7 +765,7 @@ python do_create_runtime_spdx() { providers = collect_package_providers(d) pkg_arch = d.getVar("SSTATE_PKGARCH") - package_archs = d.getVar("SSTATE_ARCHS").split() + package_archs = d.getVar("SPDX_MULTILIB_SSTATE_ARCHS").split() package_archs.reverse() if not is_native: @@ -869,7 +871,7 @@ python do_create_runtime_spdx() { oe.sbom.write_doc(d, runtime_doc, pkg_arch, "runtime", spdx_deploy, indent=get_json_indent(d)) } -do_create_runtime_spdx[vardepsexclude] += "OVERRIDES SSTATE_ARCHS" +do_create_runtime_spdx[vardepsexclude] += "OVERRIDES SPDX_MULTILIB_SSTATE_ARCHS" addtask do_create_runtime_spdx after do_create_spdx before do_build do_rm_work SSTATETASKS += "do_create_runtime_spdx" @@ -1004,7 +1006,7 @@ def combine_spdx(d, rootfs_name, rootfs_deploydir, rootfs_spdxid, packages, spdx import bb.compress.zstd providers = collect_package_providers(d) - package_archs = d.getVar("SSTATE_ARCHS").split() + package_archs = d.getVar("SPDX_MULTILIB_SSTATE_ARCHS").split() package_archs.reverse() creation_time = datetime.now(tz=timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") @@ -1155,4 +1157,4 @@ def combine_spdx(d, rootfs_name, rootfs_deploydir, rootfs_spdxid, packages, spdx tar.addfile(info, fileobj=index_str) -combine_spdx[vardepsexclude] += "BB_NUMBER_THREADS SSTATE_ARCHS" +combine_spdx[vardepsexclude] += "BB_NUMBER_THREADS SPDX_MULTILIB_SSTATE_ARCHS" From patchwork Sun Aug 4 17:09:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47260 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6A31C52D6D for ; Sun, 4 Aug 2024 17:09:41 +0000 (UTC) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mx.groups.io with SMTP id smtpd.web10.30122.1722791381334239523 for ; Sun, 04 Aug 2024 10:09:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=WmaQIpaN; spf=softfail (domain: sakoman.com, ip: 209.85.210.182, mailfrom: steve@sakoman.com) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-70d23caf8ddso8443760b3a.0 for ; Sun, 04 Aug 2024 10:09:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791381; x=1723396181; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=m8ICrTyxiE2481vRHDZNTf/mi/gap5kC+FNnvaW6+38=; b=WmaQIpaNPp78/5CgcKK4GpmuyVPE4y+7AjQ+asVe8fiIv3x8kX04K6BtxRHbsBvKVd 3BPGA2pAfsLp03xPZljF9/KQIL/v5out2r0yuB05OFXkSdei8CzYadIEN8e0xsBdzAVx xA7SFAWelMdlpG2wn0AKB+nNI8o8vWBbUBbL1CHNFa4YeVcWA41JYAOz0VIqMoYhIJeN 2RbWdZTCqI+ypSruwTRbfnkt0ADjBxYvMJPlWmjSNG6s/L8JQdcxQhs9meQ2HtkRLuS9 SWudjb1dpzbS1PBCUDXxBVy4WHbT/9slrmDV2FiamgodDyNOoMLRWNxj+NdzTi4ZMOxr gCoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791381; x=1723396181; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m8ICrTyxiE2481vRHDZNTf/mi/gap5kC+FNnvaW6+38=; b=YG8KpfekqvaOfKTn1rtcf2e+IKU3hMUR+NPrrKpn8I2BR+QM58AHHnJrwzEhdkePAN q3V+ClcecZT2+LXBpbPcx16/cv16zoE0o2e1WZJyTofuEehQzRLtp+MmOPySf0jg9Ycl GPKi96eS3DhGRjwJxW8sWDFJ7pVSQkpW/eLghDAC76XXgr/qPSb68W2+erxpEGxKwaJI p1lqdk0RBfjROkK17KDkTj4IySswv6tt76EkAKj/w9Q6LKhXpvGjOr+Ie3TQPdYMtD/P Mvge9HXKhueNdezFYrDTiL96GAwghghrIQCrfTeJffbmUWMOMkNmP0z6JeBLrQHowWPP JFXg== X-Gm-Message-State: AOJu0YynOb0XsP8w6ZxmTB8YWUoQrryEL7568H2A5+myvkJ7Gd8OozsF QDnf3Ps4Jx1UYkycz1qEO+KZx4GKlTcWXMOZVEEXtVjeGEsqHXCq608HCSdBA0mZ5YTPZHaIPyU F/elyog== X-Google-Smtp-Source: AGHT+IGw0LtShtsmJ2BDPhmKo1ftFziIK5YaoVPCRPLVcV4bDVnOPHUYdKSWZLd8qaxv0y+n6bpnXA== X-Received: by 2002:a05:6a21:329e:b0:1c4:2132:e205 with SMTP id adf61e73a8af0-1c69966ba57mr14677865637.48.1722791380497; Sun, 04 Aug 2024 10:09:40 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:40 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 10/18] create-spdx-3.0/populate_sdk_base: Add SDK_CLASSES inherit mechanism to fix tarball SPDX manifests Date: Sun, 4 Aug 2024 10:09:13 -0700 Message-Id: <95660951a09e2a3fe63eb1017ad8f1d7fc9cd503.1722790925.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202969 From: Richard Purdie Currently, "tarball" sdk based recipes don't generate SPDX manifests as they don't include the rootfs generation classes. Split the SPDX 3.0 image class into two so the SDK components can be included where needed. To do this, introduce an SDK_CLASSES variable similar to IMAGE_CLASSES which the SDK code can use. Migrate testsdk usage to this. Also move the image/sdk spdx classes to classes-recipe rather than the general classes directory since they'd never be included on a global level. For buildtools-tarball, it has its own testsdk functions so disable the class there as a deferred inherit would overwrite it. Signed-off-by: Richard Purdie (cherry picked from commit 662396533177b72cc1d83e95841b27f7e42dcb20) Eliminate spdx-3.0 items, not applicable to Scarthgap. Signed-off-by: Mark Hatle Signed-off-by: Steve Sakoman --- meta/classes-recipe/populate_sdk_base.bbclass | 3 +++ meta/classes-recipe/testimage.bbclass | 2 -- meta/recipes-core/meta/buildtools-tarball.bb | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/meta/classes-recipe/populate_sdk_base.bbclass b/meta/classes-recipe/populate_sdk_base.bbclass index 6cb43ade30..a103e7b738 100644 --- a/meta/classes-recipe/populate_sdk_base.bbclass +++ b/meta/classes-recipe/populate_sdk_base.bbclass @@ -4,6 +4,9 @@ # SPDX-License-Identifier: MIT # +SDK_CLASSES += "${@bb.utils.contains("IMAGE_CLASSES", "testimage", "testsdk", "", d)}" +inherit_defer ${SDK_CLASSES} + PACKAGES = "" # This exists as an optimization for SPDX processing to only run in image and diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass index ed0d87b7a7..2f68f83dfd 100644 --- a/meta/classes-recipe/testimage.bbclass +++ b/meta/classes-recipe/testimage.bbclass @@ -483,5 +483,3 @@ python () { if oe.types.boolean(d.getVar("TESTIMAGE_AUTO") or "False"): bb.build.addtask("testimage", "do_build", "do_image_complete", d) } - -inherit testsdk diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb index 92fbda335d..e2ce5b3ecf 100644 --- a/meta/recipes-core/meta/buildtools-tarball.bb +++ b/meta/recipes-core/meta/buildtools-tarball.bb @@ -112,6 +112,9 @@ INHIBIT_DEFAULT_DEPS = "1" # Directory in testsdk that contains testcases TESTSDK_CASES = "buildtools-cases" +# We have our own code, avoid deferred inherit +SDK_CLASSES:remove = "testsdk" + python do_testsdk() { import oeqa.sdk.testsdk testsdk = oeqa.sdk.testsdk.TestSDK() From patchwork Sun Aug 4 17:09:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47271 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10282C3DA7F for ; Sun, 4 Aug 2024 17:09:52 +0000 (UTC) Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) by mx.groups.io with SMTP id smtpd.web10.30123.1722791382976150191 for ; Sun, 04 Aug 2024 10:09:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=zKXsq4wO; spf=softfail (domain: sakoman.com, ip: 209.85.167.182, mailfrom: steve@sakoman.com) Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-3db157cb959so6365830b6e.0 for ; Sun, 04 Aug 2024 10:09:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791382; x=1723396182; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QZhmLZsb/02XSJHtzcFtnjWsdOausKsPm7xWltNguYo=; b=zKXsq4wOLfeYQpkgzMbs2xofajswgkRByUNQLPKtQOKTTMYCIUyNB91KuSi2mKJUb+ kfVXjn+amg9ymrrRFkrYh/IwR7yF4iJpj9siHogx5mh2J3AcJXFstc8/VzlXlf7Ayxkq +NCQ34emvcWEfFa92oW23b6E+qUWoFRExAR+vrat5gQc5KjDGcKQ1oT0mTK9rQmyo65C 8nXiLGhx/VXaNCXVNvj57nKWhlOm4AOwrdjsnxeGfQaRO7VjgGF9dw+VECo9bEECRzZC 1qM8llcPReFT0p1C7Q5ZSV+Dd/6iHsnDxQIUoIWtQUbx/h19ur0Z3Zx1Sf1RVmWPX06/ yynQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791382; x=1723396182; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QZhmLZsb/02XSJHtzcFtnjWsdOausKsPm7xWltNguYo=; b=pRKrFIWUMnsSI9M1boM9erW2voo/AxRt0LBGxXPRpGjD6AO++xdQmWg85yneq2i1KW pv9r86E9M/l1zUZdSZAATK+Q4x/5oDaNUpAGfsWt9iPSgpcD2OY+Hh11skE7KhE6/+67 0oje4a/0WVXY8gJ3sl8djCOHZLITIghRqc9FAxXwl5+uZyrrfL2lB9EpyHZXLAU6DpIJ 5ji049s88IwKuN9tVwL4le8/E/U9XPou8abqUQLHqEOO0iUoIQ7tPX392r4edgSuUzNs yOSU3bsgv2Ksslv5NBMp6JqZMM60tlYPZKURNJmBZwYsGOmWkpOdeO6kuzwMf9y1JFin EkQQ== X-Gm-Message-State: AOJu0Yz/kC5923PbD9vr00FagiDATrtogCnbDe8VIM0o+HoLWSmMWXtH QvnMCfupriK7W3Al45VJyQGB7bVVthkd/i8ygs64G7k8PpJU8GR5NUfy6ABy7FVDXeo0uFx7aXt Nw5bBFA== X-Google-Smtp-Source: AGHT+IGwbk0tbAAaMnm/K3JJXIsD6GL7qkjubypC+RXRUodQQxgDJlsk8F9akhHYNyKACpQwf9oZNw== X-Received: by 2002:a05:6870:304f:b0:254:b337:eebc with SMTP id 586e51a60fabf-26891e9301bmr12945184fac.35.1722791381895; Sun, 04 Aug 2024 10:09:41 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:41 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 11/18] oeqa sdk cases: Skip SDK test cases when TCLIBC is newlib Date: Sun, 4 Aug 2024 10:09:14 -0700 Message-Id: <99a5ca1c2c2b7b3193710bc681fbf05936025b5b.1722790925.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202970 From: Mark Hatle Newlib generally requires additional components to function. Skip the cases where newlib is known to not work. Signed-off-by: Mark Hatle Signed-off-by: Mark Hatle Signed-off-by: Richard Purdie (cherry picked from commit b9934755554e40d9980b90c3d541f4c702203561) Signed-off-by: Mark Hatle Signed-off-by: Steve Sakoman --- meta/lib/oeqa/sdk/cases/assimp.py | 4 ++++ meta/lib/oeqa/sdk/cases/buildcpio.py | 5 +++++ meta/lib/oeqa/sdk/cases/buildepoxy.py | 4 ++++ meta/lib/oeqa/sdk/cases/buildgalculator.py | 4 ++++ meta/lib/oeqa/sdk/cases/buildlzip.py | 5 +++++ meta/lib/oeqa/sdk/cases/gcc.py | 4 ++++ 6 files changed, 26 insertions(+) diff --git a/meta/lib/oeqa/sdk/cases/assimp.py b/meta/lib/oeqa/sdk/cases/assimp.py index d990b1e97d..4cc30f2672 100644 --- a/meta/lib/oeqa/sdk/cases/assimp.py +++ b/meta/lib/oeqa/sdk/cases/assimp.py @@ -19,6 +19,10 @@ class BuildAssimp(OESDKTestCase): """ def setUp(self): + libc = self.td.get("TCLIBC") + if libc in [ 'newlib' ]: + raise unittest.SkipTest("CMakeTest class: SDK doesn't contain a supported C library") + if not (self.tc.hasHostPackage("nativesdk-cmake") or self.tc.hasHostPackage("cmake-native")): raise unittest.SkipTest("Needs cmake") diff --git a/meta/lib/oeqa/sdk/cases/buildcpio.py b/meta/lib/oeqa/sdk/cases/buildcpio.py index 51003b19cd..ab8fc41876 100644 --- a/meta/lib/oeqa/sdk/cases/buildcpio.py +++ b/meta/lib/oeqa/sdk/cases/buildcpio.py @@ -17,6 +17,11 @@ class BuildCpioTest(OESDKTestCase): """ Check that autotools will cross-compile correctly. """ + def setUp(self): + libc = self.td.get("TCLIBC") + if libc in [ 'newlib' ]: + raise unittest.SkipTest("AutotoolsTest class: SDK doesn't contain a supported C library") + def test_cpio(self): with tempfile.TemporaryDirectory(prefix="cpio-", dir=self.tc.sdk_dir) as testdir: tarball = self.fetch(testdir, self.td["DL_DIR"], "https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz") diff --git a/meta/lib/oeqa/sdk/cases/buildepoxy.py b/meta/lib/oeqa/sdk/cases/buildepoxy.py index 147ee3e0ee..5b9c36fcec 100644 --- a/meta/lib/oeqa/sdk/cases/buildepoxy.py +++ b/meta/lib/oeqa/sdk/cases/buildepoxy.py @@ -18,6 +18,10 @@ class EpoxyTest(OESDKTestCase): Test that Meson builds correctly. """ def setUp(self): + libc = self.td.get("TCLIBC") + if libc in [ 'newlib' ]: + raise unittest.SkipTest("MesonTest class: SDK doesn't contain a supported C library") + if not (self.tc.hasHostPackage("nativesdk-meson") or self.tc.hasHostPackage("meson-native")): raise unittest.SkipTest("EpoxyTest class: SDK doesn't contain Meson") diff --git a/meta/lib/oeqa/sdk/cases/buildgalculator.py b/meta/lib/oeqa/sdk/cases/buildgalculator.py index 178f07472d..28187434a1 100644 --- a/meta/lib/oeqa/sdk/cases/buildgalculator.py +++ b/meta/lib/oeqa/sdk/cases/buildgalculator.py @@ -18,6 +18,10 @@ class GalculatorTest(OESDKTestCase): Test that autotools and GTK+ 3 compiles correctly. """ def setUp(self): + libc = self.td.get("TCLIBC") + if libc in [ 'newlib' ]: + raise unittest.SkipTest("GTK3Test class: SDK doesn't contain a supported C library") + if not (self.tc.hasTargetPackage("gtk+3", multilib=True) or \ self.tc.hasTargetPackage("libgtk-3.0", multilib=True)): raise unittest.SkipTest("GalculatorTest class: SDK don't support gtk+3") diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py b/meta/lib/oeqa/sdk/cases/buildlzip.py index b4b7d85b88..afedc25178 100644 --- a/meta/lib/oeqa/sdk/cases/buildlzip.py +++ b/meta/lib/oeqa/sdk/cases/buildlzip.py @@ -13,6 +13,11 @@ class BuildLzipTest(OESDKTestCase): """ Test that "plain" compilation works, using just $CC $CFLAGS etc. """ + def setUp(self): + libc = self.td.get("TCLIBC") + if libc in [ 'newlib' ]: + raise unittest.SkipTest("MakefileTest class: SDK doesn't contain a supported C library") + def test_lzip(self): with tempfile.TemporaryDirectory(prefix="lzip", dir=self.tc.sdk_dir) as testdir: tarball = self.fetch(testdir, self.td["DL_DIR"], "http://downloads.yoctoproject.org/mirror/sources/lzip-1.19.tar.gz") diff --git a/meta/lib/oeqa/sdk/cases/gcc.py b/meta/lib/oeqa/sdk/cases/gcc.py index fc28b9c3d4..e810d2c42b 100644 --- a/meta/lib/oeqa/sdk/cases/gcc.py +++ b/meta/lib/oeqa/sdk/cases/gcc.py @@ -26,6 +26,10 @@ class GccCompileTest(OESDKTestCase): os.path.join(self.tc.sdk_dir, f)) def setUp(self): + libc = self.td.get("TCLIBC") + if libc in [ 'newlib' ]: + raise unittest.SkipTest("GccCompileTest class: SDK doesn't contain a supported C library") + machine = self.td.get("MACHINE") if not (self.tc.hasHostPackage("packagegroup-cross-canadian-%s" % machine) or self.tc.hasHostPackage("^gcc-", regex=True)): From patchwork Sun Aug 4 17:09:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47272 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 503DEC52D73 for ; Sun, 4 Aug 2024 17:09:52 +0000 (UTC) Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) by mx.groups.io with SMTP id smtpd.web10.30126.1722791384068746539 for ; Sun, 04 Aug 2024 10:09:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=vS6JCUW5; spf=softfail (domain: sakoman.com, ip: 209.85.210.41, mailfrom: steve@sakoman.com) Received: by mail-ot1-f41.google.com with SMTP id 46e09a7af769-7093d565310so7999373a34.2 for ; Sun, 04 Aug 2024 10:09:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791383; x=1723396183; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=YVEDN8zOdbopMA2MRwe5MW9i1Y5Q0eex+5eQET9aXCQ=; b=vS6JCUW5vvmEBVa/BbLhMZ1uArpFjk6VroUKBwGaXrxs+tEyKrpYTes9p9OJ9e79dh zCXtswFgsqX7mtJInA3jB+DYaAI5CquB6n31u2duYFK4CO8rsO0s7tnAAYwYr9npxt6g /NNthJMapBisNDwq0rc1You6N/oi6d2xPpHGaTodMLvRoTf0zvicIuqXoMyoBfFTvRf0 XoJwjSt67Fke34EPgDiKpyFkRW+Dl1DSzb0AnkWAmEaRZca+ABJ4TqtKg9iSOtoXCsc1 xv9B/yJ1ZHJLpRwDoEHpFocrV4kSBgNrKHQevWZAN8sXf9GDHxNqXnqOfkx7QH8qB9uo TE6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791383; x=1723396183; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YVEDN8zOdbopMA2MRwe5MW9i1Y5Q0eex+5eQET9aXCQ=; b=C6uHBsENcW+RbalTPFCH7M0WiXVKx6741eqTvVjg74/zjg1wojUAzBG/C34sQjIh9B E4CNVWIPt7YF2OmsjZ0gT2UMn6cg74+d5RTY7JDqOPH0q4uq/FCkEyqp8AbKYeFI6Tkx MiTBm/0xD2YNoLrwdEON8ci8KlcxzitBohjOLrlg+2bF7PwQ3ueFDHtIdvZWQN3VPqkV eI78b2osTPN8gzzBi04Wcp623bkt197RBwoJBlJDlXkxXAyeL8NiUd2cZ0TggxFzyChS 8BTd0nTnSPZ1mYbUYytezg0DYFZvlBq/ifDxld9peVFrpN2Rz6BlQeaFW4Fu3m2UA65w Xm5A== X-Gm-Message-State: AOJu0YyxHfMDpSdLHYtW9Z3qIwZPvEDrSX0iDeUJbRJiUBZcGn1JBwO4 F+sGNsu/GFGr39ZLqllvSSYMOFofW8O0YaKa782OGab7eML8wTylFKlccWYEWlabsCwnfjRxZLl oT56Qgg== X-Google-Smtp-Source: AGHT+IGucGSs7bfP2V596x2M7USPRmF7++14y+E7a4rtdHLmoJCMMnhT2hu0U6b6dEkiwoF5E5kwGA== X-Received: by 2002:a05:6830:390b:b0:709:49fe:5a31 with SMTP id 46e09a7af769-709b3214010mr15262701a34.13.1722791383209; Sun, 04 Aug 2024 10:09:43 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:42 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 12/18] pseudo: Fix to work with glibc 2.40 Date: Sun, 4 Aug 2024 10:09:15 -0700 Message-Id: <1d5903bf749436d9b26df858041337b723614963.1722790925.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202971 From: Richard Purdie glibc 2.40 renames some internal header variables. Update our hack to work with the new version. These kinds of problems illustrate we need to address the issue properly. Signed-off-by: Richard Purdie (cherry picked from commit 35021d650de3eecc3f42000181b39a5db5a8eaa0) Signed-off-by: Mark Hatle Signed-off-by: Steve Sakoman --- meta/recipes-devtools/pseudo/files/glibc238.patch | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/pseudo/files/glibc238.patch b/meta/recipes-devtools/pseudo/files/glibc238.patch index da4b8caee3..dfb5c283f6 100644 --- a/meta/recipes-devtools/pseudo/files/glibc238.patch +++ b/meta/recipes-devtools/pseudo/files/glibc238.patch @@ -9,7 +9,7 @@ Index: git/pseudo_wrappers.c =================================================================== --- git.orig/pseudo_wrappers.c +++ git/pseudo_wrappers.c -@@ -6,6 +6,15 @@ +@@ -6,6 +6,18 @@ * SPDX-License-Identifier: LGPL-2.1-only * */ @@ -21,6 +21,9 @@ Index: git/pseudo_wrappers.c +#undef __GLIBC_USE_ISOC2X +#undef __GLIBC_USE_C2X_STRTOL +#define __GLIBC_USE_C2X_STRTOL 0 ++#undef __GLIBC_USE_ISOC23 ++#undef __GLIBC_USE_C23_STRTOL ++#define __GLIBC_USE_C23_STRTOL 0 + #include #include @@ -29,7 +32,7 @@ Index: git/pseudo_util.c =================================================================== --- git.orig/pseudo_util.c +++ git/pseudo_util.c -@@ -8,6 +8,14 @@ +@@ -8,6 +8,17 @@ */ /* we need access to RTLD_NEXT for a horrible workaround */ #define _GNU_SOURCE @@ -41,6 +44,9 @@ Index: git/pseudo_util.c +#undef __GLIBC_USE_ISOC2X +#undef __GLIBC_USE_C2X_STRTOL +#define __GLIBC_USE_C2X_STRTOL 0 ++#undef __GLIBC_USE_ISOC23 ++#undef __GLIBC_USE_C23_STRTOL ++#define __GLIBC_USE_C23_STRTOL 0 #include #include From patchwork Sun Aug 4 17:09:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47270 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F581C52D74 for ; Sun, 4 Aug 2024 17:09:52 +0000 (UTC) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mx.groups.io with SMTP id smtpd.web11.30100.1722791385231623437 for ; Sun, 04 Aug 2024 10:09:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=mbXsEnME; spf=softfail (domain: sakoman.com, ip: 209.85.210.182, mailfrom: steve@sakoman.com) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-70d2b921cdfso8645871b3a.0 for ; Sun, 04 Aug 2024 10:09:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791384; x=1723396184; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=KoL+DfTDYswZkzwkxokpH8ldwo19kSTpp0yFzzKEe5I=; b=mbXsEnMEngqJKJsgbgIPz1UFMG+SwpsDmZqWS6Y2/b7XTpfwvnOyFC1X2L6WJ5jqK9 F6I9Yn6b4XY7DAO0So8tICRwXI2JBT5UZ/jRMyYUBcTs8OCrH3D0GK5KZrZiDi7bodZJ 3SA4OnAc0uXd9S04JT6JiyPfn81Yu88rCnhb+zNFuiRFk4NZ65gXlIfOQU2IgW5dNurV A8a0bA8QQJhkE6rmuOUyp5kotKBNS4ifzjLsGWJldr5supxNdk2OF0T9NhGaDpueSRd9 2RSByYZRc2G8wanUbop1htXfD3g612W7Jxj61D8xEco3PqWs+5bap7Ghue0vHgFiKxSi aUMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791384; x=1723396184; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KoL+DfTDYswZkzwkxokpH8ldwo19kSTpp0yFzzKEe5I=; b=UhKy0tIqEi6r/zp4p/oXbpajcDwL+aoLdruyeBI4BoY1tlZg0jMcixnpcwR4oY2IXe ZUVf7bD7m2vo/c985tPC39y7oQm+lbD420UhIz7byuzDkOewN0cVtVGQ7pxeXhXJG6BJ vtC5X2aLCHGeL12+TZOQepQ4CWsuAVqaLjQ1p0xWgDFodNGcey+iZz5TcZ/uONk9GvjE +Lm2/EjhvcI/X+90gkWIhvUa0uXaGBWqcr5GMrfh4HkFZhl6dkezudRToI7LHs7vspfN netdc1kwh9KMe7KkvcONbJlvNpERz50w8SknUQ1QZRaSk5zPbY0lDhe3l33F7xmGEGyp W/zQ== X-Gm-Message-State: AOJu0Yyhg4W8DqsKEuZPaGsxc8VHVgfMglr+/8krfgsYLr0z2tn1Od9N CSmylMwpWztA9VZ9q0gQCQu8xJyLn0Ao0gl5CtqDEuFRNMuBhn2kMXbJ9lKCCoRKwPjgl1rQVVV quXZh/w== X-Google-Smtp-Source: AGHT+IGp6FoJYfZr2GsigFCRyPHkFKg8Oi1/fqDOBpYtYmj0CBHWWRwnKnotymmNZGjG90HpT4ceMw== X-Received: by 2002:a05:6a00:9187:b0:70e:98e3:1c17 with SMTP id d2e1a72fcca58-7106d04606emr10509686b3a.27.1722791384450; Sun, 04 Aug 2024 10:09:44 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:44 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 13/18] pseudo: Update to include open symlink handling bugfix Date: Sun, 4 Aug 2024 10:09:16 -0700 Message-Id: <97410e90f7233e5c9ce38eea0fa99b76160ffce9.1722790925.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202972 From: Richard Purdie Update to a new revision which includes "Bugfix for Linux open(O_CREAT|O_EXCL)" Signed-off-by: Richard Purdie (cherry picked from commit 92a9710ec88c8729fa3d83baa2e63dd74d95cdf8) Signed-off-by: Mark Hatle Signed-off-by: Steve Sakoman --- meta/recipes-devtools/pseudo/pseudo_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb index 5f32b3777a..7d8f71f65d 100644 --- a/meta/recipes-devtools/pseudo/pseudo_git.bb +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb @@ -14,7 +14,7 @@ SRC_URI:append:class-nativesdk = " \ file://older-glibc-symbols.patch" SRC_URI[prebuilt.sha256sum] = "ed9f456856e9d86359f169f46a70ad7be4190d6040282b84c8d97b99072485aa" -SRCREV = "e11ae91da7d0711f5e33ea9dfbf1875dde3c1734" +SRCREV = "374089f2ed83da4d0d4e58df067142ff99c7eb12" S = "${WORKDIR}/git" PV = "1.9.0+git" From patchwork Sun Aug 4 17:09:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47268 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E18FC52D72 for ; Sun, 4 Aug 2024 17:09:52 +0000 (UTC) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mx.groups.io with SMTP id smtpd.web11.30101.1722791386465211093 for ; Sun, 04 Aug 2024 10:09:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=xVBN/3iV; spf=softfail (domain: sakoman.com, ip: 209.85.210.182, mailfrom: steve@sakoman.com) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-70eb73a9f14so7354205b3a.2 for ; Sun, 04 Aug 2024 10:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791386; x=1723396186; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=PNUjt54xMXglhu8Z4gxmLK10xc3H5JLwhcBiTbt0/4o=; b=xVBN/3iVLxaLuo+8oR8wN7U5NMHx0uA2Ra9NrVvqnmiY6GZ80QqAcgpX0/GPDQ+NPc inxw2GARha/2hJF5VbrYatHIfJH8NVCLdgI9uCKi3wzMLUuU+luw6de6ftiqIV0+tvPt 1CMWzTDgV/I3JBL5cgC8cdRwSqqAmPYzJRjt2TgWoUcF9XQUFnZLymUEfiZLvNQ4VRip 6/hPEjJc4NHcIHS9YoCcQwuUSmJ8EKF8Y4O+Y0xj4YUKnrULFeeAyC/YLmVuTyxQsxDq /sefrJ0eueO9DBiRxQ4vUzjdEgJZWcGn1hbKoxrazzlPRGIv8r0c1R8HeWOizG5MlZLg NAAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791386; x=1723396186; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PNUjt54xMXglhu8Z4gxmLK10xc3H5JLwhcBiTbt0/4o=; b=Hn1Ejm9KzhgUDKWRFgNOHYNSRTt2YFM/lwPu5snTcHb6pm7gKqpn6pAeSKXLnLQ7ZL RmP6gYJjwAqxh27coSzA6Hfe6rW27n6SaRAq2D7ZmgyIIvwzMDnsgmuZFJ/R+GCIEm8N tyrhOLWz9AE5sHi14kvUfv+As8/AaulWGvDfX3S/6osu+9TgwHms/C7aiwhNsOsQWDic flNqLacoYhU/dASjB2DW92AUn92dYiJ0LgO9BXiUG+kz/fyz8VWOS+qytS12wO1fPX68 LH/DtJBtJe3a6gDi6D4Qtswfyd4Tfb8O9+187RTKhUKgYYDqxZvzuO2uGclLdJu9c2t+ LtCw== X-Gm-Message-State: AOJu0Yx44mrQI5u3d41IGp7xPFXyRzMGhJZHmFlChUga89KnuwlfNYBA Q+WENVZkCLNhq6puOeVlhTEqgDtElTt6z027tkUh7zDAodCiZ2CcL6J3avNMdzzCCEx4V1zzYOA NJ/jPsA== X-Google-Smtp-Source: AGHT+IHyFbvcjcIqVWMKOPO7afcovqirpk4RnhIfkHX/GzQ86eRh4f3HD9ZZy3LMBpqOo1qM+uee+g== X-Received: by 2002:a05:6a00:2e9e:b0:706:6af8:e08a with SMTP id d2e1a72fcca58-7106cf93002mr12931359b3a.2.1722791385755; Sun, 04 Aug 2024 10:09:45 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:45 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 14/18] iptables: fix memory corruption when parsing nft rules Date: Sun, 4 Aug 2024 10:09:17 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202973 From: Christian Taedcke This commit fixes a memory corruption issue when iptables (with enabled PACKAGECONFIG libnftnl) is used to access rules created by nft. To reproduce the issue: nft add chain ip filter TESTCHAIN { meta mark set 123 \;} iptables -t filter -n -L TESTCHAIN This produced the following output: Chain TESTCHAIN (0 references) target prot opt source destination MARK 0 -- 0.0.0.0/0 0.0.0.0/0 MARK set 0x7b malloc(): corrupted top size Aborted (core dumped) This commit fixes this issue. Signed-off-by: Christian Taedcke Signed-off-by: Steve Sakoman --- ...se-Add-missing-braces-around-ternary.patch | 37 +++++++++++++++++++ .../iptables/iptables_1.8.10.bb | 1 + 2 files changed, 38 insertions(+) create mode 100644 meta/recipes-extended/iptables/iptables/0005-nft-ruleparse-Add-missing-braces-around-ternary.patch diff --git a/meta/recipes-extended/iptables/iptables/0005-nft-ruleparse-Add-missing-braces-around-ternary.patch b/meta/recipes-extended/iptables/iptables/0005-nft-ruleparse-Add-missing-braces-around-ternary.patch new file mode 100644 index 0000000000..4cbc8bdaf4 --- /dev/null +++ b/meta/recipes-extended/iptables/iptables/0005-nft-ruleparse-Add-missing-braces-around-ternary.patch @@ -0,0 +1,37 @@ +From 2026b08bce7fe87b5964f7912e1eef30f04922c1 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Fri, 26 Jan 2024 18:43:10 +0100 +Subject: [PATCH] nft: ruleparse: Add missing braces around ternary + +The expression evaluated the sum before the ternay, consequently not +adding target->size if tgsize was zero. + +Identified by ASAN for a simple rule using standard target: +| # ebtables -A INPUT -s de:ad:be:ef:0:00 -j RETURN +| # ebtables -D INPUT -s de:ad:be:ef:0:00 -j RETURN +| ================================================================= +| ==18925==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000000120 at pc 0x7f627a4c75c5 bp 0x7ffe882b5180 sp 0x7ffe882b4928 +| READ of size 8 at 0x603000000120 thread T0 +| [...] + +Upstream-Status: Backport [2026b08bce7fe87b5964f7912e1eef30f04922c1] + +Fixes: 2a6eee89083c8 ("nft-ruleparse: Introduce nft_create_target()") +Signed-off-by: Phil Sutter +--- + iptables/nft-ruleparse.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iptables/nft-ruleparse.c b/iptables/nft-ruleparse.c +index 0bbdf44faf..3b1cbe4fa1 100644 +--- a/iptables/nft-ruleparse.c ++++ b/iptables/nft-ruleparse.c +@@ -94,7 +94,7 @@ __nft_create_target(struct nft_xt_ctx *ctx, const char *name, size_t tgsize) + if (!target) + return NULL; + +- size = XT_ALIGN(sizeof(*target->t)) + tgsize ?: target->size; ++ size = XT_ALIGN(sizeof(*target->t)) + (tgsize ?: target->size); + + target->t = xtables_calloc(1, size); + target->t->u.target_size = size; diff --git a/meta/recipes-extended/iptables/iptables_1.8.10.bb b/meta/recipes-extended/iptables/iptables_1.8.10.bb index 0070264844..f1ee1efe28 100644 --- a/meta/recipes-extended/iptables/iptables_1.8.10.bb +++ b/meta/recipes-extended/iptables/iptables_1.8.10.bb @@ -16,6 +16,7 @@ SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.xz \ file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \ file://0002-iptables-xshared.h-add-missing-sys.types.h-include.patch \ file://0004-configure.ac-only-check-conntrack-when-libnfnetlink-.patch \ + file://0005-nft-ruleparse-Add-missing-braces-around-ternary.patch \ " SRC_URI[sha256sum] = "5cc255c189356e317d070755ce9371eb63a1b783c34498fb8c30264f3cc59c9c" From patchwork Sun Aug 4 17:09:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47269 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26EACC52D71 for ; Sun, 4 Aug 2024 17:09:52 +0000 (UTC) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mx.groups.io with SMTP id smtpd.web11.30104.1722791387722638965 for ; Sun, 04 Aug 2024 10:09:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=u4gLyv2e; spf=softfail (domain: sakoman.com, ip: 209.85.210.177, mailfrom: steve@sakoman.com) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-70f5ef740b7so5375953b3a.2 for ; Sun, 04 Aug 2024 10:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791387; x=1723396187; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=o3rxRmSt7FAFexg+FxWx4LzHIlLTt0s+jJBjPeCt24Q=; b=u4gLyv2eGhj3302VVRD9TSE5Cb/0tXgRluJBAoxHUmmuIjlhe5MCo2FUu79ZVQA4JJ v7lC4srJa6tgOBYBPiIiTNsULEbazxruEWMuCDtDOODMj7XMFf3oz08QqRnnktZnzgQP WNIKNfFviacg7Fn4vzn5QnEhm0EnlQiMgXzFd9l0P9m33jOvweVdoeNANL6kDkOo5fQO pVsmxSf8m8/yDroVrGPoLnk/8dnGKPKaczInj2va7YxPSWQk7lISRpfLswEtLAztbe2m JUo36pnngjyzlWcrZlrd+J6ZrAie2JX1nSMTcFXqMdg4gHz3Qg57zYTzsWitcuFqS0fg 0JFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791387; x=1723396187; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o3rxRmSt7FAFexg+FxWx4LzHIlLTt0s+jJBjPeCt24Q=; b=UW5yhA3uAilgQCchbWOUw/oMW2ICPVi8ssKKPvoQta+HHxWSqbtyfgg+lt8BoaNIkx iTQaew0RCTWIE8xwukfrZt3BKREGGztEwp7SgqV02omdP3ZnLhdY4c/R+pxw32GedCwW zxu6va7FCxQva2dJdIsM0lgg9ZnFLhJQ2U9LGmreI3mYv2V520V+XKKbUVcUuihSD+aU ygkPS3hPVrZLvm0G5KP8AeLFnN8POxHECNEqoqZfeMmNNp+lPoq+tFptL1Y93wdQsQmP iwLENM2VY9pZzaG8QyH+d86sASTezO/PUl7q8CfIWxWvSA00r6o3NwJdicyitiX6gIfj 3JEg== X-Gm-Message-State: AOJu0YxI5MbEhsSqEZx3++I/vmkQYBLQCRPmzefdVuqIw6LL5IGEKNFz VP08LZYcTo+0ArZnqTfoAj971NmXy3DuQTYZZOhGCMHsez8dOStIm61E7tZEzmzTt749UBYQA49 q5FMqvA== X-Google-Smtp-Source: AGHT+IE/2Orawekv/OLclMxR1xQeg2pDmCGkQaT62E9syzgs40fgcedWytqnEpEvQa0A6SRlXquPlQ== X-Received: by 2002:a05:6a21:7896:b0:1c4:818c:299d with SMTP id adf61e73a8af0-1c699554699mr14458207637.11.1722791386965; Sun, 04 Aug 2024 10:09:46 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:46 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 15/18] gpgme: move gpgme-tool to own sub-package Date: Sun, 4 Aug 2024 10:09:18 -0700 Message-Id: <09fe1a471c570c09e8219c6cc57eb5252a5caa54.1722790925.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202974 From: Patrick Wicki The gpgme-tool binary is licensed GPL-3.0-or-later. Split it out into its own package that can be opted out of. Signed-off-by: Patrick Wicki Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit bbcd56bace90f4a148960a7108dc8d0e6c364903) Signed-off-by: Steve Sakoman --- meta/recipes-support/gpgme/gpgme_1.23.2.bb | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/meta/recipes-support/gpgme/gpgme_1.23.2.bb b/meta/recipes-support/gpgme/gpgme_1.23.2.bb index d8807b3af2..55f164e4a9 100644 --- a/meta/recipes-support/gpgme/gpgme_1.23.2.bb +++ b/meta/recipes-support/gpgme/gpgme_1.23.2.bb @@ -3,11 +3,18 @@ DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to G HOMEPAGE = "http://www.gnupg.org/gpgme.html" BUGTRACKER = "https://bugs.g10code.com/gnupg/index" -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & GPL-3.0-or-later" +LICENSE:${PN} = "GPL-2.0-or-later & LGPL-2.1-or-later" +LICENSE:${PN}-cpp = "GPL-2.0-or-later & LGPL-2.1-or-later" +LICENSE:${PN}-tool = "GPL-3.0-or-later" +LICENSE:python3-gpg = "GPL-2.0-or-later & LGPL-2.1-or-later" + LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \ file://src/gpgme.h.in;endline=23;md5=2f0bf06d1c7dcb28532a9d0f94a7ca1d \ - file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d" + file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d \ + file://src/gpgme-tool.c;endline=21;md5=66c5381e0e05475792e24982d15e7ce8 \ + " UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \ @@ -33,6 +40,8 @@ RDEPENDS:${PN}-cpp += "libstdc++" RDEPENDS:python3-gpg += "python3-unixadmin" +RRECOMMENDS:${PN} += "${PN}-tool" + BINCONFIG = "${bindir}/gpgme-config" # Default in configure.ac: "cl cpp python qt" @@ -61,9 +70,10 @@ export PKG_CONFIG='pkg-config' BBCLASSEXTEND = "native nativesdk" -PACKAGES =+ "${PN}-cpp python3-gpg" +PACKAGES =+ "${PN}-cpp ${PN}-tool python3-gpg" FILES:${PN}-cpp = "${libdir}/libgpgmepp.so.*" +FILES:${PN}-tool = "${bindir}/gpgme-tool" FILES:python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*" FILES:${PN}-dev += "${datadir}/common-lisp/source/gpgme/*" From patchwork Sun Aug 4 17:09:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47266 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D157C52D6D for ; Sun, 4 Aug 2024 17:09:52 +0000 (UTC) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mx.groups.io with SMTP id smtpd.web11.30105.1722791389249906443 for ; Sun, 04 Aug 2024 10:09:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=RNAVTaRP; spf=softfail (domain: sakoman.com, ip: 209.85.210.179, mailfrom: steve@sakoman.com) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-70d2d7e692eso7675954b3a.0 for ; Sun, 04 Aug 2024 10:09:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791388; x=1723396188; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=fF/5i4Eqp9IwB3eLg6KFqe0Ni0czaNQYox8VOr9AgFE=; b=RNAVTaRP3l6fs4EmXgdBCatGKJZTI+BDA996rxk+i8ATJenyU39R3ShyTRfnepALRm azQZg8gMQc/96XTz3UQYLaMbSCYGGCeMxXfGqZZ2yb6lFbY92cjwevx6Dxep3HBVSpYc lg3Ip4RAsC+5GnkZsIJ9NDA/Gt0sUP+Zavrgg4j+IRPrXBJB5S7uSqEcenUXfkazI2aY H+L/vWQi6JyNa44uA5qH8B0mgRDjHtpuquNs6eyJ1E5GBQqgsPOse18sqKe9DgxKwtok ln5/BeL/H0W6CZ+4yXUYoX69/XrKNyd/sO3iLN1F3p0rqwBtm0Hi0IBl73smvy1uNFdQ mQMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791388; x=1723396188; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fF/5i4Eqp9IwB3eLg6KFqe0Ni0czaNQYox8VOr9AgFE=; b=pDeoGp4aY9rL9x0tVXPDeKuQAgZZnX86z8FUpcIaoLtyrL87/uq66WlFa6Vh1fLwfR ndEcOFgngd7GnzEuRb/tWIis8wO/QCL595TetDbypMbo1zPaFqPy42FXnLyVhDl6CZr0 n/2of77gjZx8N6zNgUN98z4ksCEWZyorJB2V4Ul4jo6qT6IKT04EzXkdm4GJvvgz05Qh dTYnFvyM+aB6sF07CsUGK9mM5m2tr4QsdwWgBQMfic0mcHUHKD0AkZzVDb3mNyAPrCVS g8E3G4TxtivyfakaQYVsWgDpXS4pDUwoTXiKK/OpLz2KXY3/GpFZ9itTflF4+ZpP2HwX OUiA== X-Gm-Message-State: AOJu0YwkPoWF9llTOCR5p3IQrByqp5fzu5Rm/8nP3SWzVDGhJkqLBG2P CAAFnN7nyOtOO/jQ88UgT7ADLP7en4EtUzzrL2Pi8DLwwnIPngoxYGj28BOoPOuUPoyc2I+gaFO 2GjfqLQ== X-Google-Smtp-Source: AGHT+IEmJfHvl8wNqpanM+0cQZRbX9ta9cg5IR5iuwHMg45Ee1qalj64Oub6K18GQZ0FoE8Gb4RCXw== X-Received: by 2002:a05:6a00:a16:b0:70d:87e0:9e7 with SMTP id d2e1a72fcca58-7106d0843cemr9031383b3a.25.1722791388559; Sun, 04 Aug 2024 10:09:48 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:48 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 16/18] rt-tests: rt_bmark.py: fix TypeError Date: Sun, 4 Aug 2024 10:09:19 -0700 Message-Id: <9563027c35a4b1961a83100e22d4ea4430abd8b9.1722790925.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202975 From: Changqing Li Fix following error: File "/usr/lib64/rt-tests/ptest/./rt_bmark.py", line 287, in run_cyclictest_once m = rex.search(line) ^^^^^^^^^^^^^^^^ TypeError: cannot use a string pattern on a bytes-like object Signed-off-by: Changqing Li Signed-off-by: Richard Purdie (cherry picked from commit c5108da4009ccd3dfc92632171d6bc4dae4507db) Signed-off-by: Steve Sakoman --- meta/recipes-rt/rt-tests/files/rt_bmark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-rt/rt-tests/files/rt_bmark.py b/meta/recipes-rt/rt-tests/files/rt_bmark.py index 2a4eed412f..5d22623656 100755 --- a/meta/recipes-rt/rt-tests/files/rt_bmark.py +++ b/meta/recipes-rt/rt-tests/files/rt_bmark.py @@ -284,7 +284,7 @@ def run_cyclictest_once(): avg_cnt = 0 for line in res.splitlines(): - m = rex.search(line) + m = rex.search(line.decode('utf-8')) if m is not None: minlist.append(int(m.group(2))) maxlist.append(int(m.group(4))) From patchwork Sun Aug 4 17:09:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47267 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E1A1C3DA64 for ; Sun, 4 Aug 2024 17:09:52 +0000 (UTC) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mx.groups.io with SMTP id smtpd.web11.30106.1722791390548107461 for ; Sun, 04 Aug 2024 10:09:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=ETSQUmmt; spf=softfail (domain: sakoman.com, ip: 209.85.210.170, mailfrom: steve@sakoman.com) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-70d18112b60so3721217b3a.1 for ; Sun, 04 Aug 2024 10:09:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791390; x=1723396190; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bI4DExMJ8ECT+RFP59k8ntZFnMiSpAjE1q2JwdkwUKI=; b=ETSQUmmtXKhcBIz0xk1ztvZ4jb/HY3dcUgwwgqogovpE44LwPhIEVZ87LUawCgmOZj Knbu45io45Ohty/Txs5jyYAML5tdh3i90RMUVKSTH3nUXYl4m3efj8Yj6YwUa8uwE6r2 YR+Gd1pSXvhfWCH9QaTSuebTaYpydA178a8uqrWgdgKW3qR9HVdYwqi1uwnSe1KQuQVq IVSoPWuA6w2jl/qLBMxMn3v36Pw4IfD0axB+JeXmMQYDtiDhTaXsdQnIzGmSo9SagDLV IEdSyn8k/BnmmhM1Y6VZAHVBfAFVEhqsp3TSWYOqfo1Vkzya2hgGHlK9IzJfmr4UP0ZL P90Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791390; x=1723396190; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bI4DExMJ8ECT+RFP59k8ntZFnMiSpAjE1q2JwdkwUKI=; b=cu9CFJjt9nioQxPag8GQvQOxoNJX9q9R7mnRBAoI9kMO4Rx8UXHnMB1l2uF6w5RiU4 kKj1GCwxQP6ht57uHVgg9KIivor7c7tHSwtoBjLa3c5G0XvMwf+2CEoAcSZ3ZHkl9pX1 pwNWTJaUr+haPhWKnnBz8XYsWmd1KDnL/88BFsmERYO4RNf0Nhuq8Wkyeb+DIGjNk8cr +3Z2+R6qw8vRD4ldOI0tmtlpvqTrLC9+Hx7muEyeiWDQbkOTINiLQBaaUPlpY1Bw1JOz dLOlAbwbNu+o+wJs1CdJyRqrZw4SBkQFxKxbV3zcDceE+wbNvYiMomwfDHF+rC38vCiF ZADw== X-Gm-Message-State: AOJu0YwuA4TH3h3sCbSXrHsoYmVCE7Vy/XavdRhFxjU+1OwG3H7TMoDs 5Un8PhuvZh5u8ujmaZpoT7h4sCndPSZ6qFQ9jY4NxxDmezha+dQUW+Aj1ApBKReoW8BkUoCH02C SFhR4pg== X-Google-Smtp-Source: AGHT+IE0iK3DBMog/ypZe5BoOOxtBA8TlMjT0Q2qTI8WJDcYHwQj80W6+5cM9mARjfp4DYW5LqDcOg== X-Received: by 2002:a05:6a00:8583:b0:706:5daf:efa5 with SMTP id d2e1a72fcca58-71065e9d3d8mr15875450b3a.9.1722791389876; Sun, 04 Aug 2024 10:09:49 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:49 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 17/18] watchdog: Set watchdog_module in default config Date: Sun, 4 Aug 2024 10:09:20 -0700 Message-Id: <953ea8fa9e3e6a34cbb42e56743fb7c6cf98ff2a.1722790925.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:09:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202976 From: Wadim Egorov systemd started to warn about used but unset environment variables. Let us set watchdog_module=none which is used by the watchdog.service to get rid of the following warning: watchdog.service: Referenced but unset environment variable evaluates to an empty string: watchdog_module Signed-off-by: Wadim Egorov Signed-off-by: Richard Purdie (cherry picked from commit 8f1dc796c7298373e61d806e63bc121128c1c27c) Signed-off-by: Steve Sakoman --- meta/recipes-extended/watchdog/watchdog-config/watchdog.default | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-extended/watchdog/watchdog-config/watchdog.default b/meta/recipes-extended/watchdog/watchdog-config/watchdog.default index 647d5abca5..cee5fdc2b6 100644 --- a/meta/recipes-extended/watchdog/watchdog-config/watchdog.default +++ b/meta/recipes-extended/watchdog/watchdog-config/watchdog.default @@ -1,2 +1,3 @@ # Start watchdog at boot time? 0 or 1 run_watchdog=1 +watchdog_module=none From patchwork Sun Aug 4 17:09:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47273 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47A9AC3DA64 for ; Sun, 4 Aug 2024 17:10:02 +0000 (UTC) Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) by mx.groups.io with SMTP id smtpd.web11.30107.1722791392186569072 for ; Sun, 04 Aug 2024 10:09:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=Y0l1SajM; spf=softfail (domain: sakoman.com, ip: 209.85.166.172, mailfrom: steve@sakoman.com) Received: by mail-il1-f172.google.com with SMTP id e9e14a558f8ab-39b3a4d2577so2616525ab.3 for ; Sun, 04 Aug 2024 10:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1722791391; x=1723396191; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=+ahvXqy0HNoH15xtbQANgs4iLdUYMcGyqYTHI4AvRVQ=; b=Y0l1SajMM4KukBeTeDAWfJqKDxf+bTBLsOZwDjbqFGuVMhUlZgwJYkWJP+uCO3hbRT OpgCFu6R7S2GzQi7tpQgWQuUYoK1gei7mXO3db9Ic8BXQQCDebKckxgW4HARjWLaHoSm suQsGCjv837Tzhz92K+eYeLYyarRUIL6YCCUVKA8LAUbmgPfVY+YJvM1lHotv5ZVLHRq kwvwQh+CZL/WCtFvLdW4GrBYY96ZKw3Yfyq2Ns5xqioc10kSFmskDkg8PJSnzCy87KOQ nAG6xlifTCw+Ukfyts3kU1gbIETL5FJZV21gW8gCYp4GLTs3aVNXnEaCOgvFCFPFCuWG QkNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722791391; x=1723396191; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+ahvXqy0HNoH15xtbQANgs4iLdUYMcGyqYTHI4AvRVQ=; b=YMIRbk5a0soUEmS1q28YLodZDObviyBCQmTzMb89bF9MCeZ5k1r8zzYhK7AkZYde8b VJSJz31lFKu6L8EqJyXCZCjxlcRHylihQv7QbTPUAwAF42Ksiqac6ltNmuBQLZgY3qiM Xp03WysGmX1+gnyQBNnV8LaZrJhgVE0DyAyvjg43YrQ7C+x6pmfbfSyAT8POh0ocd3P6 zGGcJFSQR1Y0L/hNVoXdTPYBX2FmNLtW/pgbDteyvhO/O8Ed7FEWtV8tSD0sSTGLFLxt 3V55g7GyoAG1KPtm8qd5o80mx0kju5vCpNCAsMFMfu7ev96drKdzwPchSExyaA8TTS5U nW7A== X-Gm-Message-State: AOJu0Yy7CP3w07ndZrAl2VgKly4Hyb6HL7gbwnRLZR2Q7iV+yxdzUc3u vEdlVH8mO4aH4IDUeqF57MT3auy6fXJpAmLot6cLSKnHm44daDBxaBs8Y01ULQHuPCJ+UFsWykT wb058fQ== X-Google-Smtp-Source: AGHT+IEStN4cbpS+kt71rp5ZcMvegx80gh9759kW0ZTwn1WmWiKRPcuyrjkLAO7DVItOwkyuwbUvzQ== X-Received: by 2002:a92:d5cb:0:b0:39a:ea86:d615 with SMTP id e9e14a558f8ab-39b1fb6ab14mr111870365ab.6.1722791391191; Sun, 04 Aug 2024 10:09:51 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec269d2sm4293225b3a.17.2024.08.04.10.09.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Aug 2024 10:09:50 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 18/18] rust: Add new varaible RUST_ENABLE_EXTRA_TOOLS Date: Sun, 4 Aug 2024 10:09:21 -0700 Message-Id: <136a25567499191b23a4d000a06bf83a473224ca.1722790925.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 04 Aug 2024 17:10:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202977 From: Ranjitsinh Rathod There is a need to enable some extra tools from the rust for the build and so this new variable will help for that This varaible then we can use during do_configure task to add overall values as per json format in build -> tools Signed-off-by: Ranjitsinh Rathod Signed-off-by: Steve Sakoman --- meta/recipes-devtools/rust/rust_1.75.0.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/rust/rust_1.75.0.bb b/meta/recipes-devtools/rust/rust_1.75.0.bb index 76e1fe2d84..c33f31d261 100644 --- a/meta/recipes-devtools/rust/rust_1.75.0.bb +++ b/meta/recipes-devtools/rust/rust_1.75.0.bb @@ -70,6 +70,10 @@ addtask do_test_compile after do_configure do_rust_gen_targets do_rust_setup_snapshot[dirs] += "${WORKDIR}/rust-snapshot" do_rust_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER" +# there is a need to enable some more rust tools for the project +# We can extend a list of more tools via this variable +RUST_ENABLE_EXTRA_TOOLS ?= "rust-demangler" + python do_configure() { import json import configparser @@ -141,7 +145,7 @@ python do_configure() { config.add_section("build") config.set("build", "submodules", e(False)) config.set("build", "docs", e(False)) - config.set("build", "tools", ["rust-demangler",]) + config.set("build", "tools", e(d.getVar("RUST_ENABLE_EXTRA_TOOLS").split())) rustc = d.expand("${WORKDIR}/rust-snapshot/bin/rustc") config.set("build", "rustc", e(rustc))