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]
Date:   Tue, 28 May 2019 10:27:56 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Oleksandr Tyshchenko <olekstysh@...il.com>
Cc:     Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Julien Grall <julien.grall@....com>,
        Simon Horman <horms@...ge.net.au>,
        Magnus Damm <magnus.damm@...il.com>,
        Russell King <linux@...linux.org.uk>,
        Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>
Subject: Re: [PATCH V5] ARM: mach-shmobile: Don't init CNTVOFF/counter if PSCI
 is available

Hi Oleksandr,

On Fri, May 17, 2019 at 11:58 AM Oleksandr Tyshchenko
<olekstysh@...il.com> wrote:
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>
>
> If PSCI is available then most likely we are running on PSCI-enabled
> U-Boot which, we assume, has already taken care of resetting CNTVOFF
> and updating counter module before switching to non-secure mode
> and we don't need to.
>
> As the psci_smp_available() helper always returns false if CONFIG_SMP
> is disabled, it can't be used safely as an indicator of PSCI usage.
> For that reason, we check for the mandatory PSCI operation to be
> available.
>
> Please note, an extra check to prevent secure_cntvoff_init() from
> being called for secondary CPUs in headsmp-apmu.S is not needed,
> as SMP code for APMU based system is not executed if PSCI is in use.
>
> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>

>    Changes in v5:
>       - Check for psci_ops.cpu_on if CONFIG_ARM_PSCI_FW is defined

Thanks for the update!

Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>

Two cosmetic comments below. I'll leave it to Simon to ignore them for
applying ;-)

> @@ -62,6 +63,21 @@ void __init rcar_gen2_timer_init(void)
>  {
>         void __iomem *base;
>         u32 freq;
> +       bool need_update = true;

Some people like reverse Xmas tree declaration order...

> +
> +       /*
> +        * If PSCI is available then most likely we are running on PSCI-enabled
> +        * U-Boot which, we assume, has already taken care of resetting CNTVOFF
> +        * and updating counter module before switching to non-secure mode
> +        * and we don't need to.
> +        */
> +#if defined(CONFIG_ARM_PSCI_FW)

#ifdef CONFIG_ARM_PSCI_FW ?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ