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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXEb5sT-KaHMUB1jU8kO69Pf97XG39xW9xDat62yxwZA1Q@mail.gmail.com>
Date:   Fri, 22 Jul 2022 17:17:20 +0200
From:   Ard Biesheuvel <ardb@...nel.org>
To:     Lukas Bulwahn <lukas.bulwahn@...il.com>
Cc:     Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "Jason A . Donenfeld" <Jason@...c4.com>,
        kernel-janitors@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] arm64: adjust KASLR relocation after ARCH_RANDOM removal

On Thu, 21 Jul 2022 at 12:04, Lukas Bulwahn <lukas.bulwahn@...il.com> wrote:
>
> Commit aacd149b6238 ("arm64: head: avoid relocating the kernel twice for
> KASLR") adds the new file arch/arm64/kernel/pi/kaslr_early.c with a small
> code part guarded by '#ifdef CONFIG_ARCH_RANDOM'.
>
> Concurrently, commit 9592eef7c16e ("random: remove CONFIG_ARCH_RANDOM")
> removes the config CONFIG_ARCH_RANDOM and turns all '#ifdef
> CONFIG_ARCH_RANDOM' code parts into unconditional code parts, which is
> generally safe to do.
>
> Remove a needless ifdef guard after the ARCH_RANDOM removal.
>
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@...il.com>

Acked-by: Ard Biesheuvel <ardb@...nel.org>

> ---
>  arch/arm64/kernel/pi/kaslr_early.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm64/kernel/pi/kaslr_early.c b/arch/arm64/kernel/pi/kaslr_early.c
> index 6c3855e69395..17bff6e399e4 100644
> --- a/arch/arm64/kernel/pi/kaslr_early.c
> +++ b/arch/arm64/kernel/pi/kaslr_early.c
> @@ -94,11 +94,9 @@ asmlinkage u64 kaslr_early_init(void *fdt)
>
>         seed = get_kaslr_seed(fdt);
>         if (!seed) {
> -#ifdef CONFIG_ARCH_RANDOM
> -                if (!__early_cpu_has_rndr() ||
> -                    !__arm64_rndr((unsigned long *)&seed))
> -#endif
> -               return 0;
> +               if (!__early_cpu_has_rndr() ||
> +                   !__arm64_rndr((unsigned long *)&seed))
> +                       return 0;
>         }
>
>         /*
> --
> 2.17.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ