lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <83936870-0aa7-bc0c-46d3-401479f446ee@roeck-us.net>
Date:   Fri, 7 Aug 2020 11:00:49 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Catalin Marinas <catalin.marinas@....com>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Will Deacon <will@...nel.org>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Daniel Díaz <daniel.diaz@...aro.org>,
        tytso@....edu, Qian Cai <cai@....pw>,
        Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH v2] arm64: kaslr: Use standard early random function

On 8/7/20 10:35 AM, Catalin Marinas wrote:
> On Fri, Aug 07, 2020 at 07:45:21AM -0700, Guenter Roeck wrote:
>> Commit 585524081ecd ("random: random.h should include archrandom.h, not
>> the other way around") tries to fix a problem with recursive inclusion
>> of linux/random.h and arch/archrandom.h for arm64. Unfortunately, this
>> results in the following compile error if ARCH_RANDOM is disabled.
>>
>> arch/arm64/kernel/kaslr.c: In function 'kaslr_early_init':
>> arch/arm64/kernel/kaslr.c:128:6: error: implicit declaration of function
>> '__early_cpu_has_rndr'; did you mean '__early_pfn_to_nid'?
>> [-Werror=implicit-function-declaration]
>>   if (__early_cpu_has_rndr()) {
>>       ^~~~~~~~~~~~~~~~~~~~
>>       __early_pfn_to_nid
>> arch/arm64/kernel/kaslr.c:131:7: error: implicit declaration of function
>> '__arm64_rndr' [-Werror=implicit-function-declaration]
>>    if (__arm64_rndr(&raw))
>>        ^~~~~~~~~~~~
>>
>> Problem is that arch/archrandom.h is only included from linux/random.h if
>> ARCH_RANDOM is enabled. If not, __arm64_rndr() and __early_cpu_has_rndr()
>> are undeclared, causing the problem.
>>
>> Use arch_get_random_seed_long_early() instead of arm64 specific functions
>> to solve the problem.
>>
>> Reported-by: Qian Cai <cai@....pw>
>> Fixes: 585524081ecd ("random: random.h should include archrandom.h, not the other way around")
>> Cc: Qian Cai <cai@....pw>
>> Cc: Mark Brown <broonie@...nel.org>
>> Reviewed-by: Mark Rutland <mark.rutland@....com>
>> Reviewed-by: Mark Brown <broonie@...nel.org>
>> Tested-by: Mark Brown <broonie@...nel.org>
>> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
> 
> Acked-by: Catalin Marinas <catalin.marinas@....com>
> 
> Linus, could you please pick this up directly? Otherwise, it will wait
> until we reach -rc1 to avoid basing a branch on a random commit.
> 
> (at the moment I can't build Linus' tree at all, fails early with some
> device tree errors)
> 

You either need to revert the dts changes, or you have to pull in
"dt-bindings: agilex: add NAND_X_CLK and NAND_ECC_CLK" from
linux-next to fix that problem. I did the latter to test this patch.
Hopefully the problem resolves itself after the clock tree has been
merged (though -next itself is in pretty bad shape too, so by then
we may see other problems).

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ