This is a note to let you know that I've just added the patch titled fdt: Update CRC check for rng-seed to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: fdt-update-crc-check-for-rng-seed.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From dd753d961c4844a39f947be115b3d81e10376ee5 Mon Sep 17 00:00:00 2001 From: Hsin-Yi Wang <hsinyi@xxxxxxxxxxxx> Date: Tue, 27 Aug 2019 18:33:53 +0800 Subject: fdt: Update CRC check for rng-seed From: Hsin-Yi Wang <hsinyi@xxxxxxxxxxxx> commit dd753d961c4844a39f947be115b3d81e10376ee5 upstream. Commit 428826f5358c ("fdt: add support for rng-seed") moves of_fdt_crc32 from early_init_dt_verify() to early_init_dt_scan() since early_init_dt_scan_chosen() may modify fdt to erase rng-seed. However, arm and some other arch won't call early_init_dt_scan(), they call early_init_dt_verify() then early_init_dt_scan_nodes(). Restore of_fdt_crc32 to early_init_dt_verify() then update it in early_init_dt_scan_chosen() if fdt if updated. Fixes: 428826f5358c ("fdt: add support for rng-seed") Reported-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> Signed-off-by: Hsin-Yi Wang <hsinyi@xxxxxxxxxxxx> Tested-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> Signed-off-by: Will Deacon <will@xxxxxxxxxx> Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/of/fdt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -1119,6 +1119,10 @@ int __init early_init_dt_scan_chosen(uns /* try to clear seed so it won't be found. */ fdt_nop_property(initial_boot_params, node, "rng-seed"); + + /* update CRC check value */ + of_fdt_crc32 = crc32_be(~0, initial_boot_params, + fdt_totalsize(initial_boot_params)); } /* break now */ @@ -1223,6 +1227,8 @@ bool __init early_init_dt_verify(void *p /* Setup flat device-tree pointer */ initial_boot_params = params; + of_fdt_crc32 = crc32_be(~0, initial_boot_params, + fdt_totalsize(initial_boot_params)); return true; } @@ -1248,8 +1254,6 @@ bool __init early_init_dt_scan(void *par return false; early_init_dt_scan_nodes(); - of_fdt_crc32 = crc32_be(~0, initial_boot_params, - fdt_totalsize(initial_boot_params)); return true; } Patches currently in stable-queue which might be from hsinyi@xxxxxxxxxxxx are queue-4.19/fdt-update-crc-check-for-rng-seed.patch