* [PATCH 2/3] Revert "busybox: Make provisions to disable sha256/sha1 accelaration on x86"
2024-11-02 20:39 [PATCH 1/3] busybox: Backport a patch to build with CONFIG_SHA1_HWACCEL on non-x86 Peter Kjellerstedt
@ 2024-11-02 20:39 ` Peter Kjellerstedt
2024-11-02 20:39 ` [PATCH 3/3] busybox: Remove CONFIG_SHA1_SMALL and CONFIG_SHA*_HWACCEL from sha*sum.cfg Peter Kjellerstedt
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Peter Kjellerstedt @ 2024-11-02 20:39 UTC (permalink / raw)
To: openembedded-core
This reverts commit 22f639d61127f4b82a79008c5305e44e090a3680.
The underlying problem has now been corrected so that acceleration can
be enabled regardless of the architecture.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
meta/recipes-core/busybox/busybox/sha1sum.cfg | 2 +-
meta/recipes-core/busybox/busybox/sha256sum.cfg | 2 +-
meta/recipes-core/busybox/busybox/sha_accel.cfg | 2 --
meta/recipes-core/busybox/busybox_1.37.0.bb | 2 +-
4 files changed, 3 insertions(+), 5 deletions(-)
delete mode 100644 meta/recipes-core/busybox/busybox/sha_accel.cfg
diff --git a/meta/recipes-core/busybox/busybox/sha1sum.cfg b/meta/recipes-core/busybox/busybox/sha1sum.cfg
index 151c447658..01137a2486 100644
--- a/meta/recipes-core/busybox/busybox/sha1sum.cfg
+++ b/meta/recipes-core/busybox/busybox/sha1sum.cfg
@@ -1,3 +1,3 @@
CONFIG_SHA1SUM=y
CONFIG_SHA1_SMALL=3
-# CONFIG_SHA1_HWACCEL is not set
+CONFIG_SHA1_HWACCEL=y
diff --git a/meta/recipes-core/busybox/busybox/sha256sum.cfg b/meta/recipes-core/busybox/busybox/sha256sum.cfg
index aa0b0b0b98..a5b0ab22d1 100644
--- a/meta/recipes-core/busybox/busybox/sha256sum.cfg
+++ b/meta/recipes-core/busybox/busybox/sha256sum.cfg
@@ -1,2 +1,2 @@
CONFIG_SHA256SUM=y
-# CONFIG_SHA256_HWACCEL is not set
+CONFIG_SHA256_HWACCEL=y
diff --git a/meta/recipes-core/busybox/busybox/sha_accel.cfg b/meta/recipes-core/busybox/busybox/sha_accel.cfg
deleted file mode 100644
index 70038a8509..0000000000
--- a/meta/recipes-core/busybox/busybox/sha_accel.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_SHA1_HWACCEL=y
-CONFIG_SHA256_HWACCEL=y
diff --git a/meta/recipes-core/busybox/busybox_1.37.0.bb b/meta/recipes-core/busybox/busybox_1.37.0.bb
index 3aae6eff4d..1051fd1920 100644
--- a/meta/recipes-core/busybox/busybox_1.37.0.bb
+++ b/meta/recipes-core/busybox/busybox_1.37.0.bb
@@ -56,5 +56,5 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://0001-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch \
"
SRC_URI:append:libc-musl = " file://musl.cfg"
-SRC_URI:append:x86-64 = " file://sha_accel.cfg"
+
SRC_URI[tarball.sha256sum] = "3311dff32e746499f4df0d5df04d7eb396382d7e108bb9250e7b519b837043a4"
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/3] busybox: Remove CONFIG_SHA1_SMALL and CONFIG_SHA*_HWACCEL from sha*sum.cfg
2024-11-02 20:39 [PATCH 1/3] busybox: Backport a patch to build with CONFIG_SHA1_HWACCEL on non-x86 Peter Kjellerstedt
2024-11-02 20:39 ` [PATCH 2/3] Revert "busybox: Make provisions to disable sha256/sha1 accelaration on x86" Peter Kjellerstedt
@ 2024-11-02 20:39 ` Peter Kjellerstedt
2024-11-02 22:55 ` [OE-core] [PATCH 1/3] busybox: Backport a patch to build with CONFIG_SHA1_HWACCEL on non-x86 Richard Purdie
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Peter Kjellerstedt @ 2024-11-02 20:39 UTC (permalink / raw)
To: openembedded-core
The options CONFIG_SHA1_SMALL, CONFIG_SHA1_HWACCEL and
CONFIG_SHA256_HWACCEL affect the common implementations of SHA-1 and
SHA-256. These are used regardless of if the sha1sum and/or sha256sum
applets are enabled. Thus it does not make sense to configure them in
the sha*sum.cfg files. Additionally, their values in the .cfg files
match the values in the defconfig file.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
meta/recipes-core/busybox/busybox/sha1sum.cfg | 2 --
meta/recipes-core/busybox/busybox/sha256sum.cfg | 1 -
2 files changed, 3 deletions(-)
diff --git a/meta/recipes-core/busybox/busybox/sha1sum.cfg b/meta/recipes-core/busybox/busybox/sha1sum.cfg
index 01137a2486..20e72d9263 100644
--- a/meta/recipes-core/busybox/busybox/sha1sum.cfg
+++ b/meta/recipes-core/busybox/busybox/sha1sum.cfg
@@ -1,3 +1 @@
CONFIG_SHA1SUM=y
-CONFIG_SHA1_SMALL=3
-CONFIG_SHA1_HWACCEL=y
diff --git a/meta/recipes-core/busybox/busybox/sha256sum.cfg b/meta/recipes-core/busybox/busybox/sha256sum.cfg
index a5b0ab22d1..ce652ae4c6 100644
--- a/meta/recipes-core/busybox/busybox/sha256sum.cfg
+++ b/meta/recipes-core/busybox/busybox/sha256sum.cfg
@@ -1,2 +1 @@
CONFIG_SHA256SUM=y
-CONFIG_SHA256_HWACCEL=y
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [OE-core] [PATCH 1/3] busybox: Backport a patch to build with CONFIG_SHA1_HWACCEL on non-x86
2024-11-02 20:39 [PATCH 1/3] busybox: Backport a patch to build with CONFIG_SHA1_HWACCEL on non-x86 Peter Kjellerstedt
2024-11-02 20:39 ` [PATCH 2/3] Revert "busybox: Make provisions to disable sha256/sha1 accelaration on x86" Peter Kjellerstedt
2024-11-02 20:39 ` [PATCH 3/3] busybox: Remove CONFIG_SHA1_SMALL and CONFIG_SHA*_HWACCEL from sha*sum.cfg Peter Kjellerstedt
@ 2024-11-02 22:55 ` Richard Purdie
[not found] ` <180448BAD9977D8B.18610@lists.openembedded.org>
2024-11-04 6:53 ` Andrej Valek
4 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2024-11-02 22:55 UTC (permalink / raw)
To: peter.kjellerstedt, openembedded-core; +Cc: Khem Raj
On Sat, 2024-11-02 at 21:39 +0100, Peter Kjellerstedt via lists.openembedded.org wrote:
> This allows CONFIG_SHA1_HWACCEL to be enabled regardless of the
> architecture.
>
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> ---
> ...sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch | 33 +++++++++++++++++++
> meta/recipes-core/busybox/busybox_1.37.0.bb | 1 +
> 2 files changed, 34 insertions(+)
> create mode 100644 meta/recipes-core/busybox/busybox/0001-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch
>
> diff --git a/meta/recipes-core/busybox/busybox/0001-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch b/meta/recipes-core/busybox/busybox/0001-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch
> new file mode 100644
> index 0000000000..2af188938e
> --- /dev/null
> +++ b/meta/recipes-core/busybox/busybox/0001-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch
> @@ -0,0 +1,33 @@
> +From bf57f732a5b6842f6fa3e0f90385f039e5d6a92c Mon Sep 17 00:00:00 2001
> +From: Rudi Heitbaum <rudi@heitbaum.com>
> +Date: Sun, 29 Sep 2024 17:57:55 +0000
> +Subject: [PATCH] libbb: fix sha1 on !x86 if CONFIG_SHA1_HWACCEL=y
> +
> +fixes non i386 and x86 builds
> +
> +libbb/hash_md5_sha.c: In function 'sha1_end':
> +libbb/hash_md5_sha.c:1316:35: error: 'sha1_process_block64_shaNI' undeclared
> + 1316 | || ctx->process_block == sha1_process_block64_shaNI
> +
> +Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
> +Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
> +Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=bf57f732a5b6842f6fa3e0f90385f039e5d6a92c]
> +Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> +---
> + libbb/hash_md5_sha.c | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/libbb/hash_md5_sha.c b/libbb/hash_md5_sha.c
> +index 57a801459..75a61c32c 100644
> +--- a/libbb/hash_md5_sha.c
> ++++ b/libbb/hash_md5_sha.c
> +@@ -1313,7 +1313,9 @@ unsigned FAST_FUNC sha1_end(sha1_ctx_t *ctx, void *resbuf)
> + hash_size = 8;
> + if (ctx->process_block == sha1_process_block64
> + #if ENABLE_SHA1_HWACCEL
> ++# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
> + || ctx->process_block == sha1_process_block64_shaNI
> ++# endif
> + #endif
> + ) {
> + hash_size = 5;
> diff --git a/meta/recipes-core/busybox/busybox_1.37.0.bb b/meta/recipes-core/busybox/busybox_1.37.0.bb
> index c3131eb453..3aae6eff4d 100644
> --- a/meta/recipes-core/busybox/busybox_1.37.0.bb
> +++ b/meta/recipes-core/busybox/busybox_1.37.0.bb
> @@ -53,6 +53,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
> file://0001-syslogd-fix-wrong-OPT_locallog-flag-detection.patch \
> file://0002-start-stop-daemon-fix-tests.patch \
> file://0003-start-stop-false.patch \
> + file://0001-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch \
> "
> SRC_URI:append:libc-musl = " file://musl.cfg"
> SRC_URI:append:x86-64 = " file://sha_accel.cfg"
Looks like musl doesn't like this:
https://valkyrie.yoctoproject.org/#/builders/6/builds/368/steps/11/logs/stdio
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <180448BAD9977D8B.18610@lists.openembedded.org>]
* Re: [OE-core] [PATCH 1/3] busybox: Backport a patch to build with CONFIG_SHA1_HWACCEL on non-x86
[not found] ` <180448BAD9977D8B.18610@lists.openembedded.org>
@ 2024-11-02 22:57 ` Richard Purdie
0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2024-11-02 22:57 UTC (permalink / raw)
To: peter.kjellerstedt, openembedded-core; +Cc: Khem Raj
On Sat, 2024-11-02 at 22:55 +0000, Richard Purdie via
lists.openembedded.org wrote:
> On Sat, 2024-11-02 at 21:39 +0100, Peter Kjellerstedt via
> lists.openembedded.org wrote:
> > This allows CONFIG_SHA1_HWACCEL to be enabled regardless of the
> > architecture.
> >
> > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > ---
> > ...sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch | 33
> > +++++++++++++++++++
> > meta/recipes-core/busybox/busybox_1.37.0.bb | 1 +
> > 2 files changed, 34 insertions(+)
> > create mode 100644 meta/recipes-core/busybox/busybox/0001-libbb-
> > fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch
> >
> > diff --git a/meta/recipes-core/busybox/busybox/0001-libbb-fix-sha1-
> > on-x86-if-CONFIG_SHA1_HWACCEL-y.patch b/meta/recipes-
> > core/busybox/busybox/0001-libbb-fix-sha1-on-x86-if-
> > CONFIG_SHA1_HWACCEL-y.patch
> > new file mode 100644
> > index 0000000000..2af188938e
> > --- /dev/null
> > +++ b/meta/recipes-core/busybox/busybox/0001-libbb-fix-sha1-on-x86-
> > if-CONFIG_SHA1_HWACCEL-y.patch
> > @@ -0,0 +1,33 @@
> > +From bf57f732a5b6842f6fa3e0f90385f039e5d6a92c Mon Sep 17 00:00:00
> > 2001
> > +From: Rudi Heitbaum <rudi@heitbaum.com>
> > +Date: Sun, 29 Sep 2024 17:57:55 +0000
> > +Subject: [PATCH] libbb: fix sha1 on !x86 if CONFIG_SHA1_HWACCEL=y
> > +
> > +fixes non i386 and x86 builds
> > +
> > +libbb/hash_md5_sha.c: In function 'sha1_end':
> > +libbb/hash_md5_sha.c:1316:35: error: 'sha1_process_block64_shaNI'
> > undeclared
> > + 1316 | || ctx->process_block ==
> > sha1_process_block64_shaNI
> > +
> > +Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
> > +Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
> > +Upstream-Status: Backport
> > [https://git.busybox.net/busybox/commit/?id=bf57f732a5b6842f6fa3e0f
> > 90385f039e5d6a92c]
> > +Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > +---
> > + libbb/hash_md5_sha.c | 2 ++
> > + 1 file changed, 2 insertions(+)
> > +
> > +diff --git a/libbb/hash_md5_sha.c b/libbb/hash_md5_sha.c
> > +index 57a801459..75a61c32c 100644
> > +--- a/libbb/hash_md5_sha.c
> > ++++ b/libbb/hash_md5_sha.c
> > +@@ -1313,7 +1313,9 @@ unsigned FAST_FUNC sha1_end(sha1_ctx_t *ctx,
> > void *resbuf)
> > + hash_size = 8;
> > + if (ctx->process_block == sha1_process_block64
> > + #if ENABLE_SHA1_HWACCEL
> > ++# if defined(__GNUC__) && (defined(__i386__) ||
> > defined(__x86_64__))
> > + || ctx->process_block == sha1_process_block64_shaNI
> > ++# endif
> > + #endif
> > + ) {
> > + hash_size = 5;
> > diff --git a/meta/recipes-core/busybox/busybox_1.37.0.bb
> > b/meta/recipes-core/busybox/busybox_1.37.0.bb
> > index c3131eb453..3aae6eff4d 100644
> > --- a/meta/recipes-core/busybox/busybox_1.37.0.bb
> > +++ b/meta/recipes-core/busybox/busybox_1.37.0.bb
> > @@ -53,6 +53,7 @@ SRC_URI =
> > "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
> >
> > file://0001-syslogd-fix-wrong-OPT_locallog-flag-detection.patch \
> > file://0002-start-stop-daemon-fix-tests.patch \
> > file://0003-start-stop-false.patch \
> > +
> > file://0001-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch \
> > "
> > SRC_URI:append:libc-musl = " file://musl.cfg"
> > SRC_URI:append:x86-64 = " file://sha_accel.cfg"
>
> Looks like musl doesn't like this:
>
> https://valkyrie.yoctoproject.org/#/builders/6/builds/368/steps/11/logs/stdio
or qemux86 which is showing relocation in .text errors:
https://valkyrie.yoctoproject.org/#/builders/59/builds/358/steps/11/logs/stdio
https://valkyrie.yoctoproject.org/#/builders/30/builds/357
https://valkyrie.yoctoproject.org/#/builders/19/builds/368/steps/12/logs/stdio
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH 1/3] busybox: Backport a patch to build with CONFIG_SHA1_HWACCEL on non-x86
2024-11-02 20:39 [PATCH 1/3] busybox: Backport a patch to build with CONFIG_SHA1_HWACCEL on non-x86 Peter Kjellerstedt
` (3 preceding siblings ...)
[not found] ` <180448BAD9977D8B.18610@lists.openembedded.org>
@ 2024-11-04 6:53 ` Andrej Valek
4 siblings, 0 replies; 6+ messages in thread
From: Andrej Valek @ 2024-11-04 6:53 UTC (permalink / raw)
To: Peter Kjellerstedt, openembedded-core
Hello Peter,
I was also thinking about picking this two patches, but I didn't have a
time for verification. Are you sure, that this
https://lists.busybox.net/pipermail/busybox/2023-January/090078.html has
been fixed, right? Or did you verify it?
Regards,
Andrej
On 02.11.2024 21:39, Peter Kjellerstedt wrote:
> This allows CONFIG_SHA1_HWACCEL to be enabled regardless of the
> architecture.
>
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> ---
> ...sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch | 33 +++++++++++++++++++
> meta/recipes-core/busybox/busybox_1.37.0.bb | 1 +
> 2 files changed, 34 insertions(+)
> create mode 100644 meta/recipes-core/busybox/busybox/0001-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch
>
> diff --git a/meta/recipes-core/busybox/busybox/0001-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch b/meta/recipes-core/busybox/busybox/0001-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch
> new file mode 100644
> index 0000000000..2af188938e
> --- /dev/null
> +++ b/meta/recipes-core/busybox/busybox/0001-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch
> @@ -0,0 +1,33 @@
> +From bf57f732a5b6842f6fa3e0f90385f039e5d6a92c Mon Sep 17 00:00:00 2001
> +From: Rudi Heitbaum <rudi@heitbaum.com>
> +Date: Sun, 29 Sep 2024 17:57:55 +0000
> +Subject: [PATCH] libbb: fix sha1 on !x86 if CONFIG_SHA1_HWACCEL=y
> +
> +fixes non i386 and x86 builds
> +
> +libbb/hash_md5_sha.c: In function 'sha1_end':
> +libbb/hash_md5_sha.c:1316:35: error: 'sha1_process_block64_shaNI' undeclared
> + 1316 | || ctx->process_block == sha1_process_block64_shaNI
> +
> +Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
> +Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
> +Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=bf57f732a5b6842f6fa3e0f90385f039e5d6a92c]
> +Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> +---
> + libbb/hash_md5_sha.c | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/libbb/hash_md5_sha.c b/libbb/hash_md5_sha.c
> +index 57a801459..75a61c32c 100644
> +--- a/libbb/hash_md5_sha.c
> ++++ b/libbb/hash_md5_sha.c
> +@@ -1313,7 +1313,9 @@ unsigned FAST_FUNC sha1_end(sha1_ctx_t *ctx, void *resbuf)
> + hash_size = 8;
> + if (ctx->process_block == sha1_process_block64
> + #if ENABLE_SHA1_HWACCEL
> ++# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
> + || ctx->process_block == sha1_process_block64_shaNI
> ++# endif
> + #endif
> + ) {
> + hash_size = 5;
> diff --git a/meta/recipes-core/busybox/busybox_1.37.0.bb b/meta/recipes-core/busybox/busybox_1.37.0.bb
> index c3131eb453..3aae6eff4d 100644
> --- a/meta/recipes-core/busybox/busybox_1.37.0.bb
> +++ b/meta/recipes-core/busybox/busybox_1.37.0.bb
> @@ -53,6 +53,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
> file://0001-syslogd-fix-wrong-OPT_locallog-flag-detection.patch \
> file://0002-start-stop-daemon-fix-tests.patch \
> file://0003-start-stop-false.patch \
> + file://0001-libbb-fix-sha1-on-x86-if-CONFIG_SHA1_HWACCEL-y.patch \
> "
> SRC_URI:append:libc-musl = " file://musl.cfg"
> SRC_URI:append:x86-64 = " file://sha_accel.cfg"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#206655): https://lists.openembedded.org/g/openembedded-core/message/206655
> Mute This Topic: https://lists.openembedded.org/mt/109357849/3619876
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [andrej.v@skyrain.eu]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 6+ messages in thread