[OE-core][dunfell][PATCH] ghostscript: backport fix for CVE-2023-38559

2023-08-09 Thread Vijay Anusuri
From: Vijay Anusuri 

Upstream-Status: Backport from 
https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=d81b82c70bc1fb9991bb95f1201abb5dea55f57f

Signed-off-by: Vijay Anusuri 
---
 ...pcx-buffer-overrun-fix-from-devices-.patch | 31 +++
 .../ghostscript/ghostscript_9.52.bb   |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 
meta/recipes-extended/ghostscript/ghostscript/0001-Bug-706897-Copy-pcx-buffer-overrun-fix-from-devices-.patch

diff --git 
a/meta/recipes-extended/ghostscript/ghostscript/0001-Bug-706897-Copy-pcx-buffer-overrun-fix-from-devices-.patch
 
b/meta/recipes-extended/ghostscript/ghostscript/0001-Bug-706897-Copy-pcx-buffer-overrun-fix-from-devices-.patch
new file mode 100644
index 00..91b9f6df50
--- /dev/null
+++ 
b/meta/recipes-extended/ghostscript/ghostscript/0001-Bug-706897-Copy-pcx-buffer-overrun-fix-from-devices-.patch
@@ -0,0 +1,31 @@
+From d81b82c70bc1fb9991bb95f1201abb5dea55f57f Mon Sep 17 00:00:00 2001
+From: Chris Liddell 
+Date: Mon, 17 Jul 2023 14:06:37 +0100
+Subject: [PATCH] Bug 706897: Copy pcx buffer overrun fix from
+ devices/gdevpcx.c
+
+Bounds check the buffer, before dereferencing the pointer.
+
+Upstream-Status: Backport 
[https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=d81b82c70bc1fb9991bb95f1201abb5dea55f57f]
+CVE: CVE-2023-38559
+Signed-off-by: Vijay Anusuri 
+---
+ base/gdevdevn.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/base/gdevdevn.c b/base/gdevdevn.c
+index 3b019d6..2888776 100644
+--- a/base/gdevdevn.c
 b/base/gdevdevn.c
+@@ -1980,7 +1980,7 @@ devn_pcx_write_rle(const byte * from, const byte * end, 
int step, gp_file * file
+ byte data = *from;
+ 
+ from += step;
+-if (data != *from || from == end) {
++if (from >= end || data != *from) {
+ if (data >= 0xc0)
+ gp_fputc(0xc1, file);
+ } else {
+-- 
+2.25.1
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.52.bb 
b/meta/recipes-extended/ghostscript/ghostscript_9.52.bb
index 57f0b51ad3..37e9ed8e84 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.52.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.52.bb
@@ -40,6 +40,7 @@ SRC_URI_BASE = 
"https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d
 file://CVE-2021-3781_2.patch \
 file://CVE-2021-3781_3.patch \
 file://CVE-2023-28879.patch \
+
file://0001-Bug-706897-Copy-pcx-buffer-overrun-fix-from-devices-.patch \
 "
 
 SRC_URI = "${SRC_URI_BASE} \
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185723): 
https://lists.openembedded.org/g/openembedded-core/message/185723
Mute This Topic: https://lists.openembedded.org/mt/100658298/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [yocto] QA notification for completed autobuilder build (yocto-3.1.27.rc2)

2023-08-09 Thread Jing Hui Tham
Hi All,
 
QA for yocto-3.1.27.rc2 is completed. This is the full report for this release: 
 
https://git.yoctoproject.org/cgit/cgit.cgi/yocto-testresults-contrib/tree/?h=intel-yocto-testresults
 
=== Summary 
No high milestone defects.
 
No new issue found. 
 
Thanks,
Jing Hui


> -Original Message-
> From: yo...@lists.yoctoproject.org  On
> Behalf Of Pokybuild User
> Sent: Saturday, August 5, 2023 11:07 AM
> To: yo...@lists.yoctoproject.org
> Cc: qa-build-notificat...@lists.yoctoproject.org
> Subject: [yocto] QA notification for completed autobuilder build (yocto-
> 3.1.27.rc2)
> 
> 
> A build flagged for QA (yocto-3.1.27.rc2) was completed on the autobuilder
> and is available at:
> 
> 
> https://autobuilder.yocto.io/pub/releases/yocto-3.1.27.rc2
> 
> 
> Build hash information:
> 
> bitbake: b60c7085ec370473bea9b3b4b65826a17638837f
> meta-agl: 583f80f8e9d085a98f1cbab3a9d8082503ab739e
> meta-arm: b1fe8443a7a72c65fa0fc3371f607c6671b3a882
> meta-aws: d72bb6b38de88caab73047feba16092ca38959c1
> meta-gplv2: 60b251c25ba87e946a0ca4cdc8d17b1cb09292ac
> meta-intel: 488af577a3f21f038c551612bb0af077fa2b743d
> meta-mingw: 524de686205b5d6736661d4532f5f98fee8589b7
> meta-openembedded: b8b0b06821d4d4df0cce4f07fa31a8ca1dd38f46
> meta-virtualization: 521459bf588435e847d981657485bae8d6f003b5
> oecore: 6dd64ca2d726d0b222a7608c65eb0a20454c3f99
> poky: 32da5ee9519119a16392acba29f9df4720a55c0f
> 
> 
> 
> This is an automated message from the Yocto Project Autobuilder
> Git: git://git.yoctoproject.org/yocto-autobuilder2
> Email: richard.pur...@linuxfoundation.org
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185722): 
https://lists.openembedded.org/g/openembedded-core/message/185722
Mute This Topic: https://lists.openembedded.org/mt/100594284/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [kirkstone][PATCHv2] tiff: fix multiple CVEs

2023-08-09 Thread Hitendra Prajapati
Hi Team,

Gentle reminder.

Is there any issue with patch ??  what is the issue here ??

Regards,
Hitendra

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185721): 
https://lists.openembedded.org/g/openembedded-core/message/185721
Mute This Topic: https://lists.openembedded.org/mt/100384845/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][dunfell][PATCH] openssl: Upgrade 1.1.1t -> 1.1.1v

2023-08-09 Thread Steve Sakoman
I'm getting a failure on the autobuilder for the qemumips64 machine:

DEBUG: Executing shell function do_compile
NOTE: make -j 16 -l 52
perl "-I." -Mconfigdata "../openssl-1.1.1v/util/dofile.pl" \
"-oMakefile" ../openssl-1.1.1v/include/crypto/bn_conf.h.in >
include/crypto/bn_conf.h
perl "-I." -Mconfigdata "../openssl-1.1.1v/util/dofile.pl" \
"-oMakefile" ../openssl-1.1.1v/include/openssl/opensslconf.h.in >
include/openssl/opensslconf.h
perl "-I." -Mconfigdata "../openssl-1.1.1v/util/dofile.pl" \
"-oMakefile" ../openssl-1.1.1v/include/crypto/dso_conf.h.in >
include/crypto/dso_conf.h
make depend && make _all
make[1]: Entering directory
'TOPDIR/tmp/work/mips64r2-poky-linux/openssl/1.1.1v-r0/build'
make[1]: Leaving directory
'TOPDIR/tmp/work/mips64r2-poky-linux/openssl/1.1.1v-r0/build'
make[1]: Entering directory
'TOPDIR/tmp/work/mips64r2-poky-linux/openssl/1.1.1v-r0/build'
mips64-poky-linux-gcc  -meb -mabi=64 -mhard-float -march=mips64r2
-fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security
--sysroot=TOPDIR/tmp/work/mips64r2-poky-linux/openssl/1.1.1v-r0/recipe-sysroot
 -I. -Iinclude -I../openssl-1.1.1v -I../openssl-1.1.1v/include -fPIC
-pthread -mabi=64 -mips3 -Wa,--noexecstack -O2 -pipe -g
-feliminate-unused-debug-types
-fmacro-prefix-map=TOPDIR/tmp/work/mips64r2-poky-linux/openssl/1.1.1v-r0=/usr/src/debug/openssl/1.1.1v-r0

-fdebug-prefix-map=TOPDIR/tmp/work/mips64r2-poky-linux/openssl/1.1.1v-r0=/usr/src/debug/openssl/1.1.1v-r0

-fdebug-prefix-map=TOPDIR/tmp/work/mips64r2-poky-linux/openssl/1.1.1v-r0/recipe-sysroot=

-fdebug-prefix-map=TOPDIR/tmp/work/mips64r2-poky-linux/openssl/1.1.1v-r0/recipe-sysroot-native=
 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BN_ASM_MONT -DSHA1_ASM
-DSHA256_ASM -DSHA512_ASM -DAES_ASM -DPOLY1305_ASM
-DOPENSSLDIR="\"/usr/lib/ssl-1.1\""
-DENGINESDIR="\"/usr/lib/engines-1.1\"" -DNDEBUG  -MMD -MF
apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o
../openssl-1.1.1v/apps/app_rand.c
Assembler messages:
Error: -mips3 conflicts with the other architecture options, which
imply -mips64r2
cc1: error: '-mips3' conflicts with the other architecture options,
which specify a mips64r2 processor
make[1]: *** [Makefile:711: apps/app_rand.o] Error 1
make[1]: Leaving directory
'TOPDIR/tmp/work/mips64r2-poky-linux/openssl/1.1.1v-r0/build'
make: *** [Makefile:178: all] Error 2
ERROR: oe_runmake failed
WARNING: exit code 1 from a shell command.
ERROR: Execution of
'TOPDIR/tmp/work/mips64r2-poky-linux/openssl/1.1.1v-r0/temp/run.do_compile.3017457'
failed with exit code 1

On Tue, Aug 1, 2023 at 12:30 PM Peter Marko via lists.openembedded.org
 wrote:
>
> From: Peter Marko 
>
> https://www.openssl.org/news/openssl-1.1.1-notes.html
> Major changes between OpenSSL 1.1.1u and OpenSSL 1.1.1v [1 Aug 2023]
> * Fix excessive time spent checking DH q parameter value (CVE-2023-3817)
> * Fix DH_check() excessive time with over sized modulus (CVE-2023-3446)
> Major changes between OpenSSL 1.1.1t and OpenSSL 1.1.1u [30 May 2023]
> * Mitigate for very slow `OBJ_obj2txt()` performance with gigantic OBJECT 
> IDENTIFIER sub-identities. (CVE-2023-2650)
> * Fixed documentation of X509_VERIFY_PARAM_add0_policy() (CVE-2023-0466)
> * Fixed handling of invalid certificate policies in leaf certificates 
> (CVE-2023-0465)
> * Limited the number of nodes created in a policy tree ([CVE-2023-0464])
>
> All CVEs for upgrade to 1.1.1u were already patched, so effectively
> this will apply patches for CVE-2023-3446 and CVE-2023-3817 plus
> several non-CVE fixes.
>
> Signed-off-by: Peter Marko 
> ---
>  .../openssl/openssl/CVE-2023-0464.patch   | 226 --
>  .../openssl/openssl/CVE-2023-0465.patch   |  60 -
>  .../openssl/openssl/CVE-2023-0466.patch   |  82 ---
>  .../openssl/openssl/CVE-2023-2650.patch   | 122 --
>  .../{openssl_1.1.1t.bb => openssl_1.1.1v.bb}  |   6 +-
>  5 files changed, 1 insertion(+), 495 deletions(-)
>  delete mode 100644 
> meta/recipes-connectivity/openssl/openssl/CVE-2023-0464.patch
>  delete mode 100644 
> meta/recipes-connectivity/openssl/openssl/CVE-2023-0465.patch
>  delete mode 100644 
> meta/recipes-connectivity/openssl/openssl/CVE-2023-0466.patch
>  delete mode 100644 
> meta/recipes-connectivity/openssl/openssl/CVE-2023-2650.patch
>  rename meta/recipes-connectivity/openssl/{openssl_1.1.1t.bb => 
> openssl_1.1.1v.bb} (96%)
>
> diff --git a/meta/recipes-connectivity/openssl/openssl/CVE-2023-0464.patch 
> b/meta/recipes-connectivity/openssl/openssl/CVE-2023-0464.patch
> deleted file mode 100644
> index cce5bad9f0..00
> --- a/meta/recipes-connectivity/openssl/openssl/CVE-2023-0464.patch
> +++ /dev/null
> @@ -1,226 +0,0 @@
> -From 879f7080d7e141f415c79eaa3a8ac4a3dad0348b Mon Sep 17 00:00:00 2001
> -From: Pauli 
> -Date: Wed, 8 Mar 2023 15:28:20 +1100
> -Subject: [PATCH] x509: excessive resource use verifying policy constraints
> -
> -A security vulnerability has been identified in 

Re: [OE-core][PATCH] systemd: fix efi dependency

2023-08-09 Thread Alexandre Belloni via lists.openembedded.org
On 09/08/2023 21:52:35+0100, Jose Quaresma wrote:
> Hi Alexandre,
> 
> Alexandre Belloni  escreveu no dia quarta,
> 9/08/2023 à(s) 21:25:
> 
> > Hello,
> >
> > On 09/08/2023 00:02:08+0100, Jose Quaresma wrote:
> > > Ping!
> >
> > We developed the same patch at the same time, I confirm yours is working
> > but it was not enough to solve all the systemd v254 related issues. I've
> > just sent the hopefully last patch to fix the remaining issue.
> >
> 
> Thanks for your support and we hope your wic fix is the last one
> for the systemd-boot.
> 
> Anyway please note that this patch is not for the systemd-boot but
> it is for systemd to fix the build when the efi packageconfig is enabled.
> 

Ah yes, sorry, I got confused with your other patch. I don't know what
happened with this one. I'm pretty sure I had it in my branch at some
point but it got dropped and I forgot to get it back, thanks for the
reminder, I'll ensure it gets queued.

> Jose
> 
> 
> >
> > >
> > > Jose Quaresma via lists.openembedded.org  > > gmail@lists.openembedded.org> escreveu no dia segunda, 7/08/2023
> > à(s)
> > > 15:26:
> > >
> > > > Last version of systemd dpends now on pyelftools to build the efi
> > support
> > > > but the required tool is the native ones and not the target.
> > > > The systemd-boot has the corrected dependencie so fix this in the main
> > > > recipe.
> > > >
> > > > | Program python3 (jinja2) found: YES
> > > >
> > (/build/tmp-lmp/work/corei7-64-lmp-linux/systemd/1_254-r0/recipe-sysroot-native/usr/bin/python3-native/python3)
> > > > modules: jinja2
> > > > | Checking if "32bit build possible" : links: NO
> > > > | Program python3 (elftools) found: NO
> > > > |
> > > > | ../git/meson.build:2147:8: ERROR: Problem encountered: EFI bootloader
> > > > support requires pyelftools.
> > > > |
> > > > | A full log can be found at
> > > >
> > /build/tmp-lmp/work/corei7-64-lmp-linux/systemd/1_254-r0/build/meson-logs/meson-log.txt
> > > >
> > > > Signed-off-by: Jose Quaresma 
> > > > ---
> > > >  meta/recipes-core/systemd/systemd_254.bb | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/meta/recipes-core/systemd/systemd_254.bb
> > > > b/meta/recipes-core/systemd/systemd_254.bb
> > > > index ea1a4f02f0..cd2a021da2 100644
> > > > --- a/meta/recipes-core/systemd/systemd_254.bb
> > > > +++ b/meta/recipes-core/systemd/systemd_254.bb
> > > > @@ -142,7 +142,7 @@ PACKAGECONFIG[default-compression-lz4] =
> > "-Dlz4=true
> > > > -Ddefault-compression=lz4,,
> > > >  PACKAGECONFIG[default-compression-xz] = "-Dxz=true
> > > > -Ddefault-compression=xz,,xz"
> > > >  PACKAGECONFIG[default-compression-zstd] = "-Dzstd=true
> > > > -Ddefault-compression=zstd,,zstd"
> > > >  PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
> > > > -PACKAGECONFIG[efi] = "-Defi=true -Dbootloader=true,-Defi=false
> > > > -Dbootloader=false,python3-pyelftools"
> > > > +PACKAGECONFIG[efi] = "-Defi=true -Dbootloader=true,-Defi=false
> > > > -Dbootloader=false,python3-pyelftools-native"
> > > >  PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
> > > >  PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
> > > >  PACKAGECONFIG[repart] = "-Drepart=true,-Drepart=false"
> > > > --
> > > > 2.34.1
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > > --
> > > Best regards,
> > >
> > > José Quaresma
> >
> > >
> > > 
> > >
> >
> >
> > --
> > Alexandre Belloni, co-owner and COO, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com
> >
> 
> 
> -- 
> Best regards,
> 
> José Quaresma

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185719): 
https://lists.openembedded.org/g/openembedded-core/message/185719
Mute This Topic: https://lists.openembedded.org/mt/100600508/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] systemd-boot: Fix build on musl

2023-08-09 Thread Khem Raj
Signed-off-by: Khem Raj 
---
 .../0001-efi-Use-char16_t-on-musl.patch   | 79 +++
 meta/recipes-core/systemd/systemd-boot_254.bb |  2 +
 2 files changed, 81 insertions(+)
 create mode 100644 
meta/recipes-core/systemd/systemd-boot/0001-efi-Use-char16_t-on-musl.patch

diff --git 
a/meta/recipes-core/systemd/systemd-boot/0001-efi-Use-char16_t-on-musl.patch 
b/meta/recipes-core/systemd/systemd-boot/0001-efi-Use-char16_t-on-musl.patch
new file mode 100644
index 000..1988d50ac90
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-boot/0001-efi-Use-char16_t-on-musl.patch
@@ -0,0 +1,79 @@
+From efe1720de61534c814580fec61fe0025308482b2 Mon Sep 17 00:00:00 2001
+From: Khem Raj 
+Date: Tue, 8 Aug 2023 00:57:12 -0700
+Subject: [PATCH] efi: Use char16_t on musl
+
+musl does not support configurations with under-sized definitions of
+types like 16-bit wchar_t or 32-bit off_t. Only the sizes that can
+represent the full range of values are supported. musl does however
+have the C11 uchar.h functions which can operate on char16_t, so you
+could use char16_t and the corresponding c16 conversion functions
+instead of the wc versions
+
+Upstream-Status: Inappropriate [Musl specific]
+Signed-off-by: Khem Raj 
+---
+ src/boot/efi/efi-string.c | 2 +-
+ src/boot/efi/efi.h| 2 ++
+ src/boot/efi/meson.build  | 1 -
+ src/fundamental/string-util-fundamental.h | 4 
+ 4 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/boot/efi/efi-string.c b/src/boot/efi/efi-string.c
+index 4400591255..421b2c262d 100644
+--- a/src/boot/efi/efi-string.c
 b/src/boot/efi/efi-string.c
+@@ -735,7 +735,7 @@ static bool handle_format_specifier(FormatContext *ctx, 
SpecifierContext *sp) {
+ case 's':
+ if (sp->long_arg) {
+ sp->wstr = va_arg(ctx->ap, const wchar_t *) ?: 
L"(null)";
+-sp->len = wcsnlen(sp->wstr, sp->len);
++sp->len = wcsnlen((char16_t*)sp->wstr, sp->len);
+ } else {
+ sp->str = va_arg(ctx->ap, const char *) ?: "(null)";
+ sp->len = strnlen8(sp->str, sp->len);
+diff --git a/src/boot/efi/efi.h b/src/boot/efi/efi.h
+index 5c34668383..459f675ea5 100644
+--- a/src/boot/efi/efi.h
 b/src/boot/efi/efi.h
+@@ -21,7 +21,9 @@ assert_cc(sizeof(uint8_t) == 1);
+ assert_cc(sizeof(uint16_t) == 2);
+ assert_cc(sizeof(uint32_t) == 4);
+ assert_cc(sizeof(uint64_t) == 8);
++#if defined(__linux__) && defined(__GLIBC__)
+ assert_cc(sizeof(wchar_t) == 2);
++#endif
+ assert_cc(sizeof(char16_t) == 2);
+ assert_cc(sizeof(char32_t) == 4);
+ assert_cc(sizeof(size_t) == sizeof(void *));
+diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
+index 1c52629651..4a64838295 100644
+--- a/src/boot/efi/meson.build
 b/src/boot/efi/meson.build
+@@ -132,7 +132,6 @@ efi_c_args = [
+ '-DSD_BOOT=1',
+ '-ffreestanding',
+ '-fno-strict-aliasing',
+-'-fshort-wchar',
+ '-include', 'efi_config.h',
+ ]
+ 
+diff --git a/src/fundamental/string-util-fundamental.h 
b/src/fundamental/string-util-fundamental.h
+index 9019542b16..1b46f42995 100644
+--- a/src/fundamental/string-util-fundamental.h
 b/src/fundamental/string-util-fundamental.h
+@@ -16,7 +16,11 @@
+ #  define strncmp strncmp16
+ #  define strcasecmp strcasecmp16
+ #  define strncasecmp strncasecmp16
++#if defined (__linux__) && !defined(__GLIBC__)
++#  define STR_C(str)   (u ## str)
++#else
+ #  define STR_C(str)   (L ## str)
++#endif
+ typedef char16_t sd_char;
+ #else
+ #  define STR_C(str)   (str)
+-- 
+2.41.0
+
diff --git a/meta/recipes-core/systemd/systemd-boot_254.bb 
b/meta/recipes-core/systemd/systemd-boot_254.bb
index 5d69cf83abc..ae86450d2a6 100644
--- a/meta/recipes-core/systemd/systemd-boot_254.bb
+++ b/meta/recipes-core/systemd/systemd-boot_254.bb
@@ -1,6 +1,8 @@
 require systemd.inc
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
 
+SRC_URI:append:libc-musl = " file://0001-efi-Use-char16_t-on-musl.patch "
+
 require conf/image-uefi.conf
 
 DEPENDS = "intltool-native libcap util-linux gperf-native 
python3-jinja2-native python3-pyelftools-native"
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185718): 
https://lists.openembedded.org/g/openembedded-core/message/185718
Mute This Topic: https://lists.openembedded.org/mt/100652047/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] gnu-efi: Fix build on musl

2023-08-09 Thread Khem Raj
Build with musl emits extra warnings about pointer incompatibility due
to different type of wchar_t than glibc which turns to be error in the
end, disable -Werror for musl.

Signed-off-by: Khem Raj 
---
v2: Always apply the patch

 .../gnu-efi/gnu-efi/no-werror.patch   | 19 +++
 meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb|  2 +-
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-bsp/gnu-efi/gnu-efi/no-werror.patch

diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/no-werror.patch 
b/meta/recipes-bsp/gnu-efi/gnu-efi/no-werror.patch
new file mode 100644
index 000..db2bcf70b76
--- /dev/null
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi/no-werror.patch
@@ -0,0 +1,19 @@
+Do not treat warnings as errors
+
+There are additional warnings found with musl which are
+treated as errors and fails the build, we have more combinations
+then upstream supports to handle
+
+Signed-off-by: Khem Raj 
+Upstream-Status: Inappropriate [OE specific]
+--- a/Make.defaults
 b/Make.defaults
+@@ -187,7 +187,7 @@ CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wex
+-funsigned-char -fshort-wchar -fno-strict-aliasing \
+-ffreestanding -fno-stack-protector
+ else
+-CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign -Werror \
++CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign \
+-funsigned-char -fshort-wchar -fno-strict-aliasing \
+  -ffreestanding -fno-stack-protector -fno-stack-check \
+-fno-stack-check \
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb 
b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb
index d37d638e097..43b7cc7529e 100644
--- a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb
@@ -17,8 +17,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/files/${BP}.tar.bz2 \
file://gnu-efi-3.0.9-fix-clang-build.patch \
file://0001-riscv64-adjust-type-definitions.patch \
file://0001-riscv64-ignore-unknown-relocs.patch \
+   file://no-werror.patch \
"
-
 SRC_URI[sha256sum] = 
"7807e903349343a7a142ebb934703a2872235e89688cf586c032b0a1087bcaf4"
 
 COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*|riscv64.*)-linux"
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185717): 
https://lists.openembedded.org/g/openembedded-core/message/185717
Mute This Topic: https://lists.openembedded.org/mt/100651926/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] systemd: fix efi dependency

2023-08-09 Thread Jose Quaresma
Hi Alexandre,

Alexandre Belloni  escreveu no dia quarta,
9/08/2023 à(s) 21:25:

> Hello,
>
> On 09/08/2023 00:02:08+0100, Jose Quaresma wrote:
> > Ping!
>
> We developed the same patch at the same time, I confirm yours is working
> but it was not enough to solve all the systemd v254 related issues. I've
> just sent the hopefully last patch to fix the remaining issue.
>

Thanks for your support and we hope your wic fix is the last one
for the systemd-boot.

Anyway please note that this patch is not for the systemd-boot but
it is for systemd to fix the build when the efi packageconfig is enabled.

Jose


>
> >
> > Jose Quaresma via lists.openembedded.org  > gmail@lists.openembedded.org> escreveu no dia segunda, 7/08/2023
> à(s)
> > 15:26:
> >
> > > Last version of systemd dpends now on pyelftools to build the efi
> support
> > > but the required tool is the native ones and not the target.
> > > The systemd-boot has the corrected dependencie so fix this in the main
> > > recipe.
> > >
> > > | Program python3 (jinja2) found: YES
> > >
> (/build/tmp-lmp/work/corei7-64-lmp-linux/systemd/1_254-r0/recipe-sysroot-native/usr/bin/python3-native/python3)
> > > modules: jinja2
> > > | Checking if "32bit build possible" : links: NO
> > > | Program python3 (elftools) found: NO
> > > |
> > > | ../git/meson.build:2147:8: ERROR: Problem encountered: EFI bootloader
> > > support requires pyelftools.
> > > |
> > > | A full log can be found at
> > >
> /build/tmp-lmp/work/corei7-64-lmp-linux/systemd/1_254-r0/build/meson-logs/meson-log.txt
> > >
> > > Signed-off-by: Jose Quaresma 
> > > ---
> > >  meta/recipes-core/systemd/systemd_254.bb | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/meta/recipes-core/systemd/systemd_254.bb
> > > b/meta/recipes-core/systemd/systemd_254.bb
> > > index ea1a4f02f0..cd2a021da2 100644
> > > --- a/meta/recipes-core/systemd/systemd_254.bb
> > > +++ b/meta/recipes-core/systemd/systemd_254.bb
> > > @@ -142,7 +142,7 @@ PACKAGECONFIG[default-compression-lz4] =
> "-Dlz4=true
> > > -Ddefault-compression=lz4,,
> > >  PACKAGECONFIG[default-compression-xz] = "-Dxz=true
> > > -Ddefault-compression=xz,,xz"
> > >  PACKAGECONFIG[default-compression-zstd] = "-Dzstd=true
> > > -Ddefault-compression=zstd,,zstd"
> > >  PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
> > > -PACKAGECONFIG[efi] = "-Defi=true -Dbootloader=true,-Defi=false
> > > -Dbootloader=false,python3-pyelftools"
> > > +PACKAGECONFIG[efi] = "-Defi=true -Dbootloader=true,-Defi=false
> > > -Dbootloader=false,python3-pyelftools-native"
> > >  PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
> > >  PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
> > >  PACKAGECONFIG[repart] = "-Drepart=true,-Drepart=false"
> > > --
> > > 2.34.1
> > >
> > >
> > >
> > >
> > >
> >
> > --
> > Best regards,
> >
> > José Quaresma
>
> >
> > 
> >
>
>
> --
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>


-- 
Best regards,

José Quaresma

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185716): 
https://lists.openembedded.org/g/openembedded-core/message/185716
Mute This Topic: https://lists.openembedded.org/mt/100600508/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] systemd: fix efi dependency

2023-08-09 Thread Alexandre Belloni via lists.openembedded.org
Hello,

On 09/08/2023 00:02:08+0100, Jose Quaresma wrote:
> Ping!

We developed the same patch at the same time, I confirm yours is working
but it was not enough to solve all the systemd v254 related issues. I've
just sent the hopefully last patch to fix the remaining issue.

> 
> Jose Quaresma via lists.openembedded.org  gmail@lists.openembedded.org> escreveu no dia segunda, 7/08/2023 à(s)
> 15:26:
> 
> > Last version of systemd dpends now on pyelftools to build the efi support
> > but the required tool is the native ones and not the target.
> > The systemd-boot has the corrected dependencie so fix this in the main
> > recipe.
> >
> > | Program python3 (jinja2) found: YES
> > (/build/tmp-lmp/work/corei7-64-lmp-linux/systemd/1_254-r0/recipe-sysroot-native/usr/bin/python3-native/python3)
> > modules: jinja2
> > | Checking if "32bit build possible" : links: NO
> > | Program python3 (elftools) found: NO
> > |
> > | ../git/meson.build:2147:8: ERROR: Problem encountered: EFI bootloader
> > support requires pyelftools.
> > |
> > | A full log can be found at
> > /build/tmp-lmp/work/corei7-64-lmp-linux/systemd/1_254-r0/build/meson-logs/meson-log.txt
> >
> > Signed-off-by: Jose Quaresma 
> > ---
> >  meta/recipes-core/systemd/systemd_254.bb | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-core/systemd/systemd_254.bb
> > b/meta/recipes-core/systemd/systemd_254.bb
> > index ea1a4f02f0..cd2a021da2 100644
> > --- a/meta/recipes-core/systemd/systemd_254.bb
> > +++ b/meta/recipes-core/systemd/systemd_254.bb
> > @@ -142,7 +142,7 @@ PACKAGECONFIG[default-compression-lz4] = "-Dlz4=true
> > -Ddefault-compression=lz4,,
> >  PACKAGECONFIG[default-compression-xz] = "-Dxz=true
> > -Ddefault-compression=xz,,xz"
> >  PACKAGECONFIG[default-compression-zstd] = "-Dzstd=true
> > -Ddefault-compression=zstd,,zstd"
> >  PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
> > -PACKAGECONFIG[efi] = "-Defi=true -Dbootloader=true,-Defi=false
> > -Dbootloader=false,python3-pyelftools"
> > +PACKAGECONFIG[efi] = "-Defi=true -Dbootloader=true,-Defi=false
> > -Dbootloader=false,python3-pyelftools-native"
> >  PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
> >  PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
> >  PACKAGECONFIG[repart] = "-Drepart=true,-Drepart=false"
> > --
> > 2.34.1
> >
> >
> > 
> >
> >
> 
> -- 
> Best regards,
> 
> José Quaresma

> 
> 
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185715): 
https://lists.openembedded.org/g/openembedded-core/message/185715
Mute This Topic: https://lists.openembedded.org/mt/100600508/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] wic: bootimg-efi: Stop hardcoding VMA offsets

2023-08-09 Thread Alexandre Belloni via lists.openembedded.org
From: Alexandre Belloni 

Section VMA's are currently hardcoded. This doesn't work anymore starting
with systemd-boot v254.

Follow the actually solution to this which is documented here:
https://wiki.archlinux.org/title/Unified_kernel_image#Manually

This is also used by dracut. Later on, we may want to switch to ukify
instead but this is not ready yet.

Signed-off-by: Alexandre Belloni 
---
 scripts/lib/wic/plugins/source/bootimg-efi.py | 63 ++-
 1 file changed, 49 insertions(+), 14 deletions(-)

diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py 
b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 2bf737588753..4f30926f1ad7 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -332,37 +332,72 @@ class BootimgEFIPlugin(SourcePlugin):
 shutil.copyfileobj(in_file, initrd)
 initrd.close()
 
+# Searched by systemd-boot:
+# 
https://systemd.io/BOOT_LOADER_SPECIFICATION/#type-2-efi-unified-kernel-images
+install_cmd = "install -d %s/EFI/Linux" % hdddir
+exec_cmd(install_cmd)
+
+staging_dir_host = get_bitbake_var("STAGING_DIR_HOST")
+target_sys = get_bitbake_var("TARGET_SYS")
+
+objdump_cmd = "%s-objdump" % target_sys
+objdump_cmd += " -p %s" % efi_stub
+objdump_cmd += " | awk '{ if ($1 == 
\"SectionAlignment\"){print $2} }'"
+
+ret, align_str = exec_native_cmd(objdump_cmd, native_sysroot)
+align = int(align_str, 16)
+
+objdump_cmd = "%s-objdump" % target_sys
+objdump_cmd += " -h %s | tail -2" % efi_stub
+ret, output = exec_native_cmd(objdump_cmd, native_sysroot)
+
+offset = int(output.split()[2], 16) + int(output.split()[3], 
16)
+
+osrel_off = offset + align - offset % align
+osrel_path = "%s/usr/lib/os-release" % staging_dir_host
+osrel_sz = os.stat(osrel_path).st_size
+
+cmdline_off = osrel_off + osrel_sz
+cmdline_off = cmdline_off + align - cmdline_off % align
+cmdline_sz = os.stat(cmdline.name).st_size
+
+dtb_off = cmdline_off + cmdline_sz
+dtb_off = dtb_off + align - dtb_off % align
+
 dtb = source_params.get('dtb')
 if dtb:
 if ';' in dtb:
 raise WicError("Only one DTB supported, exiting")
-dtb_params = '--add-section .dtb=%s/%s 
--change-section-vma .dtb=0x4' % \
-(deploy_dir, dtb)
+dtb_path = "%s/%s" % (deploy_dir, dtb)
+dtb_params = '--add-section .dtb=%s --change-section-vma 
.dtb=0x%x' % \
+(dtb_path, dtb_off)
+linux_off = dtb_off + os.stat(dtb_path).st_size
+linux_off = linux_off + align - linux_off % align
 else:
 dtb_params = ''
+linux_off = dtb_off
 
-# Searched by systemd-boot:
-# 
https://systemd.io/BOOT_LOADER_SPECIFICATION/#type-2-efi-unified-kernel-images
-install_cmd = "install -d %s/EFI/Linux" % hdddir
-exec_cmd(install_cmd)
+linux_path = "%s/%s" % (staging_kernel_dir, kernel)
+linux_sz = os.stat(linux_path).st_size
 
-staging_dir_host = get_bitbake_var("STAGING_DIR_HOST")
-target_sys = get_bitbake_var("TARGET_SYS")
+initrd_off = linux_off + linux_sz
+initrd_off = initrd_off + align - initrd_off % align
 
 # 
https://www.freedesktop.org/software/systemd/man/systemd-stub.html
 objcopy_cmd = "%s-objcopy" % target_sys
 objcopy_cmd += " --enable-deterministic-archives"
 objcopy_cmd += " --preserve-dates"
-objcopy_cmd += " --add-section .osrel=%s/usr/lib/os-release" % 
staging_dir_host
-objcopy_cmd += " --change-section-vma .osrel=0x2"
+objcopy_cmd += " --add-section .osrel=%s" % osrel_path
+objcopy_cmd += " --change-section-vma .osrel=0x%x" % osrel_off
 objcopy_cmd += " --add-section .cmdline=%s" % cmdline.name
-objcopy_cmd += " --change-section-vma .cmdline=0x3"
+objcopy_cmd += " --change-section-vma .cmdline=0x%x" % 
cmdline_off
 objcopy_cmd += dtb_params
-objcopy_cmd += " --add-section .linux=%s/%s" % 
(staging_kernel_dir, kernel)
-objcopy_cmd += " --change-section-vma .linux=0x200"
+objcopy_cmd += " --add-section .linux=%s" % linux_path
+objcopy_cmd += " --change-section-vma .linux=0x%x" % linux_off
 

Re: [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation

2023-08-09 Thread Khem Raj
On Wed, Aug 9, 2023 at 7:49 AM Ross Burton  wrote:
>
> On 9 Aug 2023, at 07:47, Alexander Kanavin via lists.openembedded.org 
>  wrote:
> >> Ideally we only want the verbosity when something goes wrong and meson 
> >> ninja etc are good at that with their defaults perhaps that -v should be 
> >> turned off by default as well
> >
> > Absolutely not. As someone who spends a lot of time fixing build and
> > runtime failures across all of oe-core I beg to differ. I want
> > verbosity all the time, everywhere. I also do not want to spend a
> > second figuring out how to switch it on (it's different everywhere
> > too), or to run another build just to get the verbose logs out of it.
>
> Agreed with Alex.
>
> Unless Ninja is clever enough to emit the full log for _every_ build step 
> that was involved in the failure, I definitely always want verbose logs.

I found Ninja defaults are good for debugging build failures, I deal
with this on large projects like chromium and clang often, Most of the
time I want to get to the error quickly
and have command to reproduce the one compile failure or other steps
and they are emitted in full while succeeding steps are curtailed and
most of the time that is what
one needs to solve build issues. verbose logs for such large projects
are huge, need space and time to generate them, I understand the view
of people who fix
build issues on daily bases, Most of the time builds succeed so its
important to keep that also in consideration. Perhaps it could be a
global option which could be
default verbose and opted-out if build modes chose to do so.

>
> For what it’s worth this made me look at the recipe to see why it has to 
> define do_compile, and I ended up extending meson.bbclass making this patch 
> redundant.

Thats good.

>
> Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185713): 
https://lists.openembedded.org/g/openembedded-core/message/185713
Mute This Topic: https://lists.openembedded.org/mt/100625045/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation

2023-08-09 Thread Jose Quaresma
Ross Burton  escreveu no dia quarta, 9/08/2023 à(s)
15:49:

> On 9 Aug 2023, at 07:47, Alexander Kanavin via lists.openembedded.org
>  wrote:
> >> Ideally we only want the verbosity when something goes wrong and meson
> ninja etc are good at that with their defaults perhaps that -v should be
> turned off by default as well
> >
> > Absolutely not. As someone who spends a lot of time fixing build and
> > runtime failures across all of oe-core I beg to differ. I want
> > verbosity all the time, everywhere. I also do not want to spend a
> > second figuring out how to switch it on (it's different everywhere
> > too), or to run another build just to get the verbose logs out of it.
>
> Agreed with Alex.
>
> Unless Ninja is clever enough to emit the full log for _every_ build step
> that was involved in the failure, I definitely always want verbose logs.
>
> For what it’s worth this made me look at the recipe to see why it has to
> define do_compile, and I ended up extending meson.bbclass making this patch
> redundant.
>
> Ross


I also prefer to have the verbose enabled everywhere so the bitbake logs
have more details when debug is needed.
The Ross patch includes everything we need, thanks for looking at that.
Please drop this one.

Jose

-- 
Best regards,

José Quaresma

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185712): 
https://lists.openembedded.org/g/openembedded-core/message/185712
Mute This Topic: https://lists.openembedded.org/mt/100625045/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v8] systemd: update to v254

2023-08-09 Thread Luca Bocassi
On Tue, 8 Aug 2023 at 17:10, Jose Quaresma  wrote:
>
>
> With this adictional patch 
> https://lists.openembedded.org/g/openembedded-core/message/185666
> the stub looks good again.

Yeah that sounds about right. That patch was also backported to the
newly minted 254.1.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185711): 
https://lists.openembedded.org/g/openembedded-core/message/185711
Mute This Topic: https://lists.openembedded.org/mt/100516497/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation

2023-08-09 Thread Ross Burton
On 9 Aug 2023, at 07:47, Alexander Kanavin via lists.openembedded.org 
 wrote:
>> Ideally we only want the verbosity when something goes wrong and meson ninja 
>> etc are good at that with their defaults perhaps that -v should be turned 
>> off by default as well
> 
> Absolutely not. As someone who spends a lot of time fixing build and
> runtime failures across all of oe-core I beg to differ. I want
> verbosity all the time, everywhere. I also do not want to spend a
> second figuring out how to switch it on (it's different everywhere
> too), or to run another build just to get the verbose logs out of it.

Agreed with Alex.

Unless Ninja is clever enough to emit the full log for _every_ build step that 
was involved in the failure, I definitely always want verbose logs.

For what it’s worth this made me look at the recipe to see why it has to define 
do_compile, and I ended up extending meson.bbclass making this patch redundant.

Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185709): 
https://lists.openembedded.org/g/openembedded-core/message/185709
Mute This Topic: https://lists.openembedded.org/mt/100625045/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 4/4] systemd-boot: improve cross file generation

2023-08-09 Thread Ross Burton
From: Ross Burton 

The meson.cross generated by the class already has c and objcopy
entries, so these can be removed.

Pass the --cross-file option in MESON_CROSS_FILE to ensure the ordering
is always correct.

Signed-off-by: Ross Burton 
---
 meta/recipes-core/systemd/systemd-boot_254.bb | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd-boot_254.bb 
b/meta/recipes-core/systemd/systemd-boot_254.bb
index a490c0328e6..c32aa0ae125 100644
--- a/meta/recipes-core/systemd/systemd-boot_254.bb
+++ b/meta/recipes-core/systemd/systemd-boot_254.bb
@@ -12,22 +12,21 @@ LDFLAGS:prepend = "${@ " 
".join(d.getVar('LD').split()[1:])} "
 
 EFI_LD = "bfd"
 
-do_write_config[vardeps] += "CC OBJCOPY EFI_LD"
+do_write_config[vardeps] += "EFI_LD"
 do_write_config:append() {
 cat >${WORKDIR}/meson-${PN}.cross <
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185708): 
https://lists.openembedded.org/g/openembedded-core/message/185708
Mute This Topic: https://lists.openembedded.org/mt/100644366/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 3/4] systemd-boot: use MESON_TARGET

2023-08-09 Thread Ross Burton
From: Ross Burton 

Instead of re-implementing do_compile, use MESON_TARGET.

Signed-off-by: Ross Burton 
---
 meta/recipes-core/systemd/systemd-boot_254.bb | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd-boot_254.bb 
b/meta/recipes-core/systemd/systemd-boot_254.bb
index e887e636e86..a490c0328e6 100644
--- a/meta/recipes-core/systemd/systemd-boot_254.bb
+++ b/meta/recipes-core/systemd/systemd-boot_254.bb
@@ -22,6 +22,8 @@ c_ld = ${@meson_array('EFI_LD', d)}
 EOF
 }
 
+MESON_TARGET = "systemd-boot"
+
 EXTRA_OEMESON += "-Defi=true \
   -Dbootloader=true \
   -Dman=false \
@@ -51,10 +53,6 @@ TUNE_CCARGS:remove = "-mfpmath=sse"
 COMPATIBLE_HOST = "(aarch64.*|arm.*|x86_64.*|i.86.*)-linux"
 COMPATIBLE_HOST:x86-x32 = "null"
 
-do_compile() {
-   ninja systemd-boot
-}
-
 do_install() {
install -d ${D}${EFI_FILES_PATH}
install ${B}/src/boot/efi/systemd-boot*.efi 
${D}${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185707): 
https://lists.openembedded.org/g/openembedded-core/message/185707
Mute This Topic: https://lists.openembedded.org/mt/100644365/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 1/4] meson.bbclass: add MESON_TARGET

2023-08-09 Thread Ross Burton
From: Ross Burton 

Add a variable to control what target gets built in do_compile.  By
default this value is unset so meson builds the default target, but by
setting MESON_TARGET a specific target can be built.

Signed-off-by: Ross Burton 
---
 meta/classes-recipe/meson.bbclass | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes-recipe/meson.bbclass 
b/meta/classes-recipe/meson.bbclass
index 7f5e9b19433..582b41a91b1 100644
--- a/meta/classes-recipe/meson.bbclass
+++ b/meta/classes-recipe/meson.bbclass
@@ -20,6 +20,9 @@ do_configure[cleandirs] = "${B}"
 # Where the meson.build build configuration is
 MESON_SOURCEPATH = "${S}"
 
+# The target to build in do_compile. If unset the default targets are built.
+MESON_TARGET ?= ""
+
 def noprefix(var, d):
 return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1)
 
@@ -170,7 +173,7 @@ do_configure[postfuncs] += "meson_do_qa_configure"
 
 do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+"
 meson_do_compile() {
-meson compile -v ${PARALLEL_MAKE}
+meson compile -v ${PARALLEL_MAKE} ${MESON_TARGET}
 }
 
 meson_do_install() {
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185705): 
https://lists.openembedded.org/g/openembedded-core/message/185705
Mute This Topic: https://lists.openembedded.org/mt/100644363/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 2/4] meson.bbclass:: update do_write_config vardeps

2023-08-09 Thread Ross Burton
From: Ross Burton 

Add OBJCOPY and EXEWRAPPER_ENABLED, remove LD as it isn't used anymore.

Signed-off-by: Ross Burton 
---
 meta/classes-recipe/meson.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-recipe/meson.bbclass 
b/meta/classes-recipe/meson.bbclass
index 582b41a91b1..d08a83d555f 100644
--- a/meta/classes-recipe/meson.bbclass
+++ b/meta/classes-recipe/meson.bbclass
@@ -61,7 +61,7 @@ def rust_tool(d, target_var):
 return "rust = %s" % repr(cmd)
 
 addtask write_config before do_configure
-do_write_config[vardeps] += "CC CXX LD AR NM STRIP READELF CFLAGS CXXFLAGS 
LDFLAGS RUSTC RUSTFLAGS"
+do_write_config[vardeps] += "CC CXX AR NM STRIP READELF OBJCOPY CFLAGS 
CXXFLAGS LDFLAGS RUSTC RUSTFLAGS EXEWRAPPER_ENABLED"
 do_write_config() {
 # This needs to be Py to split the args into single-element lists
 cat >${WORKDIR}/meson.cross <
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185706): 
https://lists.openembedded.org/g/openembedded-core/message/185706
Mute This Topic: https://lists.openembedded.org/mt/100644364/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] linux-yocto-tiny/6.4: fix HID configuration warning

2023-08-09 Thread Bruce Ashfield
From: Bruce Ashfield 

Integrating the following commit(s):

88ed9ec4909 qemuarm(a15): fix HID warnings in -tiny

During the update to 6.4, qemuarm was missed when updating the HID
configuration to avoid the following warning:

   WARNING: linux-yocto-tiny-6.4.9+gitAUTOINC+8dc4f68eb8_72bad8cd75-r0
   do_kernel_configcheck: [kernel config]: specified values did not make it
   into the kernel's final configuration:

   [NOTE]: 'CONFIG_USB_HID' last val (y) and .config val (n) do not match
   [INFO]: CONFIG_USB_HID : n
   [INFO]: raw config text:

   config USB_HID
   tristate "USB HID transport layer"
   default y
   select HID
   depends on USB && INPUT && USB && HID_SUPPORT
   help
 Say Y here if you want to connect USB keyboards,
 mice, joysticks, graphic tablets, or any other HID based 
devices
 to your computer via USB, as well as Uninterruptible Power 
Supply
 (UPS) and monitor control devices.

 You can't use this driver and the HIDBP (Boot Protocol) 
keyboard
 and mouse drivers at the same time. More information is 
available:
 .

 If unsure, say Y.

 To compile this driver as a module, choose M here: the
 module will be called usbhid.

   Config 'USB_HID' has the following Direct dependencies (USB_HID=n):
   USB(=y) && INPUT(=y) && HID_SUPPORT(=n)
   Parent dependencies are:
USB [y] HID_SUPPORT [n] INPUT [y]
   [INFO]: config 'CONFIG_USB_HID' was set, but it wasn't assignable, check 
(parent) dependencies

Signed-off-by: Bruce Ashfield 
---

Apply this to the end of all my current 6.4 -stable and config patches
to remove the qemuarm config audit warning.

Bruce

 meta/recipes-kernel/linux/linux-yocto-rt_6.4.bb   | 2 +-
 meta/recipes-kernel/linux/linux-yocto-tiny_6.4.bb | 2 +-
 meta/recipes-kernel/linux/linux-yocto_6.4.bb  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_6.4.bb 
b/meta/recipes-kernel/linux/linux-yocto-rt_6.4.bb
index 8cc39faf9c..2f051844d8 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_6.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_6.4.bb
@@ -15,7 +15,7 @@ python () {
 }
 
 SRCREV_machine ?= "121d700ad4b877fab9238a92356ad32506ef70d5"
-SRCREV_meta ?= "8dc4f68eb852784a5bc82d30768ac3276c890754"
+SRCREV_meta ?= "88ed9ec49099d69f9546d21137191fd747d06ec4"
 
 SRC_URI = 
"git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https
 \

git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.4;destsuffix=${KMETA};protocol=https"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_6.4.bb 
b/meta/recipes-kernel/linux/linux-yocto-tiny_6.4.bb
index 834d07be48..64dfb3a379 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_6.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_6.4.bb
@@ -18,7 +18,7 @@ KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
 SRCREV_machine ?= "72bad8cd7540f07ab54e08b83ad106dec0df123c"
-SRCREV_meta ?= "8dc4f68eb852784a5bc82d30768ac3276c890754"
+SRCREV_meta ?= "88ed9ec49099d69f9546d21137191fd747d06ec4"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/meta/recipes-kernel/linux/linux-yocto_6.4.bb 
b/meta/recipes-kernel/linux/linux-yocto_6.4.bb
index 4deb7bc537..4b853122b8 100644
--- a/meta/recipes-kernel/linux/linux-yocto_6.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_6.4.bb
@@ -28,7 +28,7 @@ SRCREV_machine:qemux86 ?= 
"72bad8cd7540f07ab54e08b83ad106dec0df123c"
 SRCREV_machine:qemux86-64 ?= "72bad8cd7540f07ab54e08b83ad106dec0df123c"
 SRCREV_machine:qemumips64 ?= "47d7881e76d678cc9dc034f0acdd1bc416fa05bb"
 SRCREV_machine ?= "72bad8cd7540f07ab54e08b83ad106dec0df123c"
-SRCREV_meta ?= "8dc4f68eb852784a5bc82d30768ac3276c890754"
+SRCREV_meta ?= "88ed9ec49099d69f9546d21137191fd747d06ec4"
 
 # set your preferred provider of linux-yocto to 'linux-yocto-upstream', and 
you'll
 # get the /base branch, which is pure upstream -stable, and the same
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185704): 
https://lists.openembedded.org/g/openembedded-core/message/185704
Mute This Topic: https://lists.openembedded.org/mt/100643856/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] connman-conf: don't take over any ethernet devices, not just eth0

2023-08-09 Thread Ross Burton
From: Ross Burton 

The goal of connman-conf in qemu environments is to stop connman from
trying to control the network device, because runqemu will set it up
appropriately.

It currently hardcodes eth0, but 6.2 kernels onwards will rename eth0 to
en* even when the interface is already up[1]. So that this recipe
continues to work as intended, expand the list to "eth,en" so that
connman ignores _all_ ethernet devices with either the new or old names.

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=bd039b5ea2a91ea707ee8539df26456bd5be80af

Signed-off-by: Ross Burton 
---
 meta/recipes-connectivity/connman/connman-conf/main.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/connman/connman-conf/main.conf 
b/meta/recipes-connectivity/connman/connman-conf/main.conf
index a394e8f25bd..3c9dd396f66 100644
--- a/meta/recipes-connectivity/connman/connman-conf/main.conf
+++ b/meta/recipes-connectivity/connman/connman-conf/main.conf
@@ -1,2 +1,2 @@
 [General]
-NetworkInterfaceBlacklist = eth0
+NetworkInterfaceBlacklist = eth,en
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185703): 
https://lists.openembedded.org/g/openembedded-core/message/185703
Mute This Topic: https://lists.openembedded.org/mt/100643481/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] rust-target-config: fix target_features for vfpv3d16

2023-08-09 Thread Benjamin Bara
From: Benjamin Bara 

A build with vfpv3d16 (armv7at2hf-vfpv3d16) tune currently warns:
'+d16' is not a recognized feature for this target (ignoring feature)

This correlates with the supported target_features for arm[1].

With the now enabled features, rustc might use vdiv.f64 with register
d17, which leads to an illegal instruction on the given platform.

Therefore, adapt the features s.t. they correspond to the
armv7_unknown_linux_gnueabihf target[2].

Additionally, only set the latest supported version of VFP.

[1] 
https://github.com/rust-lang/rust/blob/1.70.0/compiler/rustc_codegen_ssa/src/target_features.rs#L32
[2] 
https://github.com/rust-lang/rust/blob/1.70.0/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs#L15

Signed-off-by: Benjamin Bara 
---
v2:
- move armv7 check back
- only add '-neon' on armv7
- only set latest supported VFP version
- Link to v1: 
https://lore.kernel.org/r/20230802-rust-vfpv3d16-v1-1-9af645a4b...@skidata.com
---
 meta/classes-recipe/rust-target-config.bbclass | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/meta/classes-recipe/rust-target-config.bbclass 
b/meta/classes-recipe/rust-target-config.bbclass
index 21a56ede3e..9aa1fc4da5 100644
--- a/meta/classes-recipe/rust-target-config.bbclass
+++ b/meta/classes-recipe/rust-target-config.bbclass
@@ -21,16 +21,18 @@ def llvm_features_from_tune(d):
 
 if 'vfpv4' in feat:
 f.append("+vfp4")
-if 'vfpv3' in feat:
+elif 'vfpv3' in feat:
 f.append("+vfp3")
-if 'vfpv3d16' in feat:
-f.append("+d16")
-
-if 'vfpv2' in feat or 'vfp' in feat:
+elif 'vfpv3d16' in feat:
+f.append("+vfp3")
+f.append("-d32")
+elif 'vfpv2' in feat or 'vfp' in feat:
 f.append("+vfp2")
 
 if 'neon' in feat:
 f.append("+neon")
+elif target_is_armv7(d):
+f.append("-neon")
 
 if 'mips32' in feat:
 f.append("+mips32")

---
base-commit: 46f938bbd3a143d38c5a67cfd781f19c22664c57
change-id: 20230801-rust-vfpv3d16-a65080a9bcfa

Best regards,
-- 
Benjamin Bara 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185702): 
https://lists.openembedded.org/g/openembedded-core/message/185702
Mute This Topic: https://lists.openembedded.org/mt/100642365/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [dunfell] [PATCH] qemu: CVE-ID correction for CVE-2020-35505

2023-08-09 Thread Emily.Vekariya via lists.openembedded.org
From: Emily Vekariya 

- The commit [https://github.com/qemu/qemu/commit/995457517340]
  ("esp: ensure cmdfifo is not empty and current_dev is non-NULL")
  fixes CVE-2020-35505 instead of CVE-2020-35504.
- Hence, corrected the CVE-ID in CVE-2020-35505.patch.
- Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1909769

Signed-off-by: Emily Vekariya 
---
 meta/recipes-devtools/qemu/qemu/CVE-2020-35505.patch | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2020-35505.patch 
b/meta/recipes-devtools/qemu/qemu/CVE-2020-35505.patch
index c5ff6e89ff..40c0b1e74f 100644
--- a/meta/recipes-devtools/qemu/qemu/CVE-2020-35505.patch
+++ b/meta/recipes-devtools/qemu/qemu/CVE-2020-35505.patch
@@ -20,16 +20,19 @@ Reviewed-by: Philippe Mathieu-Daudé 
 Tested-by: Alexander Bulekov 
 Message-Id: <20210407195801.685-7-mark.cave-ayl...@ilande.co.uk>
 
-CVE: CVE-2020-35504
+CVE: CVE-2020-35505
 Upstream-Status: Backport [import from ubuntu 
https://git.launchpad.net/ubuntu/+source/qemu/tree/debian/patches/CVE-2020-35505.patch?h=ubuntu/focal-security
 Upstream commit 
https://github.com/qemu/qemu/commit/99545751734035b76bd372c4e7215bb337428d89  ]
 Signed-off-by: Chee Yang Lee 
+Signed-off-by: Emily Vekariya 
 ---
- hw/scsi/esp.c | 3 +++
- 1 file changed, 3 insertions(+)
+ hw/scsi/esp.c | 4 
+ 1 file changed, 4 insertions(+)
 
+diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
+index c7d701bf..c2a67bc8 100644
 --- a/hw/scsi/esp.c
 +++ b/hw/scsi/esp.c
-@@ -193,6 +193,10 @@ static void do_busid_cmd(ESPState *s, ui
+@@ -193,6 +193,10 @@ static void do_busid_cmd(ESPState *s, uint8_t *buf, 
uint8_t busid)
  
  trace_esp_do_busid_cmd(busid);
  lun = busid & 7;
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185701): 
https://lists.openembedded.org/g/openembedded-core/message/185701
Mute This Topic: https://lists.openembedded.org/mt/100641821/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 0/7] linux-yocto: consolidated kernel pull request

2023-08-09 Thread Bruce Ashfield
On Tue, Aug 8, 2023 at 11:36 PM Bruce Ashfield via
lists.openembedded.org
 wrote:
>
> On Tue, Aug 8, 2023 at 4:49 PM Alexandre Belloni
>  wrote:
> >
> > On 08/08/2023 13:09:50-0400, Bruce Ashfield wrote:
> > > On Tue, Aug 8, 2023 at 8:49 AM Bruce Ashfield via
> > > lists.openembedded.org
> > >  wrote:
> > > >
> > > > On Tue, Aug 8, 2023 at 6:43 AM Alexandre Belloni
> > > >  wrote:
> > > > >
> > > > > Hello Bruce,
> > > > >
> > > > > While I didn't test this series yet, as discussed, I've tried to 
> > > > > switch
> > > > > to 6.4 by default. I got this warning:
> > > >
> > > > -tiny was clean here, but let me re-test and see if I've missed
> > > > sending something in my 6.4 SRCREV bumps.
> > > >
> > >
> > > Which Machine is this ? (I always have a hard time figuring that out
> > > .. sad, I know).
> > >
> >
> > This was qemuarm.
> >
>
> Ack'd.
>
> I tested that config before sending the new recipes, but I've started
> a new build with my latest and qemuarm.
>
> I'll follow up on Wednesday when I know more.

confirmed, I can reproduce the issue. I'll send a patch later today.

Bruce

>
> Bruce
>
> > > I have this series of commits:
> > >
> > > commit fa08cd6bd6f9415c91da0dd72f4338bff3c68c68
> > > Author: Bruce Ashfield 
> > > Date:   Mon Jul 10 11:21:58 2023 -0400
> > >
> > > tiny: enable HID in tiny BSPs
> > >
> > > HID is no longer selected, so to avoid -tiny warnings we need to
> > > explicitly enable it in more -tiny BSPs.
> > >
> > > Signed-off-by: Bruce Ashfield 
> > >
> > > :100644 100644 0fa5dae7ec9 51d597039c3 M
> > > bsp/arm-versatile-926ejs/arm-versatile-926ejs-tiny.scc
> > > :100644 100644 e4928b43416 5fdb341638a M
> > > bsp/qemuarm64/qemuarm64-tiny.scc
> > >
> > > commit 4655de57a68a86e651fcea2eb2c7e88f3de3bbfb
> > > Author: Bruce Ashfield 
> > > Date:   Fri Jul 7 14:00:08 2023 -0400
> > >
> > > common-pc-64/tiny: enable HID by default
> > >
> > > Signed-off-by: Bruce Ashfield 
> > >
> > > :100644 100644 7fcac7fd54a 0d083b0d2a5 M
> > > bsp/common-pc-64/common-pc-64-tiny.scc
> > >
> > > commit 252c55e236cb46860bae0fd1b1e0641e6e8dd512
> > > Author: Bruce Ashfield 
> > > Date:   Fri Jul 7 10:39:41 2023 -0400
> > >
> > > common-pc/tiny: enable HID by default
> > >
> > > Signed-off-by: Bruce Ashfield 
> > >
> > > :100644 100644 687414ae671 9fe725ac450 M
> > > bsp/common-pc/common-pc-tiny.scc
> > >
> > > commit 849f920aa1b7c76c0be6c1054c5efb758ca07600
> > > Author: Bruce Ashfield 
> > > Date:   Fri Jul 7 10:36:39 2023 -0400
> > >
> > > cfg: add CONFIG_HID base fragment
> > >
> > > When testing the -tiny kernel against v6.4, configuration warnings
> > > were noticed as CONFIG_HID is disabled by our baseline allnoconfig.
> > >
> > > We have BSPs that require HID support for drivers, and they will
> > > warn when building a -tiny variant.
> > >
> > > Introducing a HID base fragment so they can share the enabling of
> > > these options as required.
> > >
> > > Signed-off-by: Bruce Ashfield 
> > >
> > > :00 100644 000 cfd84dbda45 Afeatures/hid/hid.cfg
> > > :00 100644 000 28d242df7ad Afeatures/hid/hid.scc
> > >
> > > But if this is showing up on the AB, I must have missed an instance.
> > >
> > > My test build was just clean.
> > >
> > > Bruce
> > >
> > >
> > > > Bruce
> > > >
> > > > >
> > > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/15/builds/7876/steps/13/logs/stdio
> > > > >
> > > > > WARNING: linux-yocto-tiny-6.4.3+gitAUTOINC+dab56f52aa_dee78ad196-r0 
> > > > > do_kernel_configcheck: [kernel config]: specified values did not make 
> > > > > it into the kernel's final configuration:
> > > > > [NOTE]: 'CONFIG_USB_HID' last val (y) and .config val (n) do not 
> > > > > match
> > > > > [INFO]: CONFIG_USB_HID : n
> > > > > [INFO]: raw config text:
> > > > > config USB_HID
> > > > > tristate "USB HID transport layer"
> > > > > default y
> > > > > select HID
> > > > > depends on USB && INPUT && USB && HID_SUPPORT
> > > > > help
> > > > >   Say Y here if you want to connect USB keyboards,
> > > > >   mice, joysticks, graphic tablets, or any other HID 
> > > > > based devices
> > > > >   to your computer via USB, as well as 
> > > > > Uninterruptible Power Supply
> > > > >   (UPS) and monitor control devices.
> > > > >
> > > > >   You can't use this driver and the HIDBP (Boot 
> > > > > Protocol) keyboard
> > > > >   and mouse drivers at the same time. More 
> > > > > information is available:
> > > > >   .
> > > > >
> > > > >   If unsure, say Y.
> > > > >
> > > > >   To compile this driver as a module, choose M here: 
> > > > > the
> > > > >   module will be called usbhid.
> > > > > Config 'USB_HID' has the 

Re: [OE-core] [PATCH v2] kea: upgrade to v2.5.0

2023-08-09 Thread Alexander Kanavin
On Wed, 9 Aug 2023 at 14:20, Sudip Mukherjee  wrote:

> > I suppose they will do that once someone reads the issue, until then
> > you can refer to the ticket in oe-core submission (but pls roll back
> > to 2.4.x).
>
> v2.4 will also have the same problem. This change was introduced in
> v2.3, so anything v2.2+ will have the problem.
> Anyways, I will resubmit the upgrade patch here after upstream has
> resolved the problem.

You don't need to wait. You can backport to 2.4 what you submitted in
the ticket.

We generally trust that people who submit patches will carry them to
upstream merge, adjusting and interacting with upstream as needed.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185699): 
https://lists.openembedded.org/g/openembedded-core/message/185699
Mute This Topic: https://lists.openembedded.org/mt/100639240/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] kea: upgrade to v2.5.0

2023-08-09 Thread Sudip Mukherjee
On Wed, 9 Aug 2023 at 12:21, Alexander Kanavin  wrote:
>
> On Wed, 9 Aug 2023 at 13:08, Sudip Mukherjee  
> wrote:
> > There seems to be no way to submit a MR or patch. I have used another
> > email (non-gmail) to register, but it did not allow me to fork and
> > raise MR. So I have opened an issue -
> > https://gitlab.isc.org/isc-projects/kea/-/issues/3007
>
> https://gitlab.isc.org/isc-projects/kea/-/blob/master/CONTRIBUTING.md
> explains how to do it. The key step is:
>
> "ask someone from the ISC team to give you permission to fork Kea (ask
> @tomek, @vicky, @ondrej or @godfryd or basically anyone from the Kea
> dev team)"
>
> I suppose they will do that once someone reads the issue, until then
> you can refer to the ticket in oe-core submission (but pls roll back
> to 2.4.x).

v2.4 will also have the same problem. This change was introduced in
v2.3, so anything v2.2+ will have the problem.
Anyways, I will resubmit the upgrade patch here after upstream has
resolved the problem.


-- 
Regards
Sudip

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185698): 
https://lists.openembedded.org/g/openembedded-core/message/185698
Mute This Topic: https://lists.openembedded.org/mt/100639240/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] kea: upgrade to v2.5.0

2023-08-09 Thread Alexander Kanavin
On Wed, 9 Aug 2023 at 13:08, Sudip Mukherjee  wrote:
> There seems to be no way to submit a MR or patch. I have used another
> email (non-gmail) to register, but it did not allow me to fork and
> raise MR. So I have opened an issue -
> https://gitlab.isc.org/isc-projects/kea/-/issues/3007

https://gitlab.isc.org/isc-projects/kea/-/blob/master/CONTRIBUTING.md
explains how to do it. The key step is:

"ask someone from the ISC team to give you permission to fork Kea (ask
@tomek, @vicky, @ondrej or @godfryd or basically anyone from the Kea
dev team)"

I suppose they will do that once someone reads the issue, until then
you can refer to the ticket in oe-core submission (but pls roll back
to 2.4.x).

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185697): 
https://lists.openembedded.org/g/openembedded-core/message/185697
Mute This Topic: https://lists.openembedded.org/mt/100639240/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] kea: upgrade to v2.5.0

2023-08-09 Thread Sudip Mukherjee
On Wed, 9 Aug 2023 at 11:22, Alexander Kanavin  wrote:
>
> On Wed, 9 Aug 2023 at 12:05, Sudip Mukherjee  
> wrote:
> > Yeah, I know and I always try to send any patches upstream first.
> > But in this case there seems to be no way to do it.
> >
> > I have tried with https://gitlab.isc.org/isc-projects/kea/ but they
> > are not allowing gmail
> > or any non-corporate email address to register or login. Also tried to
> > login via authenticating
> > with gitlab/github but that also did not work.
>
> I just managed to log in with github authentication, so if you can try
> from a different ISP, I'd appreciate.

There seems to be no way to submit a MR or patch. I have used another
email (non-gmail) to register, but it did not allow me to fork and
raise MR. So I have opened an issue -
https://gitlab.isc.org/isc-projects/kea/-/issues/3007


-- 
Regards
Sudip

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185696): 
https://lists.openembedded.org/g/openembedded-core/message/185696
Mute This Topic: https://lists.openembedded.org/mt/100639240/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] kea: upgrade to v2.5.0

2023-08-09 Thread Alexander Kanavin
On Wed, 9 Aug 2023 at 12:05, Sudip Mukherjee  wrote:
> Yeah, I know and I always try to send any patches upstream first.
> But in this case there seems to be no way to do it.
>
> I have tried with https://gitlab.isc.org/isc-projects/kea/ but they
> are not allowing gmail
> or any non-corporate email address to register or login. Also tried to
> login via authenticating
> with gitlab/github but that also did not work.

I just managed to log in with github authentication, so if you can try
from a different ISP, I'd appreciate.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185695): 
https://lists.openembedded.org/g/openembedded-core/message/185695
Mute This Topic: https://lists.openembedded.org/mt/100639240/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] kea: upgrade to v2.5.0

2023-08-09 Thread Sudip Mukherjee
Hi Alex,

On Wed, 9 Aug 2023 at 09:55, Alexander Kanavin  wrote:
>
> On Wed, 9 Aug 2023 at 10:45, Sudip Mukherjee  
> wrote:
> >  .../kea/{kea_2.2.0.bb => kea_2.5.0.bb}|  5 +-
>
> 2.5.0 is a development series. The update should be to 2.4.x instead
> which is stable.
> https://kb.isc.org/docs/aa-00896#kea-updated-as-of-122022
>
> Please always verify the latest version with 'devtool latest-version kea' 
> first.
>
> > +New version of Kea has started using path of build-dir instead of
> > +src-dir which results in reproducible builds failure.
> > +Use src-dir as is used in v2.2.0
> > +
> > +Upstream-Status: Inappropriate [oe-core specific]
>
> Reproducibility fixes are always eligible for upstream submission,
> please do so and include the link. Even if the patch is unsuitable for
> direct upstream merge, at least it alerts maintainers to the problem.

Yeah, I know and I always try to send any patches upstream first.
But in this case there seems to be no way to do it.

I have tried with https://gitlab.isc.org/isc-projects/kea/ but they
are not allowing gmail
or any non-corporate email address to register or login. Also tried to
login via authenticating
with gitlab/github but that also did not work.

So, I have subscribed to kea-dev mailing list and reported there with
the same patch.
https://lists.isc.org/pipermail/kea-dev/2023-August/001010.html


-- 
Regards
Sudip

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185694): 
https://lists.openembedded.org/g/openembedded-core/message/185694
Mute This Topic: https://lists.openembedded.org/mt/100639240/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation

2023-08-09 Thread Mikko Rapeli
Hi,

On Wed, Aug 09, 2023 at 08:47:05AM +0200, Alexander Kanavin wrote:
> On Wed, 9 Aug 2023 at 01:06, Khem Raj  wrote:
> >>> I think this is only useful during debugging. So perhaps a comment to
> >>> enable it is better than enabling it always.
> >>
> >>
> >> The meson bbclass also compile with verbose so in my opinion it is better 
> >> to do the same
> >> and make it consistent with the main systemd recipe
> >>
> >> meson_do_compile() {
> >> meson compile -v ${PARALLEL_MAKE}
> >> }
> >
> >
> > Ideally we only want the verbosity when something goes wrong and meson 
> > ninja etc are good at that with their defaults perhaps that -v should be 
> > turned off by default as well
> 
> Absolutely not. As someone who spends a lot of time fixing build and
> runtime failures across all of oe-core I beg to differ. I want
> verbosity all the time, everywhere. I also do not want to spend a
> second figuring out how to switch it on (it's different everywhere
> too), or to run another build just to get the verbose logs out of it.

I prefer verbose-by-default too. It is really annoying to investigate
build race conditions in various CI environments without enough details in
logs. Had to trigger a lot test builds because of this in the past.
Same goes for testing. I know logging infra can be abused and on the limit too,
but I don't think bitbake task log sizes increase that much compared to
other stuff remaining in build tmp directories after builds.

Cheers,

-Mikko

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185693): 
https://lists.openembedded.org/g/openembedded-core/message/185693
Mute This Topic: https://lists.openembedded.org/mt/100625045/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] kea: upgrade to v2.5.0

2023-08-09 Thread Alexander Kanavin
On Wed, 9 Aug 2023 at 10:45, Sudip Mukherjee  wrote:
>  .../kea/{kea_2.2.0.bb => kea_2.5.0.bb}|  5 +-

2.5.0 is a development series. The update should be to 2.4.x instead
which is stable.
https://kb.isc.org/docs/aa-00896#kea-updated-as-of-122022

Please always verify the latest version with 'devtool latest-version kea' first.

> +New version of Kea has started using path of build-dir instead of
> +src-dir which results in reproducible builds failure.
> +Use src-dir as is used in v2.2.0
> +
> +Upstream-Status: Inappropriate [oe-core specific]

Reproducibility fixes are always eligible for upstream submission,
please do so and include the link. Even if the patch is unsuitable for
direct upstream merge, at least it alerts maintainers to the problem.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185692): 
https://lists.openembedded.org/g/openembedded-core/message/185692
Mute This Topic: https://lists.openembedded.org/mt/100639240/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] kea: upgrade to v2.5.0

2023-08-09 Thread Sudip Mukherjee
Changes:
Update license checksum: change in copyright year.
Update sha256sum for new version.

An additinal patch to fix the reproducible build failure.

Signed-off-by: Sudip Mukherjee 
---
 ...1-kea-fix-reproducible-build-failure.patch | 58 +++
 .../kea/{kea_2.2.0.bb => kea_2.5.0.bb}|  5 +-
 2 files changed, 61 insertions(+), 2 deletions(-)
 create mode 100644 
meta/recipes-connectivity/kea/files/0001-kea-fix-reproducible-build-failure.patch
 rename meta/recipes-connectivity/kea/{kea_2.2.0.bb => kea_2.5.0.bb} (92%)

diff --git 
a/meta/recipes-connectivity/kea/files/0001-kea-fix-reproducible-build-failure.patch
 
b/meta/recipes-connectivity/kea/files/0001-kea-fix-reproducible-build-failure.patch
new file mode 100644
index 00..645b5a2de3
--- /dev/null
+++ 
b/meta/recipes-connectivity/kea/files/0001-kea-fix-reproducible-build-failure.patch
@@ -0,0 +1,58 @@
+From f9bcfed5a1d44d9211c5f6eba403a9898c8c9057 Mon Sep 17 00:00:00 2001
+From: Sudip Mukherjee 
+Date: Tue, 8 Aug 2023 19:03:13 +0100
+Subject: [PATCH] kea: fix reproducible build failure
+
+New version of Kea has started using path of build-dir instead of
+src-dir which results in reproducible builds failure.
+Use src-dir as is used in v2.2.0
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: Sudip Mukherjee 
+---
+ src/bin/admin/kea-admin.in | 8 
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/bin/admin/kea-admin.in b/src/bin/admin/kea-admin.in
+index 034a0ee..8ab11ab 100644
+--- a/src/bin/admin/kea-admin.in
 b/src/bin/admin/kea-admin.in
+@@ -51,14 +51,14 @@ dump_qry=""
+ if test -f "@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh"; then
+ . "@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh"
+ else
+-. "@abs_top_builddir@/src/bin/admin/admin-utils.sh"
++. "@abs_top_srcdir@/src/bin/admin/admin-utils.sh"
+ fi
+ 
+ # Find the installed kea-lfc if available. Fallback to sources otherwise.
+ if test -x "@sbindir@/kea-lfc"; then
+ kea_lfc="@sbindir@/kea-lfc"
+ else
+-kea_lfc="@abs_top_builddir@/src/bin/lfc/kea-lfc"
++kea_lfc="@abs_top_srcdir@/src/bin/lfc/kea-lfc"
+ fi
+ 
+ # Prints out usage version.
+@@ -355,7 +355,7 @@ mysql_upgrade() {
+ # Check if there are any files in it
+ num_files=$(find "${upgrade_scripts_dir}" -name 'upgrade*.sh' -type f | 
wc -l)
+ if [ "$num_files" -eq 0 ]; then
+-
upgrade_scripts_dir=@abs_top_builddir@/src/share/database/scripts/mysql
++upgrade_scripts_dir=@abs_top_srcdir@/src/share/database/scripts/mysql
+ 
+ # Check if the scripts directory exists at all.
+ if [ ! -d ${upgrade_scripts_dir} ]; then
+@@ -405,7 +405,7 @@ pgsql_upgrade() {
+ # Check if there are any files in it
+ num_files=$(find "${upgrade_scripts_dir}" -name 'upgrade*.sh' -type f | 
wc -l)
+ if [ "$num_files" -eq 0 ]; then
+-
upgrade_scripts_dir=@abs_top_builddir@/src/share/database/scripts/pgsql
++upgrade_scripts_dir=@abs_top_srcdir@/src/share/database/scripts/pgsql
+ 
+ # Check if the scripts directory exists at all.
+ if [ ! -d ${upgrade_scripts_dir} ]; then
+-- 
+2.39.2
+
diff --git a/meta/recipes-connectivity/kea/kea_2.2.0.bb 
b/meta/recipes-connectivity/kea/kea_2.5.0.bb
similarity index 92%
rename from meta/recipes-connectivity/kea/kea_2.2.0.bb
rename to meta/recipes-connectivity/kea/kea_2.5.0.bb
index 2c2e5a74dd..cf341b2f01 100644
--- a/meta/recipes-connectivity/kea/kea_2.2.0.bb
+++ b/meta/recipes-connectivity/kea/kea_2.5.0.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "Kea is the next generation of DHCP software 
developed by ISC. It
 HOMEPAGE = "http://kea.isc.org;
 SECTION = "connectivity"
 LICENSE = "MPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=97ce14bdd2733f5b84ab5e29380d057d"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ea061fa0188838072c4248c1318ec131"
 
 DEPENDS = "boost log4cplus openssl"
 
@@ -17,8 +17,9 @@ SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \
file://fix-multilib-conflict.patch \
file://fix_pid_keactrl.patch \

file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \
+   file://0001-kea-fix-reproducible-build-failure.patch \
"
-SRC_URI[sha256sum] = 
"da7d90ca62a772602dac6e77e507319038422895ad68eeb142f1487d67d531d2"
+SRC_URI[sha256sum] = 
"5b1553cd50928976925b82e5f7f2792f8e9e9244cad66820bc640fb3d50428f8"
 
 inherit autotools systemd update-rc.d upstream-version-is-even
 
-- 
2.39.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185691): 
https://lists.openembedded.org/g/openembedded-core/message/185691
Mute This Topic: https://lists.openembedded.org/mt/100639240/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe][OE-core][Patch] classes/create-spdx-2.2: allow absolute paths in NO_GENERIC_LICENSE

2023-08-09 Thread Max Krummenacher
From: Max Krummenacher 

The current implementation expects the license file in NO_GENERIC_LICENSE
specified as being relative to ${S}.
Assuming that there are two source locations this gets confusing to
specify, e.g. ${WORKDIR}/other_tree/file looks more natural than
${S}/../other_tree/file.

Check if the filename specified is not absolute and only then assume
it is relative to ${S}.

Signed-off-by: Max Krummenacher 
---
 meta/classes/create-spdx-2.2.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/create-spdx-2.2.bbclass 
b/meta/classes/create-spdx-2.2.bbclass
index 844b674f6f..42d4ef54b0 100644
--- a/meta/classes/create-spdx-2.2.bbclass
+++ b/meta/classes/create-spdx-2.2.bbclass
@@ -134,7 +134,8 @@ def convert_license_to_spdx(lic, document, d, existing={}):
 # If it's not SPDX or PD, then NO_GENERIC_LICENSE must be set
 filename = d.getVarFlag('NO_GENERIC_LICENSE', name)
 if filename:
-filename = d.expand("${S}/" + filename)
+if not Path(filename).is_absolute():
+filename = d.expand("${S}/" + filename)
 with open(filename, errors="replace") as f:
 extracted_info.extractedText = f.read()
 else:
-- 
2.35.3


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185690): 
https://lists.openembedded.org/g/openembedded-core/message/185690
Mute This Topic: https://lists.openembedded.org/mt/100639089/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][dunfell] kernel fitImage not found

2023-08-09 Thread Frederic Martinsons
Hello

since the introduction of  two commits (8280c089b0d

 and e3eb79c0a1

)
inside the dunfell branch, I have kernel installation error , complaining
that the fitImage was not found:

|
| install: cannot stat 'arch/arm64/boot/fitImage': No such file or directory
|

With the revert of the two commits mentioned above, I managed to get my
image built successfully.

I built an arm64 based target and I set in my conf
KERNEL_IMAGETYPE=fitImage.
This is very like YOCTO #14971
 that I raised end
of 2022  and was fixed by backport of another commit from master (I have
still KERNEL_IMAGETYPE=KERNEL_IMAGETYPES=fitImage and
KERNEL_IMAGETYPE_FOR_MAKE=Image).

I tried to dig further but I must admit I don't know the arcane of fit
image construction very well to suggest for a fix, I tried to look also at
kernel-fitimage.bbclass on master branch but there was a lot
of changes there and I was unable to pinpoint the issue.

Can someone with more knowledge know what is going on or suggest what I can
look to know more ?

Thanks.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185689): 
https://lists.openembedded.org/g/openembedded-core/message/185689
Mute This Topic: https://lists.openembedded.org/mt/100638982/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][kirkstone][PATCH 1/1] qemu: fix CVE-2020-14394

2023-08-09 Thread Urade, Yogita via lists.openembedded.org
QEMU: infinite loop in xhci_ring_chain_length() in hw/usb/hcd-xhci.c

Reference:
https://gitlab.com/qemu-project/qemu/-/issues/646

Signed-off-by: Yogita Urade 
---
 meta/recipes-devtools/qemu/qemu.inc   |  1 +
 .../qemu/qemu/CVE-2020-14394.patch| 79 +++
 2 files changed, 80 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-14394.patch

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index 96a1cc93a5..8182342f92 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -97,6 +97,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
file://CVE-2023-3301.patch \
file://CVE-2023-3255.patch \
file://CVE-2023-2861.patch \
+  file://CVE-2020-14394.patch \
"
 UPSTREAM_CHECK_REGEX = "qemu-(?P\d+(\.\d+)+)\.tar"
 
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2020-14394.patch 
b/meta/recipes-devtools/qemu/qemu/CVE-2020-14394.patch
new file mode 100644
index 00..aff91a7355
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/CVE-2020-14394.patch
@@ -0,0 +1,79 @@
+From effaf5a240e03020f4ae953e10b764622c3e87cc Mon Sep 17 00:00:00 2001
+From: Thomas Huth 
+Date: Tue, 8 Aug 2023 10:44:51 +
+Subject: [PATCH] hw/usb/hcd-xhci: Fix unbounded loop in
+ xhci_ring_chain_length() (CVE-2020-14394)
+
+The loop condition in xhci_ring_chain_length() is under control of
+the guest, and additionally the code does not check for failed DMA
+transfers (e.g. if reaching the end of the RAM), so the loop there
+could run for a very long time or even forever. Fix it by checking
+the return value of dma_memory_read() and by introducing a maximum
+loop length.
+
+Resolves: https://gitlab.com/qemu-project/qemu/-/issues/646
+Message-Id: <20220804131300.96368-1-th...@redhat.com>
+Reviewed-by: Mauro Matteo Cascella 
+Acked-by: Gerd Hoffmann 
+Signed-off-by: Thomas Huth 
+
+CVE: CVE-2020-14394
+
+Upstream-Status: Backport 
[https://gitlab.com/qemu-project/qemu/-/commit/effaf5a240e03020f4ae953e10b764622c3e87cc]
+
+Signed-off-by: Yogita Urade 
+---
+ hw/usb/hcd-xhci.c | 23 +++
+ 1 file changed, 19 insertions(+), 4 deletions(-)
+
+diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
+index 14bdb8967..c63a36dcc 100644
+--- a/hw/usb/hcd-xhci.c
 b/hw/usb/hcd-xhci.c
+@@ -21,6 +21,7 @@
+
+ #include "qemu/osdep.h"
+ #include "qemu/timer.h"
++#include "qemu/log.h"
+ #include "qemu/module.h"
+ #include "qemu/queue.h"
+ #include "migration/vmstate.h"
+@@ -725,10 +726,14 @@ static int xhci_ring_chain_length(XHCIState *xhci, const 
XHCIRing *ring)
+ bool control_td_set = 0;
+ uint32_t link_cnt = 0;
+
+-while (1) {
++do {
+ TRBType type;
+-dma_memory_read(xhci->as, dequeue, , TRB_SIZE,
+-MEMTXATTRS_UNSPECIFIED);
++  if (dma_memory_read(xhci->as, dequeue, , TRB_SIZE,
++MEMTXATTRS_UNSPECIFIED) != MEMTX_OK) {
++qemu_log_mask(LOG_GUEST_ERROR, "%s: DMA memory access failed!\n",
++  __func__);
++return -1;
++  }
+ le64_to_cpus();
+ le32_to_cpus();
+ le32_to_cpus();
+@@ -762,7 +767,17 @@ static int xhci_ring_chain_length(XHCIState *xhci, const 
XHCIRing *ring)
+ if (!control_td_set && !(trb.control & TRB_TR_CH)) {
+ return length;
+ }
+-}
++
++  /*
++   * According to the xHCI spec, Transfer Ring segments should have
++   * a maximum size of 64 kB (see chapter "6 Data Structures")
++   */
++} while (length < TRB_LINK_LIMIT * 65536 / TRB_SIZE);
++
++qemu_log_mask(LOG_GUEST_ERROR, "%s: exceeded maximum tranfer ring 
size!\n",
++  __func__);
++
++return -1;
+ }
+
+ static void xhci_er_reset(XHCIState *xhci, int v)
+--
+2.35.5
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185688): 
https://lists.openembedded.org/g/openembedded-core/message/185688
Mute This Topic: https://lists.openembedded.org/mt/100638374/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation

2023-08-09 Thread Alexander Kanavin
On Wed, 9 Aug 2023 at 01:06, Khem Raj  wrote:
>>> I think this is only useful during debugging. So perhaps a comment to
>>> enable it is better than enabling it always.
>>
>>
>> The meson bbclass also compile with verbose so in my opinion it is better to 
>> do the same
>> and make it consistent with the main systemd recipe
>>
>> meson_do_compile() {
>> meson compile -v ${PARALLEL_MAKE}
>> }
>
>
> Ideally we only want the verbosity when something goes wrong and meson ninja 
> etc are good at that with their defaults perhaps that -v should be turned off 
> by default as well

Absolutely not. As someone who spends a lot of time fixing build and
runtime failures across all of oe-core I beg to differ. I want
verbosity all the time, everywhere. I also do not want to spend a
second figuring out how to switch it on (it's different everywhere
too), or to run another build just to get the verbose logs out of it.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185687): 
https://lists.openembedded.org/g/openembedded-core/message/185687
Mute This Topic: https://lists.openembedded.org/mt/100625045/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-