All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Buildroot] [PATCH v2 1/1] package/rng-tools: cherry-pick fix for jitterentropy build failure
       [not found] <20221230034540.1073086-1-christian__36217.5899137341$1672372007$gmane$org@paral.in>
@ 2022-12-30  6:53 ` Bernd Kuhls
  2022-12-30  6:59   ` Christian Stewart via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Bernd Kuhls @ 2022-12-30  6:53 UTC (permalink / raw)
  To: buildroot

Am Thu, 29 Dec 2022 19:45:40 -0800 schrieb Christian Stewart via
buildroot:

> Since commit a8807d updated jitterentropy-library to version 3.4.1.
> 
> jitterentropy-library requires setting the macro
> JENT_CONF_ENABLE_INTERNAL_TIMER to define jent_notime_ctx. If not set,
> the build fails with the following error:

Hi Christian,

the build error is already fixed:
https://git.busybox.net/buildroot/commit/?
id=d47f7279f516ba2bbc6d1fd9dd37636902b9bad3

Regards, Bernd

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH v2 1/1] package/rng-tools: cherry-pick fix for jitterentropy build failure
  2022-12-30  6:53 ` [Buildroot] [PATCH v2 1/1] package/rng-tools: cherry-pick fix for jitterentropy build failure Bernd Kuhls
@ 2022-12-30  6:59   ` Christian Stewart via buildroot
  2022-12-30  7:22     ` Bernd Kuhls
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Stewart via buildroot @ 2022-12-30  6:59 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot

Bernd,

On Thu, Dec 29, 2022 at 10:54 PM Bernd Kuhls <bernd.kuhls@t-online.de> wrote:
>
> Am Thu, 29 Dec 2022 19:45:40 -0800 schrieb Christian Stewart via
> buildroot:
> > Since commit a8807d updated jitterentropy-library to version 3.4.1.
> >
> > jitterentropy-library requires setting the macro
> > JENT_CONF_ENABLE_INTERNAL_TIMER to define jent_notime_ctx. If not set,
> > the build fails with the following error:
>
> Hi Christian,
>
> the build error is already fixed:
> https://git.busybox.net/buildroot/commit/?
> id=d47f7279f516ba2bbc6d1fd9dd37636902b9bad3

It is not. The build fails without my patch.

Note that this is about enabling JENT_CONF_ENABLE_INTERNAL_TIMER:

++AC_DEFINE([JENT_CONF_ENABLE_INTERNAL_TIMER],1,[Enable
JENT_CONF_ENABLE_INTERNAL_TIMER])

Which was not addressed by the previous patch.

Best,
Christian Stewart
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH v2 1/1] package/rng-tools: cherry-pick fix for jitterentropy build failure
  2022-12-30  6:59   ` Christian Stewart via buildroot
@ 2022-12-30  7:22     ` Bernd Kuhls
  2022-12-30  9:24       ` Christian Stewart via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Bernd Kuhls @ 2022-12-30  7:22 UTC (permalink / raw)
  To: buildroot; +Cc: buildroot

Am Thu, 29 Dec 2022 22:59:39 -0800 schrieb Christian Stewart via
buildroot:

> It is not. The build fails without my patch.

Hi Christian,

could you please provide the defconfig which produces the build error? 

When fixing the autobuilder error I added the minimum number of patches 
needed for the fix. Maybe your defconfig is different. At least there 
were no new autobuild errors since my fix was committed: http://
autobuild.buildroot.net/?reason=rng-tools-6.15

Regards, Bernd

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH v2 1/1] package/rng-tools: cherry-pick fix for jitterentropy build failure
  2022-12-30  7:22     ` Bernd Kuhls
@ 2022-12-30  9:24       ` Christian Stewart via buildroot
  0 siblings, 0 replies; 5+ messages in thread
From: Christian Stewart via buildroot @ 2022-12-30  9:24 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot

Hi Bernd,

On Thu, Dec 29, 2022 at 11:23 PM Bernd Kuhls <bernd.kuhls@t-online.de> wrote:
>
> Am Thu, 29 Dec 2022 22:59:39 -0800 schrieb Christian Stewart via
> buildroot:
>
> > It is not. The build fails without my patch.
>
> Hi Christian,
>
> could you please provide the defconfig which produces the build error?
>
> When fixing the autobuilder error I added the minimum number of patches
> needed for the fix. Maybe your defconfig is different. At least there
> were no new autobuild errors since my fix was committed: http://
> autobuild.buildroot.net/?reason=rng-tools-6.15

While I could reliably reproduce it before, now I can't. So, your
commit probably is enough.

Best,
Christian
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2 1/1] package/rng-tools: cherry-pick fix for jitterentropy build failure
@ 2022-12-30  3:45 Christian Stewart via buildroot
  0 siblings, 0 replies; 5+ messages in thread
From: Christian Stewart via buildroot @ 2022-12-30  3:45 UTC (permalink / raw)
  To: buildroot; +Cc: Christian Stewart, Yann E . MORIN, Thomas Petazzoni, Matt Weber

Since commit a8807d updated jitterentropy-library to version 3.4.1.

jitterentropy-library requires setting the macro JENT_CONF_ENABLE_INTERNAL_TIMER
to define jent_notime_ctx. If not set, the build fails with the following error:

rngd_jitter.c: In function ‘rngd_notime_stop’:
rngd_jitter.c:97:32: error: invalid use of undefined type ‘struct jent_notime_ctx’
   97 |         pthread_join(thread_ctx->notime_thread_id, NULL);

Reference:
https://www.mail-archive.com/openembedded-core@lists.openembedded.org/msg160531.html

There has not been a release with the fix yet.

Cherry-pick the upstream commit as a patch:

https://github.com/nhorman/rng-tools/commit/57be6d4c90e78ea9ad036a3a6e9b09822ed4d219

Signed-off-by: Christian Stewart <christian@paral.in>

---

v1 -> v2:

 - cherry-picked the upstream commit instead of creating our own

Signed-off-by: Christian Stewart <christian@paral.in>
---
 ...-jitterentropy-internal-timers-detec.patch | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 package/rng-tools/0004-configure.ac-fix-jitterentropy-internal-timers-detec.patch

diff --git a/package/rng-tools/0004-configure.ac-fix-jitterentropy-internal-timers-detec.patch b/package/rng-tools/0004-configure.ac-fix-jitterentropy-internal-timers-detec.patch
new file mode 100644
index 0000000000..ba02dd4156
--- /dev/null
+++ b/package/rng-tools/0004-configure.ac-fix-jitterentropy-internal-timers-detec.patch
@@ -0,0 +1,56 @@
+From 693475a998503d9c7a4a9a0d64628957cf306504 Mon Sep 17 00:00:00 2001
+From: Vladis Dronov <vdronov@redhat.com>
+Date: Wed, 21 Sep 2022 16:23:04 +0200
+Subject: [PATCH] configure.ac: fix jitterentropy internal timers detection
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Use visibility of jent_notime_settick() to detect if jitterentropy
+library is built with internal timers. The code related is:
+
+  [ src/jitterentropy-timer.h ]
+  #ifdef JENT_CONF_ENABLE_INTERNAL_TIMER
+  int jent_notime_settick(struct rand_data *ec);
+  #else /* JENT_CONF_ENABLE_INTERNAL_TIMER */
+  static inline int jent_notime_settick(struct rand_data *ec)
+  { (void)ec; return 0; }
+  #endif /* JENT_CONF_ENABLE_INTERNAL_TIMER */
+
+---
+
+Upstream: https://github.com/nhorman/rng-tools/commit/57be6d4c90e78ea9ad036a3a6e9b09822ed4d219
+
+jitterentropy-library requires setting the macro JENT_CONF_ENABLE_INTERNAL_TIMER
+to define jent_notime_ctx. If not set, the build fails with the following error:
+
+rngd_jitter.c: In function ‘rngd_notime_stop’:
+rngd_jitter.c:97:32: error: invalid use of undefined type ‘struct jent_notime_ctx’
+   97 |         pthread_join(thread_ctx->notime_thread_id, NULL);
+---
+ configure.ac | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6ec3c3a..95685db 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -97,9 +97,12 @@ AS_IF(
+ 		AC_SEARCH_LIBS(jent_version,jitterentropy,
+ 				[AM_CONDITIONAL([JITTER], [true])
+ 				AC_DEFINE([HAVE_JITTER],1,[Enable JITTER])
+-				AC_CHECK_LIB(jitterentropy, jent_notime_init,
+-				[],
+-				[AC_DEFINE([HAVE_JITTER_NOTIME],1, [Enable JITTER_NOTIME])],-lpthread)],
++				AC_CHECK_LIB(jitterentropy, jent_notime_settick,
++				[
++					AC_DEFINE([HAVE_JITTER_NOTIME],1,[Enable JITTER_NOTIME])
++					AC_DEFINE([JENT_CONF_ENABLE_INTERNAL_TIMER],1,[Enable JENT_CONF_ENABLE_INTERNAL_TIMER])
++				],
++				[],-lpthread)],
+ 				AC_MSG_NOTICE([No Jitterentropy library found]),-lpthread)
+ 	], [AC_MSG_NOTICE([Disabling JITTER entropy source])]
+ )
+-- 
+2.39.0
+
-- 
2.39.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-30  9:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20221230034540.1073086-1-christian__36217.5899137341$1672372007$gmane$org@paral.in>
2022-12-30  6:53 ` [Buildroot] [PATCH v2 1/1] package/rng-tools: cherry-pick fix for jitterentropy build failure Bernd Kuhls
2022-12-30  6:59   ` Christian Stewart via buildroot
2022-12-30  7:22     ` Bernd Kuhls
2022-12-30  9:24       ` Christian Stewart via buildroot
2022-12-30  3:45 Christian Stewart via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.