diff --git a/CHANGELOG.md b/CHANGELOG.md index 906b86e..3377b7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ Change log ----------- +# v2.13.6+rev1 +## (2018-07-13) + +* Update the meta-resin submodule to version v2.13.6 [Sebastian] +* linux-mainline: Revert "random: fix crng_ready() test" patch [Sebastian] +* coffeescript: Add instructions for flashing OrangePi Plus2 [Thodoris] + # v2.13.5+rev1 ## (2018-07-09) diff --git a/VERSION b/VERSION index 5641262..6224ccf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.13.5+rev1 +2.13.6+rev1 diff --git a/layers/meta-resin b/layers/meta-resin index 84cfe72..e167839 160000 --- a/layers/meta-resin +++ b/layers/meta-resin @@ -1 +1 @@ -Subproject commit 84cfe72157abf81a1615b927eec5575839123c1c +Subproject commit e167839b84b4e93313942a47078a896a6e32b6a2 diff --git a/layers/meta-resin-allwinner/recipes-kernel/linux/linux-mainline-4.17.3/0001-Revert-random-fix-crng_ready-test.patch b/layers/meta-resin-allwinner/recipes-kernel/linux/linux-mainline-4.17.3/0001-Revert-random-fix-crng_ready-test.patch new file mode 100644 index 0000000..e09f066 --- /dev/null +++ b/layers/meta-resin-allwinner/recipes-kernel/linux/linux-mainline-4.17.3/0001-Revert-random-fix-crng_ready-test.patch @@ -0,0 +1,75 @@ +From 454598f8cef2fc2dead0e139e6844d7b5da624e8 Mon Sep 17 00:00:00 2001 +From: Sebastian Panceac +Date: Fri, 13 Jul 2018 15:49:58 +0300 +Subject: [PATCH] Revert "random: fix crng_ready() test" + +This reverts commit 43838a23a05fbd13e47d750d3dfd77001536dd33. + +The reason for reverting this commit is that entropy gets acquired very +hard on Orange Pi Plus2. + +The hardware crypto module is not supported yet for H3 SoC in this kernel version. +It is expected to be included in 4.18 kernel. + +As NetworkManager is depending on randomness to succesfully set its connections, if we don't revert +this commit, the board can get blocked for minutes until it succesfully connects to a network. + +This patch should be reverted immediately when upgrading to a kernel where hw crypto is supported. + +Upstream-Status: Inappropriate [configuration] +Signed-off-by: Sebastian Panceac +--- + drivers/char/random.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/drivers/char/random.c b/drivers/char/random.c +index cd888d4..02fa271 100644 +--- a/drivers/char/random.c ++++ b/drivers/char/random.c +@@ -428,7 +428,7 @@ struct crng_state primary_crng = { + * its value (from 0->1->2). + */ + static int crng_init = 0; +-#define crng_ready() (likely(crng_init > 1)) ++#define crng_ready() (likely(crng_init > 0)) + static int crng_init_cnt = 0; + static unsigned long crng_global_init_time = 0; + #define CRNG_INIT_CNT_THRESH (2*CHACHA20_KEY_SIZE) +@@ -843,7 +843,7 @@ static int crng_fast_load(const char *cp, size_t len) + + if (!spin_trylock_irqsave(&primary_crng.lock, flags)) + return 0; +- if (crng_init != 0) { ++ if (crng_ready()) { + spin_unlock_irqrestore(&primary_crng.lock, flags); + return 0; + } +@@ -966,6 +966,7 @@ static void _extract_crng(struct crng_state *crng, + if (crng_ready() && + (time_after(crng_global_init_time, crng->init_time) || + time_after(jiffies, crng->init_time + CRNG_RESEED_INTERVAL))) ++ + crng_reseed(crng, crng == &primary_crng ? &input_pool : NULL); + spin_lock_irqsave(&crng->lock, flags); + if (arch_get_random_long(&v)) +@@ -1245,7 +1246,7 @@ void add_interrupt_randomness(int irq, int irq_flags) + fast_mix(fast_pool); + add_interrupt_bench(cycles); + +- if (unlikely(crng_init == 0)) { ++ if (!crng_ready()) { + if ((fast_pool->count >= 64) && + crng_fast_load((char *) fast_pool->pool, + sizeof(fast_pool->pool))) { +@@ -2314,7 +2315,7 @@ void add_hwgenerator_randomness(const char *buffer, size_t count, + { + struct entropy_store *poolp = &input_pool; + +- if (unlikely(crng_init == 0)) { ++ if (!crng_ready()) { + crng_fast_load(buffer, count); + return; + } +-- +2.7.4 + diff --git a/layers/meta-resin-allwinner/recipes-kernel/linux/linux-mainline_4.17.3.bb b/layers/meta-resin-allwinner/recipes-kernel/linux/linux-mainline_4.17.3.bb index 20d27ac..15da81d 100644 --- a/layers/meta-resin-allwinner/recipes-kernel/linux/linux-mainline_4.17.3.bb +++ b/layers/meta-resin-allwinner/recipes-kernel/linux/linux-mainline_4.17.3.bb @@ -23,4 +23,5 @@ SRC_URI = "https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${PV}.tar.xz \ file://defconfig \ file://don-t-default-activate-regdb.patch \ file://0001-Enable-i2c0-on-OrangePi-Plus2-board.patch \ + file://0001-Revert-random-fix-crng_ready-test.patch \ "