Re: [PATCH 5.7 0/6] 5.7.14-rc1 review

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 5, 2020 at 11:24 AM Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
>
> Same with older versions of gcc. I don't see the problem with the
> mainline kernel.

  https://www.youtube.com/watch?v=-b5aW08ivHU

> I think this is caused by more recursive includes.
> arch/arm64/include/asm/archrandom.h includes include/linux/random.h
> which includes arch/arm64/include/asm/archrandom.h to get the definition
> of arch_get_random_seed_long_early (which it won't get because of
> the recursion).
>
> What I don't really understand is how this works with new versions
> of gcc.

Is that the only place it triggers?

Because the trivial fix would be something like the appended, which is
the right thing to do anyway.

              Linus

diff --git a/arch/arm64/kernel/kaslr.c b/arch/arm64/kernel/kaslr.c
index 07c4c8cc4a67..9ded4237e1c1 100644
--- a/arch/arm64/kernel/kaslr.c
+++ b/arch/arm64/kernel/kaslr.c
@@ -11,8 +11,8 @@
 #include <linux/sched.h>
 #include <linux/types.h>
 #include <linux/pgtable.h>
+#include <linux/random.h>

-#include <asm/archrandom.h>
 #include <asm/cacheflush.h>
 #include <asm/fixmap.h>
 #include <asm/kernel-pgtable.h>



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux