summaryrefslogtreecommitdiffstats
path: root/meta-agl-core/recipes-support/rng-tools/rng-tools/0001-rngd_jitter-fix-O_NONBLOCK-setting-for-entropy-pipe.patch
diff options
context:
space:
mode:
authorJulien Massot <julien.massot@iot.bzh>2021-01-28 08:36:05 +0000
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-02-04 15:38:11 +0000
commit446c37c2d9e1337ccbfecef8dbf7a2de73fbc035 (patch)
treee834125586ae381e8893457cbd62c354157609b5 /meta-agl-core/recipes-support/rng-tools/rng-tools/0001-rngd_jitter-fix-O_NONBLOCK-setting-for-entropy-pipe.patch
parentdd86e53d3eabcb5cd30b3ddda82b4c2de22c8c38 (diff)
meta-agl-core: fix entropy gathering on rng-tools 6.9
Bug-AGL: SPEC-3775 rngd daemon may spam the console when using an older version than 6.11. Backport patches from https://github.com/nhorman/rng-tools/pull/99/commits, while waiting for an update of rng-tools (>= 6.11) in poky repository. Change-Id: Icf55a648d4c30a3c94d2afaee91e6c0a2207a130 Signed-off-by: Julien Massot <julien.massot@iot.bzh> Change-Id: I08d1856ca6bd0be76b3c7fe0a962d73cebe8bef7 Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/25970 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-core/recipes-support/rng-tools/rng-tools/0001-rngd_jitter-fix-O_NONBLOCK-setting-for-entropy-pipe.patch')
-rw-r--r--meta-agl-core/recipes-support/rng-tools/rng-tools/0001-rngd_jitter-fix-O_NONBLOCK-setting-for-entropy-pipe.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta-agl-core/recipes-support/rng-tools/rng-tools/0001-rngd_jitter-fix-O_NONBLOCK-setting-for-entropy-pipe.patch b/meta-agl-core/recipes-support/rng-tools/rng-tools/0001-rngd_jitter-fix-O_NONBLOCK-setting-for-entropy-pipe.patch
new file mode 100644
index 000000000..3b44095cf
--- /dev/null
+++ b/meta-agl-core/recipes-support/rng-tools/rng-tools/0001-rngd_jitter-fix-O_NONBLOCK-setting-for-entropy-pipe.patch
@@ -0,0 +1,26 @@
+From 6ce86cb5cf06541cd5aad70fe8494b07b22c247e Mon Sep 17 00:00:00 2001
+From: Matthias Schiffer <matthias.schiffer@tq-group.com>
+Date: Wed, 27 Jan 2021 16:10:32 +0100
+Subject: [PATCH] rngd_jitter: fix O_NONBLOCK setting for entropy pipe
+
+A pointer was passed to fcntl instead of the flags variable, setting
+random flags.
+
+Signed-off-by: Matthias Schiffer <matthias.schiffer@tq-group.com>
+---
+ rngd_jitter.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rngd_jitter.c b/rngd_jitter.c
+index 32bac53..25b3543 100644
+--- a/rngd_jitter.c
++++ b/rngd_jitter.c
+@@ -465,7 +465,7 @@ int init_jitter_entropy_source(struct rng *ent_src)
+
+ flags = fcntl(pipefds[0], F_GETFL, 0);
+ flags |= O_NONBLOCK;
+- fcntl(pipefds[0], F_SETFL, &flags);
++ fcntl(pipefds[0], F_SETFL, flags);
+
+ if (ent_src->rng_options[JITTER_OPT_USE_AES].int_val) {
+ #ifdef HAVE_LIBGCRYPT