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: <CAAVMmb62-S76f+7G7tf9Npd1ic7_+oAdo3NfGhizEm5iYhhf1g@mail.gmail.com>
Date:   Wed, 7 Sep 2016 22:10:12 -0400
From:   "Shreyas B. Prabhu" <shreyasbp@...il.com>
To:     "Gautham R. Shenoy" <ego@...ux.vnet.ibm.com>
Cc:     linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
        Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>,
        Michael Neuling <michael.neuling@....ibm.com>,
        Michael Ellerman <mpe@...erman.id.au>
Subject: Re: [PATCH] powernv: Restore SPRs correctly upon wake up from
 hypervisor state loss

Hi Gautham,

Thanks for fixing this.

On Wed, Sep 7, 2016 at 1:16 AM, Gautham R. Shenoy
<ego@...ux.vnet.ibm.com> wrote:
> From: "Gautham R. Shenoy" <ego@...ux.vnet.ibm.com>
>
> pnv_wakeup_tb_loss function currently expects the cr4 to be "eq" if
> the CPU is waking up from a complete hypervisor state loss. Hence, it
> currently restores the SPR contents only if cr4 is "eq".
>
> However, after the commit bcef83a00dc4 ("powerpc/powernv: Add platform
> support for stop instruction"), on ISA_V300 CPUs, the function
> pnv_restore_hyp_resource sets cr4 to contain the result of the
> comparison between state the CPU has woken up and the first deepest
> stop state before calling pnv_wakeup_tb_loss.
>
> Thus if the CPU woke up from a state that is deeper than the first
> deepest stop state, cr4 have "gt" set and hence, pnv_wakeup_tb_loss
> will fail to restore the SPRs on waking up from such a state.
>
> Fix the code in pnv_wakeup_tb_loss to restore the SPR states when cr4 is
> "eq" or "gt".
>
> Fixes: Commit bcef83a00dc4 ("powerpc/powernv: Add platform support for
> stop instruction")
>
> Cc: Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>
> Cc: Michael Neuling <michael.neuling@....ibm.com>
> Cc: Michael Ellerman <mpe@...erman.id.au>
> Cc: Shreyas B. Prabhu <shreyasbp@...il.com>
> Signed-off-by: Gautham R. Shenoy <ego@...ux.vnet.ibm.com>
> ---

Reviewed-by: Shreyas B. Prabhu <shreyasbp@...il.com>


Thanks,
Shreyas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ