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:   Mon, 4 Apr 2022 20:56:56 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Akihiko Odaki <akihiko.odaki@...il.com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
        "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Borislav Petkov <bp@...en8.de>,
        Dan Williams <dan.j.williams@...el.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Kuppuswamy Sathyanarayanan <knsathya@...nel.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...hat.com>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Kuppuswamy Sathyanarayanan 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Tony Luck <tony.luck@...el.com>,
        "the arch/x86 maintainers" <x86@...nel.org>
Subject: Re: [PATCH] Revert "ACPI: processor: idle: Only flush cache on
 entering C3"

On Mon, Apr 4, 2022 at 8:25 PM Akihiko Odaki <akihiko.odaki@...il.com> wrote:
>
> On 2022/04/05 3:13, Rafael J. Wysocki wrote:
> > On Sun, Apr 3, 2022 at 8:25 AM Akihiko Odaki <akihiko.odaki@...il.com> wrote:
> >>
> >> This reverts commit 87ebbb8c612b1214f227ebb8f25442c6d163e802.
> >>
> >> ACPI processor power states can be transitioned in two distinct
> >> situations: 1. when CPU goes idle and 2. before CPU goes offline
> >> ("playing dead") to suspend or hibernate. Case 1 is handled by
> >> acpi_idle_enter or acpi_idle_enter_s2idle. Case 2 is handled by
> >> acpi_idle_play_dead.
> >>
> >> It is necessary to flush CPU caches in case 2 even if it is not
> >> required to transit ACPI processor power states as CPU will go
> >> offline soon. However, the reverted commit incorrectly removed CPU
> >> cache flushing in such a condition.
> >
> > I think what you mean is that the CPU cache must always be flushed in
> > acpi_idle_play_dead(), regardless of the target C-state that is going
> > to be requested, because this is likely to be part of a CPU offline
> > procedure or preparation for entering a system-wide sleep state and
> > the stale cache contents may lead to problems going forward, for
> > example when the CPU is taken back online.
> >
> > If so, I will put the above information into the patch changelog.
>
> I guess it is causing problems because the dirty caches will not get
> written back and the RAM becomes stale if they are not flushed. From my
> understanding, the CPU should have an empty cache and read back contents
> from RAM when it is taken back online.

OK, please see if the changelog I've added to the patch is looking good:

https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=dfbba2518aac4204203b0697a894d3b2f80134d3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ