From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
To: <ragaprasanth@gmail.com>, <openembedded-core@lists.openembedded.org>
Cc: <jaipaul.cheernam@est.tech>, <ross.burton@arm.com>
Subject: Re: [OE-core] [PATCH v2] libjitterentropy: upgrade 3.6.3 -> 3.7.0
Date: Tue, 17 Nov 2026 14:40:23 +0100 [thread overview]
Message-ID: <DMXJ1DVWTK13.TBQ9AVC1R0J5@bootlin.com> (raw)
In-Reply-To: <20261117024644.2849146-1-ragaprasanth@gmail.com>
On Tue Nov 17, 2026 at 3:46 AM CET, prasanth via openembedded-core wrote:
> 3.7.0 locks the collector memory with mlock(), changes the startup to
> meet NTG.1, replaces the SHA3-256 output with XDRBG-256 and adds
> jent_status(). LICENSE only changes the copyright year.
>
> Two fixes are needed:
>
> - 3.7.0 uses C11 threads on Linux and makes struct jent_notime_ctx
> private, so rng-tools fails to build. Backport the Linux part of the
> upstream fix.
> - The Makefile now uses -std=c11, which hides clock_gettime() on arm,
> mips and riscv. Build with -D_DEFAULT_SOURCE.
>
> This picks up Jaipaul Cheernam's earlier upgrade patch [1].
>
> [1] https://patchwork.yoctoproject.org/project/oe-core/patch/20261002071557.74249-2-jaipaul.cheernam@est.tech/
>
> AI-Generated: Uses Claude
> Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp>
> ---
Hi Prasanth,
Thanks for the update.
The backported patch is quite different from what we have upstream. I
can understand this is probably because master evolved and I believe the
result is fine, but choices could have been described a bit more in the
commit message.
> --- /dev/null
> +++ b/meta/recipes-support/libjitterentropy/libjitterentropy/0001-Use-pthreads-on-Linux-and-make-struct-jent_notime_ct.patch
> @@ -0,0 +1,75 @@
> +From 1bc2ca956d4c64b765c2f19751614949ebe3734d Mon Sep 17 00:00:00 2001
> +From: Prasanth R <ragaprasanth@gmail.com>
> +Date: Tue, 17 Nov 2026 10:12:23 +0900
> +Subject: [PATCH] Use pthreads on Linux and make struct jent_notime_ctx public
> +
> +3.7.0 switched Linux to C11 <threads.h> and moved struct jent_notime_ctx
> +out of jitterentropy.h. This breaks callers that install their own
> +thread handler with jent_entropy_switch_notime_impl(), such as
> +rng-tools: the start callback no longer takes a pthread start routine,
> +and the context is an incomplete type.
> +
> +Use pthreads on Linux again and define the pthread context in the
> +public header, as upstream did in commit a038d0c ("threads: always use
> +pthreads on Linux, add a native Win32 backend"). Only the Linux part
> +of that commit is taken.
> +
> +Upstream-Status: Backport [https://github.com/smuellerDD/jitterentropy-library/commit/a038d0c372f83aba10f3850c5b122dc5ff8cdc8c]
> +Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp>
> +
> +---
> + jitterentropy.h | 15 ++++++++++++++-
> + src/jitterentropy-timer.c | 8 +-------
> + 2 files changed, 15 insertions(+), 8 deletions(-)
> +
> +diff --git a/jitterentropy.h b/jitterentropy.h
> +index f935c09..3ab1ba3 100644
> +--- a/jitterentropy.h
> ++++ b/jitterentropy.h
> +@@ -154,10 +154,23 @@ extern "C" {
> + #endif
> + #endif
> +
> +-#if defined(__MINGW32__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
> ++#if defined(__MINGW32__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__)
> + #define JENT_PTHREAD
> + #endif
> +
> ++#ifdef JENT_PTHREAD
> ++#include <pthread.h>
> ++/*
> ++ * Context handed to the jent_notime_thread handlers. It is part of the API:
> ++ * a caller that installs its own handler with
> ++ * jent_entropy_switch_notime_impl() has to create and join the thread.
> ++ */
Where does this comment come from? I can't see that in the original
commit, nor anywhere in master commit?
> ++struct jent_notime_ctx {
> ++ pthread_attr_t notime_pthread_attr; /* pthreads library */
> ++ pthread_t notime_thread_id; /* pthreads thread ID */
> ++};
> ++#endif
> ++
> + /* Forward declaration of opaque value */
> + struct rand_data;
> +
> +diff --git a/src/jitterentropy-timer.c b/src/jitterentropy-timer.c
> +index 77f732e..2c974f5 100644
Again, I believe the overall result is fine: we are just moving a
structure here.
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-11-17 13:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 7:15 [PATCH 0/4] Upgrades on 02-10-2026 Jaipaul Cheernam
2026-10-02 7:15 ` [PATCH 1/4] libjitterentropy: upgrade 3.6.3 -> 3.7.0 Jaipaul Cheernam
2026-10-02 8:52 ` [OE-core] " Mathieu Dubois-Briand
2026-10-02 9:35 ` Alexander Kanavin
2026-10-05 6:51 ` Jaipaul Cheernam
2026-11-17 2:46 ` [PATCH v2] " Prasanth R
2026-11-17 3:01 ` Patchtest results for " patchtest
2026-11-17 13:40 ` Mathieu Dubois-Briand [this message]
2026-11-18 0:06 ` [OE-core] " Prasanth Ramesh
2026-11-18 0:03 ` [PATCH v3] " Prasanth R
2026-10-02 7:15 ` [PATCH 2/4] libjitterentropy: Fix HOMEPAGE Jaipaul Cheernam
2026-10-02 7:15 ` [PATCH 3/4] shadow: upgrade 4.20.2 -> 4.20.3 Jaipaul Cheernam
2026-10-02 8:25 ` [OE-core] " Mathieu Dubois-Briand
2026-10-02 10:49 ` Jaipaul Cheernam
2026-10-02 11:57 ` [PATCH v2] " Jaipaul Cheernam
2026-10-02 7:15 ` [PATCH 4/4] glib-networking: upgrade 2.80.1 -> 2.90.0 Jaipaul Cheernam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DMXJ1DVWTK13.TBQ9AVC1R0J5@bootlin.com \
--to=mathieu.dubois-briand@bootlin.com \
--cc=jaipaul.cheernam@est.tech \
--cc=openembedded-core@lists.openembedded.org \
--cc=ragaprasanth@gmail.com \
--cc=ross.burton@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox