* [PATCH 1/3] mesa: Fix build with upcoming LLVM 17
@ 2023-06-24 5:32 Khem Raj
2023-06-24 5:32 ` [PATCH 2/3] libxcrypt: Limit to enabling strong hash algos only Khem Raj
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Khem Raj @ 2023-06-24 5:32 UTC (permalink / raw)
To: openembedded-core; +Cc: Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../0001-gallium-Fix-build-with-llvm-17.patch | 34 +++++++++++++++++++
meta/recipes-graphics/mesa/mesa.inc | 6 ++++
2 files changed, 40 insertions(+)
create mode 100644 meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
diff --git a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
new file mode 100644
index 00000000000..3631a918b0c
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
@@ -0,0 +1,34 @@
+From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 23 Jun 2023 01:20:38 -0700
+Subject: [PATCH] gallium: Fix build with llvm 17
+
+These headers are not available for C files in llvm 17+
+and they seem to be not needed to compile after all with llvm 17
+so add conditions to exclude them for llvm >= 17
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
+index 24d0823..3d4573e 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
+@@ -42,8 +42,10 @@
+
+ #include <llvm/Config/llvm-config.h>
+ #include <llvm-c/Analysis.h>
++#if LLVM_VERSION_MAJOR < 17
+ #include <llvm-c/Transforms/Scalar.h>
+-#if LLVM_VERSION_MAJOR >= 7
++#endif
++#if LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 17
+ #include <llvm-c/Transforms/Utils.h>
+ #endif
+ #include <llvm-c/BitWriter.h>
+--
+2.41.0
+
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index ac42a8dd4f3..c988c77115b 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -17,6 +17,7 @@ PE = "2"
SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
+ file://0001-gallium-Fix-build-with-llvm-17.patch \
"
SRC_URI[sha256sum] = "a2679031ed5b73b29c4f042ac64d96f83b0cfe4858617de32e2efc196c653a40"
@@ -74,6 +75,11 @@ EXTRA_OEMESON = " \
def strip_comma(s):
return s.strip(',')
+# llvm-config should be the one from llvm-native and not from build host ( if llvm is installed on host )
+do_write_config:append() {
+ sed -i -e '/\[binaries\]/a\' -e "llvm-config = '${STAGING_BINDIR_NATIVE}/llvm-config'" ${WORKDIR}/meson.native
+}
+
PACKAGECONFIG = " \
gallium \
${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland', d)} \
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] libxcrypt: Limit to enabling strong hash algos only
2023-06-24 5:32 [PATCH 1/3] mesa: Fix build with upcoming LLVM 17 Khem Raj
@ 2023-06-24 5:32 ` Khem Raj
2023-06-30 13:30 ` [OE-core] " Alexandre Belloni
2023-06-24 5:32 ` [PATCH 3/3] alsa-lib: Disable old API symbols Khem Raj
2023-06-25 6:30 ` [OE-core] [PATCH 1/3] mesa: Fix build with upcoming LLVM 17 Alexander Kanavin
2 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2023-06-24 5:32 UTC (permalink / raw)
To: openembedded-core; +Cc: Khem Raj
This ensures that weak algorithms are not included, which should improve
the defauls to be more secure
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-core/libxcrypt/libxcrypt.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-core/libxcrypt/libxcrypt.inc b/meta/recipes-core/libxcrypt/libxcrypt.inc
index 997e83fb004..db43a34b11d 100644
--- a/meta/recipes-core/libxcrypt/libxcrypt.inc
+++ b/meta/recipes-core/libxcrypt/libxcrypt.inc
@@ -29,7 +29,7 @@ BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir} -Wno-error"
CPPFLAGS:append:class-nativesdk = " -Wno-error"
-API = "--disable-obsolete-api"
+API = "--disable-obsolete-api --enable-hashes=strong"
EXTRA_OECONF += "${API}"
BBCLASSEXTEND = "native nativesdk"
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] alsa-lib: Disable old API symbols
2023-06-24 5:32 [PATCH 1/3] mesa: Fix build with upcoming LLVM 17 Khem Raj
2023-06-24 5:32 ` [PATCH 2/3] libxcrypt: Limit to enabling strong hash algos only Khem Raj
@ 2023-06-24 5:32 ` Khem Raj
2023-06-25 6:30 ` [OE-core] [PATCH 1/3] mesa: Fix build with upcoming LLVM 17 Alexander Kanavin
2 siblings, 0 replies; 10+ messages in thread
From: Khem Raj @ 2023-06-24 5:32 UTC (permalink / raw)
To: openembedded-core; +Cc: Khem Raj
These symbols are currently generated as undefined in the shared object,
which means we really do not need them.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb
index a8bf09904d9..d482e27683b 100644
--- a/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb
+++ b/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb
@@ -16,7 +16,7 @@ inherit autotools pkgconfig
EXTRA_OECONF += " \
${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \
- --disable-python \
+ --disable-python --disable-old-symbols \
"
PACKAGES =+ "alsa-server alsa-conf libatopology"
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH 1/3] mesa: Fix build with upcoming LLVM 17
2023-06-24 5:32 [PATCH 1/3] mesa: Fix build with upcoming LLVM 17 Khem Raj
2023-06-24 5:32 ` [PATCH 2/3] libxcrypt: Limit to enabling strong hash algos only Khem Raj
2023-06-24 5:32 ` [PATCH 3/3] alsa-lib: Disable old API symbols Khem Raj
@ 2023-06-25 6:30 ` Alexander Kanavin
2 siblings, 0 replies; 10+ messages in thread
From: Alexander Kanavin @ 2023-06-25 6:30 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
On Sat, 24 Jun 2023 at 07:32, Khem Raj <raj.khem@gmail.com> wrote:
> +# llvm-config should be the one from llvm-native and not from build host ( if llvm is installed on host )
> +do_write_config:append() {
> + sed -i -e '/\[binaries\]/a\' -e "llvm-config = '${STAGING_BINDIR_NATIVE}/llvm-config'" ${WORKDIR}/meson.native
> +}
> +
This change should be in a separate commit, and with a separate
explanation please. Is there a mistake in how meson.native is formed,
and if so, should it be fixed at the source?
Alex
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH 2/3] libxcrypt: Limit to enabling strong hash algos only
2023-06-24 5:32 ` [PATCH 2/3] libxcrypt: Limit to enabling strong hash algos only Khem Raj
@ 2023-06-30 13:30 ` Alexandre Belloni
2023-07-04 10:54 ` Ross Burton
2023-07-05 11:08 ` Ross Burton
0 siblings, 2 replies; 10+ messages in thread
From: Alexandre Belloni @ 2023-06-30 13:30 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
Hello Khem,
This causes python ptest failures:
{'python3': ['test_crypt', 'test_methods', 'test_sha2_rounds']}
We should probably disable those
On 23/06/2023 22:32:21-0700, Khem Raj wrote:
> This ensures that weak algorithms are not included, which should improve
> the defauls to be more secure
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> meta/recipes-core/libxcrypt/libxcrypt.inc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/libxcrypt/libxcrypt.inc b/meta/recipes-core/libxcrypt/libxcrypt.inc
> index 997e83fb004..db43a34b11d 100644
> --- a/meta/recipes-core/libxcrypt/libxcrypt.inc
> +++ b/meta/recipes-core/libxcrypt/libxcrypt.inc
> @@ -29,7 +29,7 @@ BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
> TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir} -Wno-error"
> CPPFLAGS:append:class-nativesdk = " -Wno-error"
>
> -API = "--disable-obsolete-api"
> +API = "--disable-obsolete-api --enable-hashes=strong"
> EXTRA_OECONF += "${API}"
>
> BBCLASSEXTEND = "native nativesdk"
> --
> 2.41.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#183356): https://lists.openembedded.org/g/openembedded-core/message/183356
> Mute This Topic: https://lists.openembedded.org/mt/99749300/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH 2/3] libxcrypt: Limit to enabling strong hash algos only
2023-06-30 13:30 ` [OE-core] " Alexandre Belloni
@ 2023-07-04 10:54 ` Ross Burton
2023-07-04 11:01 ` Alexander Kanavin
2023-07-04 16:39 ` Khem Raj
2023-07-05 11:08 ` Ross Burton
1 sibling, 2 replies; 10+ messages in thread
From: Ross Burton @ 2023-07-04 10:54 UTC (permalink / raw)
To: alexandre.belloni; +Cc: Khem Raj, openembedded-core
On 30 Jun 2023, at 14:30, Alexandre Belloni via lists.openembedded.org <alexandre.belloni=bootlin.com@lists.openembedded.org> wrote:
>
> Hello Khem,
>
> This causes python ptest failures:
>
> {'python3': ['test_crypt', 'test_methods', 'test_sha2_rounds']}
>
> We should probably disable those
I would say to send a patch upstream to make those tests not depend on the unsafe algorithms existing, but the entire module has been removed in the next release of Python…
Ross
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH 2/3] libxcrypt: Limit to enabling strong hash algos only
2023-07-04 10:54 ` Ross Burton
@ 2023-07-04 11:01 ` Alexander Kanavin
2023-07-04 16:39 ` Khem Raj
1 sibling, 0 replies; 10+ messages in thread
From: Alexander Kanavin @ 2023-07-04 11:01 UTC (permalink / raw)
To: Ross Burton; +Cc: alexandre.belloni, Khem Raj, openembedded-core
I would also suggest that xcrypt itself is changed to default only to
strong algorithms, and weak algorithms is an opt-in.
This idea of 'letting users decide' which crypto they want from
all-included set is frankly maddening, and I do not understand why
it's still happening in 2023.
Alex
On Tue, 4 Jul 2023 at 12:54, Ross Burton <ross.burton@arm.com> wrote:
>
> On 30 Jun 2023, at 14:30, Alexandre Belloni via lists.openembedded.org <alexandre.belloni=bootlin.com@lists.openembedded.org> wrote:
> >
> > Hello Khem,
> >
> > This causes python ptest failures:
> >
> > {'python3': ['test_crypt', 'test_methods', 'test_sha2_rounds']}
> >
> > We should probably disable those
>
> I would say to send a patch upstream to make those tests not depend on the unsafe algorithms existing, but the entire module has been removed in the next release of Python…
>
> Ross
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#183825): https://lists.openembedded.org/g/openembedded-core/message/183825
> Mute This Topic: https://lists.openembedded.org/mt/99749300/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH 2/3] libxcrypt: Limit to enabling strong hash algos only
2023-07-04 10:54 ` Ross Burton
2023-07-04 11:01 ` Alexander Kanavin
@ 2023-07-04 16:39 ` Khem Raj
1 sibling, 0 replies; 10+ messages in thread
From: Khem Raj @ 2023-07-04 16:39 UTC (permalink / raw)
To: Ross Burton; +Cc: alexandre.belloni, openembedded-core
On Tue, Jul 4, 2023 at 3:54 AM Ross Burton <Ross.Burton@arm.com> wrote:
>
> On 30 Jun 2023, at 14:30, Alexandre Belloni via lists.openembedded.org <alexandre.belloni=bootlin.com@lists.openembedded.org> wrote:
> >
> > Hello Khem,
> >
> > This causes python ptest failures:
> >
> > {'python3': ['test_crypt', 'test_methods', 'test_sha2_rounds']}
> >
> > We should probably disable those
>
> I would say to send a patch upstream to make those tests not depend on the unsafe algorithms existing, but the entire module has been removed in the next release of Python…
>
crypt is already deprecated in python 11 and will be removed from
python 13. [1] some packages have opened issues to track it
e.g. [2]
[1] https://peps.python.org/pep-0594/#crypt
[2] https://github.com/saltstack/salt/issues/64263
This is good but perhaps a bit early for us to act upon it, since this
would require packages to migrate away from it to use hashlib or
some such equivalent module.
> Ross
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH 2/3] libxcrypt: Limit to enabling strong hash algos only
2023-06-30 13:30 ` [OE-core] " Alexandre Belloni
2023-07-04 10:54 ` Ross Burton
@ 2023-07-05 11:08 ` Ross Burton
2023-07-05 15:56 ` Alexandre Belloni
1 sibling, 1 reply; 10+ messages in thread
From: Ross Burton @ 2023-07-05 11:08 UTC (permalink / raw)
To: Khem Raj; +Cc: OE-core
On 30 Jun 2023, at 14:30, Alexandre Belloni via lists.openembedded.org <alexandre.belloni=bootlin.com@lists.openembedded.org> wrote:
>
> Hello Khem,
>
> This causes python ptest failures:
>
> {'python3': ['test_crypt', 'test_methods', 'test_sha2_rounds']}
>
> We should probably disable those
Guessing this is also the cause of the perl failures:
{'perl': ['t/op/crypt']}
and apr-util:
{'apr-util': ['testpass_3_of_6']}
Test 3 of 6 is test_shapass using SHA1.
If we want to do this then some effort will be needed to make all the test suites adapt to what algorithms are actually available.
Ross
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH 2/3] libxcrypt: Limit to enabling strong hash algos only
2023-07-05 11:08 ` Ross Burton
@ 2023-07-05 15:56 ` Alexandre Belloni
0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2023-07-05 15:56 UTC (permalink / raw)
To: Ross Burton; +Cc: Khem Raj, OE-core
On 05/07/2023 11:08:32+0000, Ross Burton wrote:
> On 30 Jun 2023, at 14:30, Alexandre Belloni via lists.openembedded.org <alexandre.belloni=bootlin.com@lists.openembedded.org> wrote:
> >
> > Hello Khem,
> >
> > This causes python ptest failures:
> >
> > {'python3': ['test_crypt', 'test_methods', 'test_sha2_rounds']}
> >
> > We should probably disable those
>
> Guessing this is also the cause of the perl failures:
>
> {'perl': ['t/op/crypt']}
>
> and apr-util:
>
> {'apr-util': ['testpass_3_of_6']}
>
> Test 3 of 6 is test_shapass using SHA1.
>
Yes it is, I should have added that. I dropped the patch for now.
> If we want to do this then some effort will be needed to make all the test suites adapt to what algorithms are actually available.
>
> Ross
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#183887): https://lists.openembedded.org/g/openembedded-core/message/183887
> Mute This Topic: https://lists.openembedded.org/mt/99749300/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-07-05 15:56 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-24 5:32 [PATCH 1/3] mesa: Fix build with upcoming LLVM 17 Khem Raj
2023-06-24 5:32 ` [PATCH 2/3] libxcrypt: Limit to enabling strong hash algos only Khem Raj
2023-06-30 13:30 ` [OE-core] " Alexandre Belloni
2023-07-04 10:54 ` Ross Burton
2023-07-04 11:01 ` Alexander Kanavin
2023-07-04 16:39 ` Khem Raj
2023-07-05 11:08 ` Ross Burton
2023-07-05 15:56 ` Alexandre Belloni
2023-06-24 5:32 ` [PATCH 3/3] alsa-lib: Disable old API symbols Khem Raj
2023-06-25 6:30 ` [OE-core] [PATCH 1/3] mesa: Fix build with upcoming LLVM 17 Alexander Kanavin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).