From patchwork Mon Dec 13 15:36:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 915 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 0DC79C433F5 for ; Mon, 13 Dec 2021 15:36:46 +0000 (UTC) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mx.groups.io with SMTP id smtpd.web08.12494.1639409805622739720 for ; Mon, 13 Dec 2021 07:36:45 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=bj8kU16G; spf=softfail (domain: sakoman.com, ip: 209.85.214.181, mailfrom: steve@sakoman.com) Received: by mail-pl1-f181.google.com with SMTP id b11so11407569pld.12 for ; Mon, 13 Dec 2021 07:36:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=NZqHBnxjLmaSXbGEVwYftdUC0yinLNXoPPKdV66NP00=; b=bj8kU16GATdeKiJBtBTMxuV3IZog0YF5+6F5F0Js2Ir/4sGvp84n9mPypv4qzqnpZW Cgoo8f7L4jZSlol49biTKNrZf1kCrZNybVqsnao6QOnV8WPzbyt7X4iJvST6UsL4ITVy o48XZtKQcNbqT2qgGkIUH+U/IR0fYL8xfg5109KLIVUdD3daKeNwnpTNvcPX0Wo51Hf+ uH0ZrSpO7sy6wgm9p9xBDDzkZv6J5Yk/aolA7ZmZnvLE2QkoBaaQrEtslPU96PFGcxjk RzDyVd1Ae5P/qHDPFSxbbexPc3nuoQnFtlKVGQTjP1WA6bgusRPO/Z36A95dlL1TnJqS VgOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NZqHBnxjLmaSXbGEVwYftdUC0yinLNXoPPKdV66NP00=; b=Kea/7aBwxa9DxGSficcjGogokjiWtnS3npWZ9HjMNy1vbsJX28rNiCiJ3Y+Ti4kARp +49rPFIpYBmSg6tefhlXXnd82cct39KMJu3d6eQ6CYrOrhYLVDOKzXaChWcFflTVbbpq 9aZqSF+wsFB7qFqRjXhiiu0pZArmER+LVMENHkSD3U3XOkXZRGC7BtOEu1xY27CWcxuh kdtoPWVkkxnoVyoRKvEiUUyRWjuGhX/QUz/qrhR3poct8quVgzjGBdXham2GXlQNy5fc Qc4w0a//l8S2l/sa7nD9wjl29Ba2aaSx1uvw7dab5qhFbTXrGDK3oAUSCix5w7l5Dar5 yiJg== X-Gm-Message-State: AOAM53399Pi8i/Mh3BJ0zUKKT4hF29W7wTve96Fa1uO7p7GhF8ug3q2w s7vFXCT9wRwLbIHT2aTczhDMm8/Ap+xLRaSg X-Google-Smtp-Source: ABdhPJxvvDFhoHhwXJLu5PkKW1CCmkbOsnajHE8bLALwjC8m6ihtHHaeWd/YEw4HGgysYq3/zd5Pfw== X-Received: by 2002:a17:90b:3b8c:: with SMTP id pc12mr44746854pjb.9.1639409804453; Mon, 13 Dec 2021 07:36:44 -0800 (PST) Received: from hexa.router0800d9.com (rrcs-66-91-142-162.west.biz.rr.com. [66.91.142.162]) by smtp.gmail.com with ESMTPSA id y28sm12850297pfa.208.2021.12.13.07.36.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 07:36:43 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 01/10] cve-extra-exclusions: add db CVEs to exclusion list Date: Mon, 13 Dec 2021 05:36:19 -1000 Message-Id: <15ccac9307a8a3a69ea7e9e611688dbb63df32aa.1639409496.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.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 ; Mon, 13 Dec 2021 15:36:46 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/159644 Since Oracle relicensed bdb, the open source community is slowly but surely replacing bdb with supported and open source friendly alternatives. As a result these CVEs are unlikely to ever be fixed. Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie (cherry picked from commit 679fc70f907fb221f4541ebf30c1610e937209b7) Signed-off-by: Steve Sakoman --- meta/conf/distro/include/cve-extra-exclusions.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meta/conf/distro/include/cve-extra-exclusions.inc b/meta/conf/distro/include/cve-extra-exclusions.inc index a6f52b5de7..e02a4d1fde 100644 --- a/meta/conf/distro/include/cve-extra-exclusions.inc +++ b/meta/conf/distro/include/cve-extra-exclusions.inc @@ -44,7 +44,14 @@ CVE_CHECK_WHITELIST += "CVE-2010-4756" # exposing this interface in an exploitable way CVE_CHECK_WHITELIST += "CVE-2020-29509 CVE-2020-29511" - +# db +# Since Oracle relicensed bdb, the open source community is slowly but surely replacing bdb with +# supported and open source friendly alternatives. As a result these CVEs are unlikely to ever be fixed. +CVE_CHECK_WHITELIST += "CVE-2015-2583 CVE-2015-2624 CVE-2015-2626 CVE-2015-2640 CVE-2015-2654 \ +CVE-2015-2656 CVE-2015-4754 CVE-2015-4764 CVE-2015-4774 CVE-2015-4775 CVE-2015-4776 CVE-2015-4777 \ +CVE-2015-4778 CVE-2015-4779 CVE-2015-4780 CVE-2015-4781 CVE-2015-4782 CVE-2015-4783 CVE-2015-4784 \ +CVE-2015-4785 CVE-2015-4786 CVE-2015-4787 CVE-2015-4788 CVE-2015-4789 CVE-2015-4790 CVE-2016-0682 \ +CVE-2016-0689 CVE-2016-0692 CVE-2016-0694 CVE-2016-3418 CVE-2020-2981" #### CPE update pending #### From patchwork Mon Dec 13 15:36:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 916 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 14746C433EF for ; Mon, 13 Dec 2021 15:36:50 +0000 (UTC) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mx.groups.io with SMTP id smtpd.web10.12588.1639409809236792676 for ; Mon, 13 Dec 2021 07:36:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=7h/vgRKX; spf=softfail (domain: sakoman.com, ip: 209.85.216.53, mailfrom: steve@sakoman.com) Received: by mail-pj1-f53.google.com with SMTP id cq22-20020a17090af99600b001a9550a17a5so14923124pjb.2 for ; Mon, 13 Dec 2021 07:36:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=iXaIuARoQBDLiuryf4la2BFEmhQ2cV9W2bkhov3AiyQ=; b=7h/vgRKXw4XzitPXjm6/Fajx8bsQN4dPF/LRti8/ITUzZ7/1dHiKkNNZ8GxM4zdBUq zi5/z2vPB4Ic7IGRnULFj6H5xyXTUWxVKcGaocRC3ZKhXBHikI3LLJtDTVwedw3WGJ9y /Gib21em8L5R0qsaZKYGU6BlLNNWiZnjSFm/VggZ2SCx5LacOBezxhj40gA5THz4/dC8 a2eY0Yxk/mIxL8bsoyxDclsGt4I2ZcasDLp9v8DvydwITwlrfonNH2xtEbisgA2Fpcb9 aUESUABfZoD9m3ppPQ636OHYEXm6lx8UNiOuUXHzpj3/9vWfecczo2f0CjxzYips4duZ 5H7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iXaIuARoQBDLiuryf4la2BFEmhQ2cV9W2bkhov3AiyQ=; b=50Zs104/30l0RQY0AtkvYF7ByGf13yJ2Jwk7096EMDWsKX4KPR8rm8FvF0M9gpNwXV CUO919C7jbxqSqY3GwoC+uLlRRikJ1Zr/XKyn0S0LAtg4CsPV4gvvi3zHtjYLiD75Glc huxlupeLU2FXUpTwrHD95Mwl0KD19TaVyqEh/ect8rdUDTvDFOgZ9CxdrIcl7N9VAUxK 6mUSrY7daBehi/kOvaBwd0OFEO5lGdSV9dV0yUTN203rkF9gIsmIiqejgl2vofbqq/2X K+/5/6cpfXZO2hQxqkzDEZgoz37b1P3AIPA537rFZ2eDsVabdSPvsTx/635Rut7O8MMM /srg== X-Gm-Message-State: AOAM532DJhiQuSIZwqXjCwpXophHsHE1PpNd3VxImqy/DiMBE22R05VY DSy4icOZF8B07PoR6IvBBPXrwKvNyk7Ta06P X-Google-Smtp-Source: ABdhPJx/fZaLYVbQsr+3Pe9mrAeKA/jbX5bfkQ3nm5b4vKJhzdQqavm9eUQM43nMYtorClvwccllkg== X-Received: by 2002:a17:902:eec5:b0:143:982a:85c with SMTP id h5-20020a170902eec500b00143982a085cmr95669044plb.66.1639409807642; Mon, 13 Dec 2021 07:36:47 -0800 (PST) Received: from hexa.router0800d9.com (rrcs-66-91-142-162.west.biz.rr.com. [66.91.142.162]) by smtp.gmail.com with ESMTPSA id y28sm12850297pfa.208.2021.12.13.07.36.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 07:36:46 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 02/10] libgcrypt: solve CVE-2021-33560 and CVE-2021-40528 Date: Mon, 13 Dec 2021 05:36:20 -1000 Message-Id: <0ce5c68933b52d2cfe9eea967d24d57ac82250c3.1639409496.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.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 ; Mon, 13 Dec 2021 15:36:50 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/159645 From: Marta Rybczynska This change fixes patches for two issues reported in a research paper [1]: a side channel attack (*) and a cross-configuration attack (**). In this commit we add a fix for (*) that wasn't marked as a CVE initially upstream. A fix of (**) previosly available in OE backports is in fact fixing CVE-2021-40528, not CVE-2021-33560 as marked in the commit message. We commit the accual fix for CVE-2021-33560 and rename the existing fix with the correct CVE-2021-40528. For details of the mismatch and the timeline see [2] (fix of the documentation) and [3] (the related ticket upstream). [1] https://eprint.iacr.org/2021/923.pdf [2] https://dev.gnupg.org/rCb118681ebc4c9ea4b9da79b0f9541405a64f4c13 [3] https://dev.gnupg.org/T5328#149606 Signed-off-by: Marta Rybczynska Signed-off-by: Steve Sakoman --- .../libgcrypt/files/CVE-2021-33560.patch | 138 +++++++----------- .../libgcrypt/files/CVE-2021-40528.patch | 109 ++++++++++++++ .../libgcrypt/libgcrypt_1.8.5.bb | 1 + 3 files changed, 163 insertions(+), 85 deletions(-) create mode 100644 meta/recipes-support/libgcrypt/files/CVE-2021-40528.patch diff --git a/meta/recipes-support/libgcrypt/files/CVE-2021-33560.patch b/meta/recipes-support/libgcrypt/files/CVE-2021-33560.patch index c0d00485e6..bf26486d8b 100644 --- a/meta/recipes-support/libgcrypt/files/CVE-2021-33560.patch +++ b/meta/recipes-support/libgcrypt/files/CVE-2021-33560.patch @@ -1,109 +1,77 @@ -From 707c3c5c511ee70ad0e39ec613471f665305fbea Mon Sep 17 00:00:00 2001 +From e8b7f10be275bcedb5fc05ed4837a89bfd605c61 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka -Date: Fri, 21 May 2021 11:15:07 +0900 -Subject: [PATCH] cipher: Fix ElGamal encryption for other implementations. +Date: Tue, 13 Apr 2021 10:00:00 +0900 +Subject: [PATCH] cipher: Hardening ElGamal by introducing exponent blinding + too. -* cipher/elgamal.c (gen_k): Remove support of smaller K. -(do_encrypt): Never use smaller K. -(sign): Folllow the change of gen_k. +* cipher/elgamal.c (do_encrypt): Also do exponent blinding. -- -Cherry-pick master commit of: - 632d80ef30e13de6926d503aa697f92b5dbfbc5e +Base blinding had been introduced with USE_BLINDING. This patch add +exponent blinding as well to mitigate side-channel attack on mpi_powm. -This change basically reverts encryption changes in two commits: - - 74386120dad6b3da62db37f7044267c8ef34689b - 78531373a342aeb847950f404343a05e36022065 - -Use of smaller K for ephemeral key in ElGamal encryption is only good, -when we can guarantee that recipient's key is generated by our -implementation (or compatible). - -For detail, please see: - - Luca De Feo, Bertram Poettering, Alessandro Sorniotti, - "On the (in)security of ElGamal in OpenPGP"; - in the proceedings of CCS'2021. - -CVE-id: CVE-2021-33560 GnuPG-bug-id: 5328 -Suggested-by: Luca De Feo, Bertram Poettering, Alessandro Sorniotti Signed-off-by: NIIBE Yutaka Upstream-Status: Backport CVE: CVE-2021-33560 -Signed-off-by: Armin Kuster +Signed-off-by: Marta Rybczynska --- - cipher/elgamal.c | 24 ++++++------------------ - 1 file changed, 6 insertions(+), 18 deletions(-) + cipher/elgamal.c | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/cipher/elgamal.c b/cipher/elgamal.c -index 4eb52d62..ae7a631e 100644 +index 4eb52d62..9835122f 100644 --- a/cipher/elgamal.c +++ b/cipher/elgamal.c -@@ -66,7 +66,7 @@ static const char *elg_names[] = - +@@ -522,8 +522,9 @@ do_encrypt(gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input, ELG_public_key *pkey ) + static void + decrypt (gcry_mpi_t output, gcry_mpi_t a, gcry_mpi_t b, ELG_secret_key *skey ) + { +- gcry_mpi_t t1, t2, r; ++ gcry_mpi_t t1, t2, r, r1, h; + unsigned int nbits = mpi_get_nbits (skey->p); ++ gcry_mpi_t x_blind; - static int test_keys (ELG_secret_key *sk, unsigned int nbits, int nodie); --static gcry_mpi_t gen_k (gcry_mpi_t p, int small_k); -+static gcry_mpi_t gen_k (gcry_mpi_t p); - static gcry_err_code_t generate (ELG_secret_key *sk, unsigned nbits, - gcry_mpi_t **factors); - static int check_secret_key (ELG_secret_key *sk); -@@ -189,11 +189,10 @@ test_keys ( ELG_secret_key *sk, unsigned int nbits, int nodie ) + mpi_normalize (a); + mpi_normalize (b); +@@ -534,20 +535,33 @@ decrypt (gcry_mpi_t output, gcry_mpi_t a, gcry_mpi_t b, ELG_secret_key *skey ) - /**************** - * Generate a random secret exponent k from prime p, so that k is -- * relatively prime to p-1. With SMALL_K set, k will be selected for -- * better encryption performance - this must never be used signing! -+ * relatively prime to p-1. - */ - static gcry_mpi_t --gen_k( gcry_mpi_t p, int small_k ) -+gen_k( gcry_mpi_t p ) - { - gcry_mpi_t k = mpi_alloc_secure( 0 ); - gcry_mpi_t temp = mpi_alloc( mpi_get_nlimbs(p) ); -@@ -202,18 +201,7 @@ gen_k( gcry_mpi_t p, int small_k ) - unsigned int nbits, nbytes; - char *rndbuf = NULL; + t2 = mpi_snew (nbits); + r = mpi_new (nbits); ++ r1 = mpi_new (nbits); ++ h = mpi_new (nbits); ++ x_blind = mpi_snew (nbits); -- if (small_k) -- { -- /* Using a k much lesser than p is sufficient for encryption and -- * it greatly improves the encryption performance. We use -- * Wiener's table and add a large safety margin. */ -- nbits = wiener_map( orig_nbits ) * 3 / 2; -- if( nbits >= orig_nbits ) -- BUG(); -- } -- else -- nbits = orig_nbits; -- -+ nbits = orig_nbits; + /* We need a random number of about the prime size. The random + number merely needs to be unpredictable; thus we use level 0. */ + _gcry_mpi_randomize (r, nbits, GCRY_WEAK_RANDOM); - nbytes = (nbits+7)/8; - if( DBG_CIPHER ) -@@ -492,7 +480,7 @@ do_encrypt(gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input, ELG_public_key *pkey ) - * error code. - */ ++ /* Also, exponent blinding: x_blind = x + (p-1)*r1 */ ++ _gcry_mpi_randomize (r1, nbits, GCRY_WEAK_RANDOM); ++ mpi_set_highbit (r1, nbits - 1); ++ mpi_sub_ui (h, skey->p, 1); ++ mpi_mul (x_blind, h, r1); ++ mpi_add (x_blind, skey->x, x_blind); ++ + /* t1 = r^x mod p */ +- mpi_powm (t1, r, skey->x, skey->p); ++ mpi_powm (t1, r, x_blind, skey->p); + /* t2 = (a * r)^-x mod p */ + mpi_mulm (t2, a, r, skey->p); +- mpi_powm (t2, t2, skey->x, skey->p); ++ mpi_powm (t2, t2, x_blind, skey->p); + mpi_invm (t2, t2, skey->p); + /* t1 = (t1 * t2) mod p*/ + mpi_mulm (t1, t1, t2, skey->p); -- k = gen_k( pkey->p, 1 ); -+ k = gen_k( pkey->p ); - mpi_powm (a, pkey->g, k, pkey->p); ++ mpi_free (x_blind); ++ mpi_free (h); ++ mpi_free (r1); + mpi_free (r); + mpi_free (t2); - /* b = (y^k * input) mod p -@@ -594,7 +582,7 @@ sign(gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input, ELG_secret_key *skey ) - * - */ - mpi_sub_ui(p_1, p_1, 1); -- k = gen_k( skey->p, 0 /* no small K ! */ ); -+ k = gen_k( skey->p ); - mpi_powm( a, skey->g, k, skey->p ); - mpi_mul(t, skey->x, a ); - mpi_subm(t, input, t, p_1 ); -- -2.30.2 +2.11.0 diff --git a/meta/recipes-support/libgcrypt/files/CVE-2021-40528.patch b/meta/recipes-support/libgcrypt/files/CVE-2021-40528.patch new file mode 100644 index 0000000000..b3a18bc5aa --- /dev/null +++ b/meta/recipes-support/libgcrypt/files/CVE-2021-40528.patch @@ -0,0 +1,109 @@ +From 707c3c5c511ee70ad0e39ec613471f665305fbea Mon Sep 17 00:00:00 2001 +From: NIIBE Yutaka +Date: Fri, 21 May 2021 11:15:07 +0900 +Subject: [PATCH] cipher: Fix ElGamal encryption for other implementations. + +* cipher/elgamal.c (gen_k): Remove support of smaller K. +(do_encrypt): Never use smaller K. +(sign): Folllow the change of gen_k. + +-- + +Cherry-pick master commit of: + 632d80ef30e13de6926d503aa697f92b5dbfbc5e + +This change basically reverts encryption changes in two commits: + + 74386120dad6b3da62db37f7044267c8ef34689b + 78531373a342aeb847950f404343a05e36022065 + +Use of smaller K for ephemeral key in ElGamal encryption is only good, +when we can guarantee that recipient's key is generated by our +implementation (or compatible). + +For detail, please see: + + Luca De Feo, Bertram Poettering, Alessandro Sorniotti, + "On the (in)security of ElGamal in OpenPGP"; + in the proceedings of CCS'2021. + +CVE-id: CVE-2021-33560 +GnuPG-bug-id: 5328 +Suggested-by: Luca De Feo, Bertram Poettering, Alessandro Sorniotti +Signed-off-by: NIIBE Yutaka + +Upstream-Status: Backport +CVE: CVE-2021-40528 +Signed-off-by: Armin Kuster +--- + cipher/elgamal.c | 24 ++++++------------------ + 1 file changed, 6 insertions(+), 18 deletions(-) + +diff --git a/cipher/elgamal.c b/cipher/elgamal.c +index 4eb52d62..ae7a631e 100644 +--- a/cipher/elgamal.c ++++ b/cipher/elgamal.c +@@ -66,7 +66,7 @@ static const char *elg_names[] = + + + static int test_keys (ELG_secret_key *sk, unsigned int nbits, int nodie); +-static gcry_mpi_t gen_k (gcry_mpi_t p, int small_k); ++static gcry_mpi_t gen_k (gcry_mpi_t p); + static gcry_err_code_t generate (ELG_secret_key *sk, unsigned nbits, + gcry_mpi_t **factors); + static int check_secret_key (ELG_secret_key *sk); +@@ -189,11 +189,10 @@ test_keys ( ELG_secret_key *sk, unsigned int nbits, int nodie ) + + /**************** + * Generate a random secret exponent k from prime p, so that k is +- * relatively prime to p-1. With SMALL_K set, k will be selected for +- * better encryption performance - this must never be used signing! ++ * relatively prime to p-1. + */ + static gcry_mpi_t +-gen_k( gcry_mpi_t p, int small_k ) ++gen_k( gcry_mpi_t p ) + { + gcry_mpi_t k = mpi_alloc_secure( 0 ); + gcry_mpi_t temp = mpi_alloc( mpi_get_nlimbs(p) ); +@@ -202,18 +201,7 @@ gen_k( gcry_mpi_t p, int small_k ) + unsigned int nbits, nbytes; + char *rndbuf = NULL; + +- if (small_k) +- { +- /* Using a k much lesser than p is sufficient for encryption and +- * it greatly improves the encryption performance. We use +- * Wiener's table and add a large safety margin. */ +- nbits = wiener_map( orig_nbits ) * 3 / 2; +- if( nbits >= orig_nbits ) +- BUG(); +- } +- else +- nbits = orig_nbits; +- ++ nbits = orig_nbits; + + nbytes = (nbits+7)/8; + if( DBG_CIPHER ) +@@ -492,7 +480,7 @@ do_encrypt(gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input, ELG_public_key *pkey ) + * error code. + */ + +- k = gen_k( pkey->p, 1 ); ++ k = gen_k( pkey->p ); + mpi_powm (a, pkey->g, k, pkey->p); + + /* b = (y^k * input) mod p +@@ -594,7 +582,7 @@ sign(gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input, ELG_secret_key *skey ) + * + */ + mpi_sub_ui(p_1, p_1, 1); +- k = gen_k( skey->p, 0 /* no small K ! */ ); ++ k = gen_k( skey->p ); + mpi_powm( a, skey->g, k, skey->p ); + mpi_mul(t, skey->x, a ); + mpi_subm(t, input, t, p_1 ); +-- +2.30.2 + diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.8.5.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.8.5.bb index 174b087b24..8045bab9ed 100644 --- a/meta/recipes-support/libgcrypt/libgcrypt_1.8.5.bb +++ b/meta/recipes-support/libgcrypt/libgcrypt_1.8.5.bb @@ -29,6 +29,7 @@ SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \ file://0003-GCM-move-look-up-table-to-.data-section-and-unshare-.patch \ file://determinism.patch \ file://CVE-2021-33560.patch \ + file://CVE-2021-40528.patch \ " SRC_URI[md5sum] = "348cc4601ca34307fc6cd6c945467743" SRC_URI[sha256sum] = "3b4a2a94cb637eff5bdebbcaf46f4d95c4f25206f459809339cdada0eb577ac3" From patchwork Mon Dec 13 15:36:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 917 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 0E50EC433EF for ; Mon, 13 Dec 2021 15:36:54 +0000 (UTC) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mx.groups.io with SMTP id smtpd.web12.12741.1639409813042197896 for ; Mon, 13 Dec 2021 07:36:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=rCWeVSfM; spf=softfail (domain: sakoman.com, ip: 209.85.215.179, mailfrom: steve@sakoman.com) Received: by mail-pg1-f179.google.com with SMTP id 133so14869457pgc.12 for ; Mon, 13 Dec 2021 07:36:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=FytVHk8VpAcU/GVw3boyQH2vw01jEj1PsPXXeSks7OM=; b=rCWeVSfM6CBoymwNuY21vyXXCWZzBt/g7QiLt1quQZ2qQIKnelwnQIVOCmXyxoR4qp OYS+vlBEuORQyNsWN4RLninDcGwSU1lBKo8Gh8OkPtdp5PwiaILU3GVxmGbgX23LIzz5 2bRaWc0gSO04ha9nRRq+meRkviavT+NEco7P6+e9g6Y7srzQ/E+1LMN+xUFkugqYUjBC r8TAkS3RMy48fNUMl6xuZLeXa1aUgiZqmLWj7w4oyZ06RTCKMwea9dd1ynFi86kR5yy6 HYasZ+OCJ84S00jbewbIm30mYS489df4W3PRkeBZq/TUsJMwWwFQ52284xs9myHn/k2H nZPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FytVHk8VpAcU/GVw3boyQH2vw01jEj1PsPXXeSks7OM=; b=emNm5RDCOurEybUJcwVm4lAa/O1Oq2RWEdZzzEGhRG9LhlKR9JOXjq4HC0PED42r0P /UhmLOO30pI2fimJwwaS/kt27uWjBWZoVpII4iRstU5ISkuhMsnmxBnkuzlfPAM6x+Ut PdQWVCktRCLQDxSDApPhKwBremcED6mRTwZU8BKLBZLQ2sItMwd4WTuU8FTuMXHSMg/b Jf4fctopmlI4iXhZdfN5L64t174SNIoo0VH7sVMRIY/xC37tUvlldg/txX75Q00emsf2 TWoX+1cySbDoEcsJ6KionFkBrn42EcqX7VdpuzKZmZyEdB40VMREmmNVExvj2Vs1rERu rKBw== X-Gm-Message-State: AOAM531p4RMyj83tWds6AJXmgJXLqBcqODUiBbnqGh1CxCBqu+WYEGsA CUKturLgx0fO2wb88jXpGPrW0l5H5GVbXg// X-Google-Smtp-Source: ABdhPJx/UTy6EgEd/xrXdYwswrewTvJPFxHtz/o+YXFO5uhwSxX4bCqNj8sahfOK2T+OEygqywM8mg== X-Received: by 2002:a63:c155:: with SMTP id p21mr46755707pgi.156.1639409811988; Mon, 13 Dec 2021 07:36:51 -0800 (PST) Received: from hexa.router0800d9.com (rrcs-66-91-142-162.west.biz.rr.com. [66.91.142.162]) by smtp.gmail.com with ESMTPSA id y28sm12850297pfa.208.2021.12.13.07.36.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 07:36:50 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 03/10] gcc: Add CVE-2021-37322 to the list of CVEs to ignore Date: Mon, 13 Dec 2021 05:36:21 -1000 Message-Id: <71a6d3c31775c6b2db38e194992e0ffce637c827.1639409496.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.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 ; Mon, 13 Dec 2021 15:36:54 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/159646 From: Richard Purdie The CVE applies to binutils 2.26 and not to gcc so ignore there. Signed-off-by: Richard Purdie Signed-off-by: Tim Orling Signed-off-by: Steve Sakoman --- meta/recipes-devtools/gcc/gcc-9.3.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/recipes-devtools/gcc/gcc-9.3.inc b/meta/recipes-devtools/gcc/gcc-9.3.inc index 235576e627..c171f673e9 100644 --- a/meta/recipes-devtools/gcc/gcc-9.3.inc +++ b/meta/recipes-devtools/gcc/gcc-9.3.inc @@ -124,3 +124,6 @@ EXTRA_OECONF_PATHS = "\ --with-sysroot=/not/exist \ --with-build-sysroot=${STAGING_DIR_TARGET} \ " + +# Is a binutils 2.26 issue, not gcc +CVE_CHECK_WHITELIST += "CVE-2021-37322" From patchwork Mon Dec 13 15:36:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 918 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 27A94C433EF for ; Mon, 13 Dec 2021 15:36:57 +0000 (UTC) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mx.groups.io with SMTP id smtpd.web11.12567.1639409816026054582 for ; Mon, 13 Dec 2021 07:36:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=jcakp7dG; spf=softfail (domain: sakoman.com, ip: 209.85.210.178, mailfrom: steve@sakoman.com) Received: by mail-pf1-f178.google.com with SMTP id p13so15274061pfw.2 for ; Mon, 13 Dec 2021 07:36:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ZvHbWp6i92CKpKQzZUlWe1A8a0OYQ/4C9u1IJ9fofKY=; b=jcakp7dGMrBRqE6TwUeIw2B8g+IJ/aTN57FU4N9V1TVJapyDsESq4HPgSbE3QFK7Ym Bw4M/dlVMhOQ4HWel+04uq0S2DPAb7eDlSIWXYEIBZfobreJEvzkKMS/nuM0jkfLVaAz T3Ti3Tv2xY7Aj5tmTUWs2tzxTpYFC7rdSUclBf59DYiqQ8YaL0WISLKZ2/t/C8CC4Vxa RS2h/Fd8M2JUSK6+vjB+XNWk4dFZfY4THEWEmVFfIT9mjyYZ3ZZt43VNtMFYWOiA1Wtk AHLB3kbmsZZa5qWrQ+VlaoWfe8V1xIn4cq0oZUZNNDJ+ugEdLzrMExBO1xsVKv/S990r puTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZvHbWp6i92CKpKQzZUlWe1A8a0OYQ/4C9u1IJ9fofKY=; b=xTVBHfFyDVa867Kq4+ckZ5heVocrtRLh90SlWqRuXxT6q9gQzV+6MZiFxGFDwfuGMe d2K8kuM2uO/6lwoXX3F6WUPpH8iVJLKPrN+GbdF7yG3ZqldKaKISGvfdA8c8ubCtm+f5 H/Zk2yMtJlTfAH2hZVd2WFQMhduhB9Srqbsg/NC696dhS6DQg/yNY1P2n9ee7VH/V9AY OTzOqcA6In+404P9+6u8oIz/Yi1oMGKxZXqU91Bnw1nIoQTL7aGKqyJ39EWpBy1/CbfQ 2auTOwhYbbh99Wee0qZzl0ZqGn4LPgqRFVxpwRnPjjFqr2fFyALtqo4oLmaRUXmtvr+j owTg== X-Gm-Message-State: AOAM530SGQudUCqEKUwHJmIEEjyqMwEEo3z/gHMDpZ99f+iZ2Vd0INct R17KLSkyyH4oNqCPUuYLVB4NShlx7eQarWZb X-Google-Smtp-Source: ABdhPJznkSVHVI17K1OL0o9wW1cTvY/aicYfhyrk6oCT8KPET+xRQU8LdcjLpUEVHxcIPwN8GYR1fQ== X-Received: by 2002:a63:211b:: with SMTP id h27mr53490518pgh.203.1639409814832; Mon, 13 Dec 2021 07:36:54 -0800 (PST) Received: from hexa.router0800d9.com (rrcs-66-91-142-162.west.biz.rr.com. [66.91.142.162]) by smtp.gmail.com with ESMTPSA id y28sm12850297pfa.208.2021.12.13.07.36.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 07:36:54 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 04/10] busybox: Fix multiple security issues in awk Date: Mon, 13 Dec 2021 05:36:22 -1000 Message-Id: <37a92e6d4399cdb36d24b988d77aa41b1e205a90.1639409496.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.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 ; Mon, 13 Dec 2021 15:36:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/159647 From: Sana Kazi CVE-2021-423xx-awk.patch fixes below listed CVEs for busybox: CVE-2021-42378, CVE-2021-42379, CVE-2021-42380, CVE-2021-42381, CVE-2021-42382, CVE-2021-42384, CVE-2021-42385, CVE-2021-42386 Signed-off-by: Sana Kazi Signed-off-by: Ranjitsinh Rathod Signed-off-by: Ranjitsinh Rathod Signed-off-by: Steve Sakoman --- meta/recipes-core/busybox/busybox_1.31.1.bb | 1 + .../busybox/files/CVE-2021-423xx-awk.patch | 215 ++++++++++++++++++ 2 files changed, 216 insertions(+) create mode 100644 meta/recipes-core/busybox/files/CVE-2021-423xx-awk.patch diff --git a/meta/recipes-core/busybox/busybox_1.31.1.bb b/meta/recipes-core/busybox/busybox_1.31.1.bb index 14ac710f3b..38b448b3e1 100644 --- a/meta/recipes-core/busybox/busybox_1.31.1.bb +++ b/meta/recipes-core/busybox/busybox_1.31.1.bb @@ -54,6 +54,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://0001-mktemp-add-tmpdir-option.patch \ file://CVE-2021-42374.patch \ file://CVE-2021-42376.patch \ + file://CVE-2021-423xx-awk.patch \ " SRC_URI_append_libc-musl = " file://musl.cfg " diff --git a/meta/recipes-core/busybox/files/CVE-2021-423xx-awk.patch b/meta/recipes-core/busybox/files/CVE-2021-423xx-awk.patch new file mode 100644 index 0000000000..7e3d47b88c --- /dev/null +++ b/meta/recipes-core/busybox/files/CVE-2021-423xx-awk.patch @@ -0,0 +1,215 @@ +From a21708eb8d07b4a6dbc1d3e4ace4c5721515a84c Mon Sep 17 00:00:00 2001 +From: Sana Kazi +Date: Wed, 8 Dec 2021 12:25:34 +0530 +Subject: [PATCH] busybox: Fix multiple security issues in awk + +Description: fix multiple security issues in awk +Origin: backported awk.c from busybox 1.34.1 + +CVE: CVE-2021-42378 +CVE: CVE-2021-42379 +CVE: CVE-2021-42380 +CVE: CVE-2021-42381 +CVE: CVE-2021-42382 +CVE: CVE-2021-42384 +CVE: CVE-2021-42385 +CVE: CVE-2021-42386 + +Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/busybox/1:1.30.1-6ubuntu3.1/busybox_1.30.1-6ubuntu3.1.debian.tar.xz] + +Comment: Refreshed first hunk and removed few hunks as they are already present in source. + +Signed-off-by: Sana Kazi +Signed-off-by: Ranjitsinh Rathod + +--- + editors/awk.c | 80 ++++++++++++++++++++++++++++++++++++++------------- + 1 file changed, 60 insertions(+), 20 deletions(-) + +diff --git a/editors/awk.c b/editors/awk.c +index d25508e..4e4f282 100644 +--- a/editors/awk.c ++++ b/editors/awk.c +@@ -272,7 +272,8 @@ typedef struct tsplitter_s { + /* if previous token class is CONCAT1 and next is CONCAT2, concatenation */ + /* operator is inserted between them */ + #define TC_CONCAT1 (TC_VARIABLE | TC_ARRTERM | TC_SEQTERM \ +- | TC_STRING | TC_NUMBER | TC_UOPPOST) ++ | TC_STRING | TC_NUMBER | TC_UOPPOST \ ++ | TC_LENGTH) + #define TC_CONCAT2 (TC_OPERAND | TC_UOPPRE) + + #define OF_RES1 0x010000 +@@ -404,7 +405,7 @@ static const char tokenlist[] ALIGN1 = + + #define OC_B OC_BUILTIN + +-static const uint32_t tokeninfo[] = { ++static const uint32_t tokeninfo[] ALIGN4 = { + 0, + 0, + OC_REGEXP, +@@ -1070,8 +1071,10 @@ static uint32_t next_token(uint32_t expected) + const uint32_t *ti; + + if (t_rollback) { ++ debug_printf_parse("%s: using rolled-back token\n", __func__); + t_rollback = FALSE; + } else if (concat_inserted) { ++ debug_printf_parse("%s: using concat-inserted token\n", __func__); + concat_inserted = FALSE; + t_tclass = save_tclass; + t_info = save_info; +@@ -1200,7 +1203,11 @@ static uint32_t next_token(uint32_t expected) + goto readnext; + + /* insert concatenation operator when needed */ +- if ((ltclass & TC_CONCAT1) && (tc & TC_CONCAT2) && (expected & TC_BINOP)) { ++ debug_printf_parse("%s: %x %x %x concat_inserted?\n", __func__, ++ (ltclass & TC_CONCAT1), (tc & TC_CONCAT2), (expected & TC_BINOP)); ++ if ((ltclass & TC_CONCAT1) && (tc & TC_CONCAT2) && (expected & TC_BINOP) ++ && !(ltclass == TC_LENGTH && tc == TC_SEQSTART) /* but not for "length(..." */ ++ ) { + concat_inserted = TRUE; + save_tclass = tc; + save_info = t_info; +@@ -1208,6 +1215,7 @@ static uint32_t next_token(uint32_t expected) + t_info = OC_CONCAT | SS | P(35); + } + ++ debug_printf_parse("%s: t_tclass=tc=%x\n", __func__, t_tclass); + t_tclass = tc; + } + ltclass = t_tclass; +@@ -1218,6 +1226,7 @@ static uint32_t next_token(uint32_t expected) + EMSG_UNEXP_EOS : EMSG_UNEXP_TOKEN); + } + ++ debug_printf_parse("%s: returning, ltclass:%x t_double:%f\n", __func__, ltclass, t_double); + return ltclass; + #undef concat_inserted + #undef save_tclass +@@ -1282,7 +1291,7 @@ static node *parse_expr(uint32_t iexp) + glptr = NULL; + + } else if (tc & (TC_BINOP | TC_UOPPOST)) { +- debug_printf_parse("%s: TC_BINOP | TC_UOPPOST\n", __func__); ++ debug_printf_parse("%s: TC_BINOP | TC_UOPPOST tc:%x\n", __func__, tc); + /* for binary and postfix-unary operators, jump back over + * previous operators with higher priority */ + vn = cn; +@@ -1350,8 +1359,10 @@ static node *parse_expr(uint32_t iexp) + v = cn->l.v = xzalloc(sizeof(var)); + if (tc & TC_NUMBER) + setvar_i(v, t_double); +- else ++ else { + setvar_s(v, t_string); ++ xtc &= ~TC_UOPPOST; /* "str"++ is not allowed */ ++ } + break; + + case TC_REGEXP: +@@ -1387,7 +1398,12 @@ static node *parse_expr(uint32_t iexp) + + case TC_LENGTH: + debug_printf_parse("%s: TC_LENGTH\n", __func__); +- next_token(TC_SEQSTART | TC_OPTERM | TC_GRPTERM); ++ next_token(TC_SEQSTART /* length(...) */ ++ | TC_OPTERM /* length; (or newline)*/ ++ | TC_GRPTERM /* length } */ ++ | TC_BINOPX /* length NUM */ ++ | TC_COMMA /* print length, 1 */ ++ ); + rollback_token(); + if (t_tclass & TC_SEQSTART) { + /* It was a "(" token. Handle just like TC_BUILTIN */ +@@ -1747,12 +1763,34 @@ static void fsrealloc(int size) + nfields = size; + } + ++static int regexec1_nonempty(const regex_t *preg, const char *s, regmatch_t pmatch[]) ++{ ++ int r = regexec(preg, s, 1, pmatch, 0); ++ if (r == 0 && pmatch[0].rm_eo == 0) { ++ /* For example, happens when FS can match ++ * an empty string (awk -F ' *'). Logically, ++ * this should split into one-char fields. ++ * However, gawk 5.0.1 searches for first ++ * _non-empty_ separator string match: ++ */ ++ size_t ofs = 0; ++ do { ++ ofs++; ++ if (!s[ofs]) ++ return REG_NOMATCH; ++ regexec(preg, s + ofs, 1, pmatch, 0); ++ } while (pmatch[0].rm_eo == 0); ++ pmatch[0].rm_so += ofs; ++ pmatch[0].rm_eo += ofs; ++ } ++ return r; ++} ++ + static int awk_split(const char *s, node *spl, char **slist) + { +- int l, n; ++ int n; + char c[4]; + char *s1; +- regmatch_t pmatch[2]; // TODO: why [2]? [1] is enough... + + /* in worst case, each char would be a separate field */ + *slist = s1 = xzalloc(strlen(s) * 2 + 3); +@@ -1769,29 +1807,31 @@ static int awk_split(const char *s, node *spl, char **slist) + return n; /* "": zero fields */ + n++; /* at least one field will be there */ + do { ++ int l; ++ regmatch_t pmatch[2]; // TODO: why [2]? [1] is enough... ++ + l = strcspn(s, c+2); /* len till next NUL or \n */ +- if (regexec(icase ? spl->r.ire : spl->l.re, s, 1, pmatch, 0) == 0 ++ if (regexec1_nonempty(icase ? spl->r.ire : spl->l.re, s, pmatch) == 0 + && pmatch[0].rm_so <= l + ) { ++ /* if (pmatch[0].rm_eo == 0) ... - impossible */ + l = pmatch[0].rm_so; +- if (pmatch[0].rm_eo == 0) { +- l++; +- pmatch[0].rm_eo++; +- } + n++; /* we saw yet another delimiter */ + } else { + pmatch[0].rm_eo = l; + if (s[l]) + pmatch[0].rm_eo++; + } +- memcpy(s1, s, l); +- /* make sure we remove *all* of the separator chars */ +- do { +- s1[l] = '\0'; +- } while (++l < pmatch[0].rm_eo); +- nextword(&s1); ++ s1 = mempcpy(s1, s, l); ++ *s1++ = '\0'; + s += pmatch[0].rm_eo; + } while (*s); ++ ++ /* echo a-- | awk -F-- '{ print NF, length($NF), $NF }' ++ * should print "2 0 ": ++ */ ++ *s1 = '\0'; ++ + return n; + } + if (c[0] == '\0') { /* null split */ +@@ -1995,7 +2035,7 @@ static int ptest(node *pattern) + static int awk_getline(rstream *rsm, var *v) + { + char *b; +- regmatch_t pmatch[2]; ++ regmatch_t pmatch[2]; // TODO: why [2]? [1] is enough... + int size, a, p, pp = 0; + int fd, so, eo, r, rp; + char c, *m, *s; From patchwork Mon Dec 13 15:36:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 919 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 117ADC433EF for ; Mon, 13 Dec 2021 15:37:00 +0000 (UTC) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mx.groups.io with SMTP id smtpd.web11.12569.1639409818669520818 for ; Mon, 13 Dec 2021 07:36:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=ul4bnZdg; spf=softfail (domain: sakoman.com, ip: 209.85.214.170, mailfrom: steve@sakoman.com) Received: by mail-pl1-f170.google.com with SMTP id v19so11427047plo.7 for ; Mon, 13 Dec 2021 07:36:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=luUPVMV8z1CjvEhdgUSGmdmnP5S83cdaIzMuHBKs9LM=; b=ul4bnZdgFkXgLB7/x0L9rD/m5Ul/ujY49vwKBRViC/1C2ERF3ZqD93NxcKzGe5UtnL tcZe9s0YueSYGgq7d9WmkxyC/Sj+GIh2WPzDkQCa/4Kz3sfZCaohDAmv5353mEr0P30i VONm27uelI17C9q+Km+l1aVB5tZbNa73N3Jp9thT/31c4fPv/rzYgR8/6YAQ+mUDp1PX ZRY+GcLgnW3M05dMh9M2iIORs8ykwsparYonuOureJz3GF5DWdMRuZBIpXMUchTUr1s7 FWnKbMRotPtUn3/iOGxN+gwi+m/5SoU3CAQ0qdeT0HsjG7oRFn8DraVEY9izLJ2yrdT4 9FmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=luUPVMV8z1CjvEhdgUSGmdmnP5S83cdaIzMuHBKs9LM=; b=ICyejpYRloFeeC/molQLQt7EFs8wEDcxGV27Yss1m2IoZNdW2fR3HsKfkxIudOnBy1 lIHuIF+bnptGLztCdizRsXa3QAszb0J8UUPqQrhCo+8/DSw3vn8j23mVjpL4RYjcTXWk n9Q1LxJ4cxHF1ApVgj37rk1IR18BeY0d9S66QnUFyEZyrFVd2jMw+mRgcH3u6PEWQqNG JVCOgCXSb5N+303eolcu6bzN9XWNjOK5KtgNQD1h1ldWUhxxcrXfurvSUof4ofvxoGRR GeasbxKnl0sCnVOCEL37C1wpxXO0bwO+D0ee0oQyMBE2W6gCmXTAlJpkH7HLXh/UKcDi 01rw== X-Gm-Message-State: AOAM5327NWDjvquovbe66jlUJpJiyoEZAlUR23ZAs0er8W5bqjt89qA9 RXGMHlyD5QixkHh8NmQxjeVQ791sjSPgtxBA X-Google-Smtp-Source: ABdhPJwbuLb3+XlWhnVrQoEsp0SFKpRDHbSlKpfcgwuvWrutm8rKxHip+7M2JVei/j04PyON+Gt7wQ== X-Received: by 2002:a17:903:1c7:b0:141:e630:130c with SMTP id e7-20020a17090301c700b00141e630130cmr97418239plh.80.1639409817618; Mon, 13 Dec 2021 07:36:57 -0800 (PST) Received: from hexa.router0800d9.com (rrcs-66-91-142-162.west.biz.rr.com. [66.91.142.162]) by smtp.gmail.com with ESMTPSA id y28sm12850297pfa.208.2021.12.13.07.36.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 07:36:56 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 05/10] wic:direct.py: ignore invalid mountpoints during fstab update Date: Mon, 13 Dec 2021 05:36:23 -1000 Message-Id: <3c8e50b073a1505cc3586ca51dfe1e75338feafc.1639409496.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.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 ; Mon, 13 Dec 2021 15:37:00 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/159648 From: Markus Volk wic fstab-update creates invalid entries for partitons that are not supposed to be mounted from userspace eg u-boot partitions. The following lines were added to fstab on a rock-pi-4: /dev/mmcblk1p1 loader1 vfat defaults 0 0 /dev/mmcblk1p2 reserved1 vfat defaults 0 0 /dev/mmcblk1p3 reserved2 vfat defaults 0 0 /dev/mmcblk1p4 loader2 vfat defaults 0 0 /dev/mmcblk1p5 atf vfat defaults 0 0 /dev/mmcblk1p6 /boot vfat defaults 0 0 With this patch only valid entries should be added /dev/mmcblk1p6 /boot vfat defaults 0 0 Signed-off-by: MarkusVolk Signed-off-by: Richard Purdie (cherry picked from commit 7aa678ce804c21dc1dc51b9be442671bc33c4041) Signed-off-by: Steve Sakoman --- scripts/lib/wic/plugins/imager/direct.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index 7e1c1c03ab..2505c13fce 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py @@ -115,7 +115,7 @@ class DirectPlugin(ImagerPlugin): updated = False for part in self.parts: if not part.realnum or not part.mountpoint \ - or part.mountpoint == "/": + or part.mountpoint == "/" or not part.mountpoint.startswith('/'): continue if part.use_uuid: From patchwork Mon Dec 13 15:36:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 14116 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org From: "Steve Sakoman" Subject: [OE-core][dunfell 06/10] lttng-modules: do not search in non-existing folder during install Date: Mon, 13 Dec 2021 05:36:24 -1000 Message-Id: In-Reply-To: References: MIME-Version: 1.0 List-id: To: openembedded-core@lists.openembedded.org From: Andrey Zhizhikin When CONFIG_TRACEPOINTS is not enabled in kernel config - module compilation is skipped, which causes the ${D}/${nonarch_base_libdir} not to be created. This fails later in do_install:append() due to the fact that find command in executed for non-existing folder. Check for folder existence before find command in executed. Signed-off-by: Andrey Zhizhikin Signed-off-by: Richard Purdie (cherry picked from commit de0aa1700ed4e6f04b0a233eb1f6d2ac598e7ed8) Signed-off-by: Aníbal Limón Signed-off-by: Steve Sakoman --- meta/recipes-kernel/lttng/lttng-modules_2.11.6.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.11.6.bb b/meta/recipes-kernel/lttng/lttng-modules_2.11.6.bb index 3fdc8094e9..3145f0298c 100644 --- a/meta/recipes-kernel/lttng/lttng-modules_2.11.6.bb +++ b/meta/recipes-kernel/lttng/lttng-modules_2.11.6.bb @@ -39,7 +39,9 @@ EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'" do_install_append() { # Delete empty directories to avoid QA failures if no modules were built - find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \; + if [ -d ${D}/${nonarch_base_libdir} ]; then + find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \; + fi } python do_package_prepend() { From patchwork Mon Dec 13 15:36:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 920 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 11459C433F5 for ; Mon, 13 Dec 2021 15:37:05 +0000 (UTC) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mx.groups.io with SMTP id smtpd.web12.12749.1639409824290766087 for ; Mon, 13 Dec 2021 07:37:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=YhNTTdFB; spf=softfail (domain: sakoman.com, ip: 209.85.216.46, mailfrom: steve@sakoman.com) Received: by mail-pj1-f46.google.com with SMTP id gx15-20020a17090b124f00b001a695f3734aso13696749pjb.0 for ; Mon, 13 Dec 2021 07:37:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=bvomz37jQg3XD3bvzXpILiCSiulzIdenkKshm21+YI8=; b=YhNTTdFB2BKPVpUmj/zapJP9qM+1xFT8upjZKWANfkYltYzIFgkaN2cPP0iEb0DEyO yUNMRMSew6HCI6XJWqScB5/7WzCmFeizrhMVIOi6OPa7Kbam/WgUvbqFuttgM2DiBpUm tnTw6nyG0SfRwhBybfDctc8TSG1+n3O5Nt38GpoEDSSnIpJMzR9ofNGiFLiF1gTYd+VW nD6DCRICBAapwNnMrruBxWFe4Tkphw4aTBqC8BtBb1wB8KyiANEh6OriHQisQohCQ+GF 0mb1D1aIvzleDS2Wfb0UXnxxvnQ1tCnL/smBGWkvFXbh0mdzElT8tCDkgErPrBHwcUhy T+EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bvomz37jQg3XD3bvzXpILiCSiulzIdenkKshm21+YI8=; b=PvfHeo7gu3PPplyjxWBFna/IKB4z+KR558w1xnCDGuq9tXXeGXjP1DHszoYSpsPUhO ZUp6YA9dRQIM5egefQzlrpWKpbTSoGVgdYKZWcMFDKKlev0N1dED5+b334e9eR9vUsnU UoTQacUyk1rLOvNwH0eXKLQLZlT5bG9pJO4Q41EkXY0be/swS2dUSaZdJxom6v4cuoto /jtMBFNeV3afGNSNPDzT2W0ddukJHt0I/9z3oGckbmcgSGhUaZ5a8ovbMoHvrhE+Mx3f XLX2MWCaFTrZjBPxM1BOvsofTTy4Zc1Q9AnIViLCBDp5QAFi26Vf+FnUp+zNF/P0wH3b wTsQ== X-Gm-Message-State: AOAM532RGd5/LpDDxpdWHBKJNZRZYPrOc31LBk2BX7wdG45kJc+WjOhq CXgJK5ef5l67jmX2dUiZILEv+Za1Dz2KWDV/ X-Google-Smtp-Source: ABdhPJwJpZZIbGpcaIfuNP1Dox56hK+ypO6+i5GEmiFIzeYaszXErZUSBMDQKXTxiteUlbdofzCvPA== X-Received: by 2002:a17:90b:3845:: with SMTP id nl5mr44556506pjb.102.1639409823228; Mon, 13 Dec 2021 07:37:03 -0800 (PST) Received: from hexa.router0800d9.com (rrcs-66-91-142-162.west.biz.rr.com. [66.91.142.162]) by smtp.gmail.com with ESMTPSA id y28sm12850297pfa.208.2021.12.13.07.37.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 07:37:02 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 07/10] runqemu: check the qemu PID has been set before kill()ing it Date: Mon, 13 Dec 2021 05:36:25 -1000 Message-Id: <7f95eb486a2d07cf0c821d5301fd670de34fe2d1.1639409496.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.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 ; Mon, 13 Dec 2021 15:37:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/159650 From: Ross Burton If runqemu is killed, check that we have a valid PID for the qemu before sending a kill() to it. [ YOCTO #14651 ] Signed-off-by: Ross Burton Signed-off-by: Richard Purdie (cherry picked from commit 0f3afbd3a6a6bef668612f818517df7543c0a683) Signed-off-by: Steve Sakoman --- scripts/runqemu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/runqemu b/scripts/runqemu index 10880ba6bb..51607f10e5 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -1516,7 +1516,8 @@ def main(): def sigterm_handler(signum, frame): logger.info("SIGTERM received") - os.kill(config.qemupid, signal.SIGTERM) + if config.qemupid: + os.kill(config.qemupid, signal.SIGTERM) config.cleanup() # Deliberately ignore the return code of 'tput smam'. subprocess.call(["tput", "smam"]) From patchwork Mon Dec 13 15:36:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 921 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 161BDC433F5 for ; Mon, 13 Dec 2021 15:37:08 +0000 (UTC) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mx.groups.io with SMTP id smtpd.web08.12502.1639409827040618486 for ; Mon, 13 Dec 2021 07:37:07 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=kTUoGzBq; spf=softfail (domain: sakoman.com, ip: 209.85.216.52, mailfrom: steve@sakoman.com) Received: by mail-pj1-f52.google.com with SMTP id f18-20020a17090aa79200b001ad9cb23022so13635254pjq.4 for ; Mon, 13 Dec 2021 07:37:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=W5KST1QOknlgRdpk5Dxewss6keYaHyEHBw4cKnKMxcU=; b=kTUoGzBqPrShcqxENUpatE9yvp+3GjtS3jYo1f4sgF0+JxFsIT5VcGoU8XyiyxsgpW bQ6Hdusn+8woY/J/+qGz9RGQRryGmb2E75jxnz9J52PcjbjavpTbLNj/wTcjS6H6KZ3E aGkMESmW7828/J+4le3iBv4BQ8J36LWJtN13S4Ii9YFri56tnV83mBduGDlEb6b9M+pZ NHiS5inUuyA89LJ12siEzu/J1LO/d3xpXvjmD7ZtsNSNVFUeaCErjXP/H4fHAabX+XC8 WVngGGPd378OaGusXnlINZnKbSs+4PcbI+MQ4HCjSMcXYdAfSdxNLEpIUT2CfLGbku4p zZOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W5KST1QOknlgRdpk5Dxewss6keYaHyEHBw4cKnKMxcU=; b=R3qoxQ/SkXoZpW4+bUk560R47+j2m66TuSrbuYWy8SLhSTXJ8cB3L7o9pIVE7ADvzj Gb8gciEA7kYB+bv9TfRwbOgapcuaXJM8SqPBK5mWXzcVclW7b4rn5o9Tg66ApYjKr+bE tx0ARvDjWpY8l9KzsMffbaJjP50Vg1FfS1GOuaBeiLrjGQhQVOlamsPZUl18qs9GAMhj QABSeGMC2fRLSshLTw7Kh0nikWZhPMhf6V7oTrewnjmHM8KUyTav8geR4yRGgz7ZGKf9 GM/KpUbT0TBPRUMIXZFG/YpIR2n7jru0NuzGt5gUpv0yGr25bHzZrVvF4cxXvcpx1vfE WbSQ== X-Gm-Message-State: AOAM533Mi3ubXWt7ZtzwHJ6nsnHcpAT41k4Dxf8e/7d8ELIDzJuud7kJ ogg4UbfMKVljbQn8CJ+AElo23gREJROb3tQQ X-Google-Smtp-Source: ABdhPJzyv+LW9lnJqwe4R5elRZ+aOKS4jRmP0X2yK3HCUmRSZYkCmckJuKg9sfIYmDbLXq++uSMyfA== X-Received: by 2002:a17:90b:4f83:: with SMTP id qe3mr44907125pjb.56.1639409825951; Mon, 13 Dec 2021 07:37:05 -0800 (PST) Received: from hexa.router0800d9.com (rrcs-66-91-142-162.west.biz.rr.com. [66.91.142.162]) by smtp.gmail.com with ESMTPSA id y28sm12850297pfa.208.2021.12.13.07.37.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 07:37:05 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 08/10] recipetool: Set master branch only as fallback Date: Mon, 13 Dec 2021 05:36:26 -1000 Message-Id: <2bc6deb34aee7542d7086c24b166083c562a6a01.1639409496.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.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 ; Mon, 13 Dec 2021 15:37:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/159651 From: Stefan Herbrechtsmeier The commit 'meta/scripts: Manual git url branch additions (dc53fe75cc)' sets the branch= parameter too early to master and thereby breaks the -B/--srcbranch option. ERROR: branch= parameter and -B/--srcbranch option cannot both be specified - use one or the other Signed-off-by: Stefan Herbrechtsmeier Signed-off-by: Richard Purdie (cherry picked from commit 34ece8030e7a6a100b5e3e7b94e6c786c0e199a6) Signed-off-by: Steve Sakoman --- scripts/lib/recipetool/create.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 116bdfd697..5b6ac12a92 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py @@ -389,9 +389,6 @@ def reformat_git_uri(uri): parms.update({('protocol', 'ssh')}) elif (scheme == "http" or scheme == 'https' or scheme == 'ssh') and not ('protocol' in parms): parms.update({('protocol', scheme)}) - # We assume 'master' branch if not set - if not 'branch' in parms: - parms.update({('branch', 'master')}) # Always append 'git://' fUrl = bb.fetch2.encodeurl(('git', host, path, user, pswd, parms)) return fUrl @@ -481,6 +478,9 @@ def create_recipe(args): storeTagName = params['tag'] params['nobranch'] = '1' del params['tag'] + # Assume 'master' branch if not set + if scheme in ['git', 'gitsm'] and 'branch' not in params and 'nobranch' not in params: + params['branch'] = 'master' fetchuri = bb.fetch2.encodeurl((scheme, network, path, user, passwd, params)) tmpparent = tinfoil.config_data.getVar('BASE_WORKDIR') @@ -530,10 +530,9 @@ def create_recipe(args): # Remove HEAD reference point and drop remote prefix get_branch = [x.split('/', 1)[1] for x in get_branch if not x.startswith('origin/HEAD')] if 'master' in get_branch: - # If it is master, we do not need to append 'branch=master' as this is default. # Even with the case where get_branch has multiple objects, if 'master' is one # of them, we should default take from 'master' - srcbranch = '' + srcbranch = 'master' elif len(get_branch) == 1: # If 'master' isn't in get_branch and get_branch contains only ONE object, then store result into 'srcbranch' srcbranch = get_branch[0] @@ -546,8 +545,8 @@ def create_recipe(args): # Since we might have a value in srcbranch, we need to # recontruct the srcuri to include 'branch' in params. scheme, network, path, user, passwd, params = bb.fetch2.decodeurl(srcuri) - if srcbranch: - params['branch'] = srcbranch + if scheme in ['git', 'gitsm']: + params['branch'] = srcbranch or 'master' if storeTagName and scheme in ['git', 'gitsm']: # Check srcrev using tag and check validity of the tag @@ -606,7 +605,7 @@ def create_recipe(args): splitline = line.split() if len(splitline) > 1: if splitline[0] == 'origin' and scriptutils.is_src_url(splitline[1]): - srcuri = reformat_git_uri(splitline[1]) + srcuri = reformat_git_uri(splitline[1]) + ';branch=master' srcsubdir = 'git' break From patchwork Mon Dec 13 15:36:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 922 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 1153FC433F5 for ; Mon, 13 Dec 2021 15:37:10 +0000 (UTC) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mx.groups.io with SMTP id smtpd.web10.12597.1639409829748093130 for ; Mon, 13 Dec 2021 07:37:09 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=gfid/h9S; spf=softfail (domain: sakoman.com, ip: 209.85.215.169, mailfrom: steve@sakoman.com) Received: by mail-pg1-f169.google.com with SMTP id y9so1725407pgj.5 for ; Mon, 13 Dec 2021 07:37:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=aEExQrmiTrG7i/ns7RcwWHVqSh+3vJZDHyhJJVvvNfU=; b=gfid/h9SBi8HeTTI90qDTb/K+P9FxiiCEXij6o1oF4qjxWAemVAvBq6GRhi9gMrgYC 6kr/a65RnUkA7ygWOZH1qEZBkKAYParBO1rJgC+/nJx2P/igi2K6BMszcieW/u4op1HV zoqmeNaf3p+gHbXOVHKkcQIx10yM/76p503O3StswGfgkBzl4ce+pRVJy2rWAlnl+5fQ rZwTdknVp5cVFHVyjiVTCNvzlKYexJjmn8TSoEzlowvspsqBTDa+38hdqz1G6Q9efOG9 0Bp5bJUwfXI379LU4a3K8x2T9mlCR3D5qNchnD7cGSD3k9nBvrXGNKkCYbRujmDArnVJ 2a2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aEExQrmiTrG7i/ns7RcwWHVqSh+3vJZDHyhJJVvvNfU=; b=wvopAyVOGGDTE/+mDQVKHXUN/gpnt6amaiuTa5+LfnStCF4b7VN7aC7Gcs/5uH4dYs SsGSgX/2PvLKVEPMWtwibMiInbhHUm3AS5gz4QBNbovWhxFR6agSp4k26WwiF8oJ0h9A klUoRGoSysVX2+ZQQ2yVSPlTZP/R5uT6Vt6iF2RnlplHba9e8ldJINnRaFHve8ASiuen TIkJVEIUQhVbGBsitooa8VV1bv7Vsos2rDMp4FXyN0E0VkZD/g9jmNSybkIFpYYdRGaH HXBxMFvNDbccbry0P+yPZa+MeO9j2IyRC6DBJ47Arjp/J+WVAIke7kdDrn2Uq5ge0/e+ aK7w== X-Gm-Message-State: AOAM5328ZzjUpaPtMDeu5jAZ5Wgto8LgnhZbCAeIhmBoAPgXXDeM9hX5 Wy30JXfoxslrb7bTC0vRm0TO0sQ8j4xF3s3/ X-Google-Smtp-Source: ABdhPJwwoWjrS218c3bVQU/KKIdCZW4TW44zfxnnOSbp9LzY33Jg2TAXGx+Oe0hSDtlxghjqLYtmHA== X-Received: by 2002:a63:5b13:: with SMTP id p19mr34822943pgb.613.1639409828699; Mon, 13 Dec 2021 07:37:08 -0800 (PST) Received: from hexa.router0800d9.com (rrcs-66-91-142-162.west.biz.rr.com. [66.91.142.162]) by smtp.gmail.com with ESMTPSA id y28sm12850297pfa.208.2021.12.13.07.37.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 07:37:07 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 09/10] selftest/devtool: Check branch in git fetch Date: Mon, 13 Dec 2021 05:36:27 -1000 Message-Id: <7d26bdcfef6473f64c73e8507bce334e010c3cad.1639409496.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.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 ; Mon, 13 Dec 2021 15:37:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/159652 From: Stefan Herbrechtsmeier The commit 'meta/scripts: Manual git url branch additions (dc53fe75cc)' forget the url branch= parameter in the devtool git fetch test. Signed-off-by: Stefan Herbrechtsmeier Signed-off-by: Richard Purdie (cherry picked from commit 1419168a58a5caf99e24ada08c9ab639344a78b4) Signed-off-by: Steve Sakoman --- meta/lib/oeqa/selftest/cases/devtool.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index 713efd71bd..87e71632ab 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -442,6 +442,7 @@ class DevtoolAddTests(DevtoolBase): tempdir = tempfile.mkdtemp(prefix='devtoolqa') self.track_for_cleanup(tempdir) url = 'gitsm://git.yoctoproject.org/mraa' + url_branch = '%s;branch=master' % url checkrev = 'ae127b19a50aa54255e4330ccfdd9a5d058e581d' testrecipe = 'mraa' srcdir = os.path.join(tempdir, testrecipe) @@ -462,7 +463,7 @@ class DevtoolAddTests(DevtoolBase): checkvars = {} checkvars['S'] = '${WORKDIR}/git' checkvars['PV'] = '1.0+git${SRCPV}' - checkvars['SRC_URI'] = url + checkvars['SRC_URI'] = url_branch checkvars['SRCREV'] = '${AUTOREV}' self._test_recipe_contents(recipefile, checkvars, []) # Try with revision and version specified @@ -481,7 +482,7 @@ class DevtoolAddTests(DevtoolBase): checkvars = {} checkvars['S'] = '${WORKDIR}/git' checkvars['PV'] = '1.5+git${SRCPV}' - checkvars['SRC_URI'] = url + checkvars['SRC_URI'] = url_branch checkvars['SRCREV'] = checkrev self._test_recipe_contents(recipefile, checkvars, []) From patchwork Mon Dec 13 15:36:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 923 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 122F5C433EF for ; Mon, 13 Dec 2021 15:37:13 +0000 (UTC) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mx.groups.io with SMTP id smtpd.web08.12505.1639409832788648145 for ; Mon, 13 Dec 2021 07:37:12 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20210112.gappssmtp.com header.s=20210112 header.b=5S6NG7vg; spf=softfail (domain: sakoman.com, ip: 209.85.214.172, mailfrom: steve@sakoman.com) Received: by mail-pl1-f172.google.com with SMTP id u17so11411405plg.9 for ; Mon, 13 Dec 2021 07:37:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=2A0LLg20upClIJTQ3nuQ/e36UWeO80gJwgYiaS50qj4=; b=5S6NG7vg0L5C5ZQs3rrV69zKeMWsCFrmH50rHMijHbG+IXhshc8MCTmi5b7l9fTRfT /uZmRuGGTYT27mFBWM1x5Fzdb1XdSAWXYe5vaxRa6TEVdCcXr5IC0yG7EfrN38MwATLe YnPZ5PJFSK4heWOAUOnkLSKPohBFOcGqdjFpJqyfzbOSny5i7RUBpQTOGMrcyZjpSYP7 178E8hkTvTnfznPye52bslRnnkP/SUj+76q0fF7jRZ6PgAeK8LjzV7DLHjc9VBxqcTcU aL4mr5v3rH9EeFc1xnmxJhSIzwj67iL46XW4RAgD7HnzNkhlvGhM9m/abWtwRsEMRJbF 5Yjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2A0LLg20upClIJTQ3nuQ/e36UWeO80gJwgYiaS50qj4=; b=agxiQuA1qottxWySkoXt6EHMkxlrgpP7FYI+mLfboJpsAVlQ+myErczCDaTUF3+wXM Y8l4d9TEBX6naL26IYmQXy4qNntaa/1ghwLWSaAXZJAz4s3DmYLZO4MZ/JCO2FEXpRsh qYHrda5IU5PG8KkBnfWwwuISBLNhtmufkFEawfXDRu8Rwu/Xi6lFxvtIWY2w4cfKaMG6 TLZvwvm4JGKdWaP7a4WRkPrcTG1jTBFQ+9Siyjtj/M2K0tMjSIIm1fVIzzFRorb3UjY1 AUuL3SarTEDTMNpH3lPQqALJdp3+o8U5knesztlMI4AoBIX/PfpDJTBSUcex2JlozMI/ LeaA== X-Gm-Message-State: AOAM531jyUf2+YiNA7uWf5pUqKkTPtRCSSvAK5L0vkjas1qnLqZw5Nd7 lGnFyun0M9uD+KHMNfTpCh3IPOxOxXGaxyXy X-Google-Smtp-Source: ABdhPJzQ8HbfV9TuRTc16tkg9kX+5N5QRhkw7yAZvRuZtkWy5T1beIFNMZ4y11Xb4nYZ/nM1Y5XD5Q== X-Received: by 2002:a17:90b:128e:: with SMTP id fw14mr45812332pjb.173.1639409831757; Mon, 13 Dec 2021 07:37:11 -0800 (PST) Received: from hexa.router0800d9.com (rrcs-66-91-142-162.west.biz.rr.com. [66.91.142.162]) by smtp.gmail.com with ESMTPSA id y28sm12850297pfa.208.2021.12.13.07.37.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 07:37:11 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][dunfell 10/10] selftest: skip virgl test on centos 8 entirely Date: Mon, 13 Dec 2021 05:36:28 -1000 Message-Id: <74bb94a7d249b5c53f3e1d15688a3a323fc8e828.1639409496.git.steve@sakoman.com> X-Mailer: git-send-email 2.25.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 ; Mon, 13 Dec 2021 15:37:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/159653 With the sdl frontend, qemu isn't able to even boot fully, so let's skip the test early. Signed-off-by: Steve Sakoman --- meta/lib/oeqa/selftest/cases/runtime_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py index 1c935da919..9e5c3f2878 100644 --- a/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py @@ -179,6 +179,8 @@ class TestImage(OESelftestTestCase): self.skipTest('virgl isn\'t working with Debian 8') if distro and distro == 'centos-7': self.skipTest('virgl isn\'t working with Centos 7') + if distro and distro == 'centos-8': + self.skipTest('virgl isn\'t working with Centos 8') if distro and distro == 'opensuseleap-15.0': self.skipTest('virgl isn\'t working with Opensuse 15.0')