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: <20200806224313.GA36490@lca.pw>
Date:   Thu, 6 Aug 2020 18:43:14 -0400
From:   Qian Cai <cai@....pw>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     torvalds@...ux-foundation.org, daniel.diaz@...aro.org,
        tytso@....edu, catalin.marinas@....com, will@...nel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        sfr@...b.auug.org.au, linux-next@...r.kernel.org
Subject: Re: [PATCH] random: fix a compilation error on arm64

On Thu, Aug 06, 2020 at 07:50:23AM -0700, Guenter Roeck wrote:
> On 8/6/20 6:58 AM, Qian Cai wrote:
> > linux-next failed to compile using this .config,
> > https://gitlab.com/cailca/linux-mm/-/blob/master/arm64.config
> > 
> > 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))
> >        ^~~~~~~~~~~~
> > cc1: some warnings being treated as errors
> > 
> 
> This happens because ARCH_RANDOM is disabled. May be I am wrong, but I
> would argue that __arm64_rndr() should not be called directly in the
> first place. arch_get_random_seed_long_early() should be called instead.

I am not sure about if that would cure possible ARCH_RANDOM=n compiling
failures on all arches. Since my patch would not compile on mips etc, an
alternative is to revert the buggy commit 585524081ecd for now. Any thought?

> 
> Thanks,
> Guenter
> 
> > Fixes: 585524081ecd ("random: random.h should include archrandom.h, not the other way around")
> > Signed-off-by: Qian Cai <cai@....pw>
> > ---
> >  include/linux/random.h | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/include/linux/random.h b/include/linux/random.h
> > index f45b8be3e3c4..da782c16c20c 100644
> > --- a/include/linux/random.h
> > +++ b/include/linux/random.h
> > @@ -12,6 +12,8 @@
> >  #include <linux/list.h>
> >  #include <linux/once.h>
> >  
> > +#include <asm/archrandom.h>
> > +
> >  #include <uapi/linux/random.h>
> >  
> >  struct random_ready_callback {
> > 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ