# git rev-parse -q --verify 1c9df907da83812e4f33b59d3d142c864d9da57f^{commit} 1c9df907da83812e4f33b59d3d142c864d9da57f already have revision, skipping fetch # git checkout -q -f -B kisskb 1c9df907da83812e4f33b59d3d142c864d9da57f # git clean -qxdf # < git log -1 # commit 1c9df907da83812e4f33b59d3d142c864d9da57f # Author: Willy Tarreau # Date: Thu Jul 30 07:59:24 2020 +0200 # # random: fix circular include dependency on arm64 after addition of percpu.h # # Daniel Díaz and Kees Cook independently reported that commit # f227e3ec3b5c ("random32: update the net random state on interrupt and # activity") broke arm64 due to a circular dependency on include files # since the addition of percpu.h in random.h. # # The correct fix would definitely be to move all the prandom32 stuff out # of random.h but for backporting, a smaller solution is preferred. # # This one replaces linux/percpu.h with asm/percpu.h, and this fixes the # problem on x86_64, arm64, arm, and mips. Note that moving percpu.h # around didn't change anything and that removing it entirely broke # differently. When backporting, such options might still be considered # if this patch fails to help. # # [ It turns out that an alternate fix seems to be to just remove the # troublesome remove from the arm64 # that causes the circular dependency. # # But we might as well do the whole belt-and-suspenders thing, and # minimize inclusion in too. Either will fix the # problem, and both are good changes. - Linus ] # # Reported-by: Daniel Díaz # Reported-by: Kees Cook # Tested-by: Marc Zyngier # Fixes: f227e3ec3b5c # Cc: Stephen Rothwell # Signed-off-by: Willy Tarreau # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux-ld --version # < git log --format=%s --max-count=1 1c9df907da83812e4f33b59d3d142c864d9da57f # < make -s -j 80 ARCH=sh O=/kisskb/build/linus_rsk7201_defconfig_sh4-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux- rsk7201_defconfig # < make -s -j 80 ARCH=sh O=/kisskb/build/linus_rsk7201_defconfig_sh4-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux- help # make -s -j 80 ARCH=sh O=/kisskb/build/linus_rsk7201_defconfig_sh4-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux- olddefconfig # make -s -j 80 ARCH=sh O=/kisskb/build/linus_rsk7201_defconfig_sh4-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux- Generating include/generated/machtypes.h :1511:2: warning: #warning syscall clone3 not implemented [-Wcpp] /kisskb/src/arch/sh/kernel/cpu/sh2a/../../entry-common.S: Assembler messages: /kisskb/src/arch/sh/kernel/cpu/sh2a/../../entry-common.S:385: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /kisskb/src/arch/sh/kernel/cpu/sh2a/../../entry-common.S:388: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /kisskb/src/drivers/sh/clk/cpg.c: In function 'r8': /kisskb/src/drivers/sh/clk/cpg.c:41:17: warning: passing argument 1 of 'ioread8' discards 'const' qualifier from pointer target type return ioread8(addr); ^ In file included from /kisskb/src/arch/sh/include/asm/io.h:21:0, from /kisskb/src/include/linux/io.h:13, from /kisskb/src/drivers/sh/clk/cpg.c:14: /kisskb/src/include/asm-generic/iomap.h:29:21: note: expected 'void *' but argument is of type 'const void *' extern unsigned int ioread8(void __iomem *); ^ /kisskb/src/drivers/sh/clk/cpg.c: In function 'r16': /kisskb/src/drivers/sh/clk/cpg.c:46:18: warning: passing argument 1 of 'ioread16' discards 'const' qualifier from pointer target type return ioread16(addr); ^ In file included from /kisskb/src/arch/sh/include/asm/io.h:21:0, from /kisskb/src/include/linux/io.h:13, from /kisskb/src/drivers/sh/clk/cpg.c:14: /kisskb/src/include/asm-generic/iomap.h:30:21: note: expected 'void *' but argument is of type 'const void *' extern unsigned int ioread16(void __iomem *); ^ /kisskb/src/drivers/sh/clk/cpg.c: In function 'r32': /kisskb/src/drivers/sh/clk/cpg.c:51:18: warning: passing argument 1 of 'ioread32' discards 'const' qualifier from pointer target type return ioread32(addr); ^ In file included from /kisskb/src/arch/sh/include/asm/io.h:21:0, from /kisskb/src/include/linux/io.h:13, from /kisskb/src/drivers/sh/clk/cpg.c:14: /kisskb/src/include/asm-generic/iomap.h:32:21: note: expected 'void *' but argument is of type 'const void *' extern unsigned int ioread32(void __iomem *); ^ Image Name: Linux-5.8.0-rc7+ Created: Fri Jul 31 05:18:09 2020 Image Type: SuperH Linux Kernel Image (gzip compressed) Data Size: 1637364 Bytes = 1598.99 KiB = 1.56 MiB Load Address: 08001000 Entry Point: 08002000 Image arch/sh/boot/uImage is ready Completed OK # rm -rf /kisskb/build/linus_rsk7201_defconfig_sh4-gcc4.9 # Build took: 0:00:29.401664