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] [day] [month] [year] [list]
Message-ID: <CAJZ5v0h2MceA7RMnWYNYjkwtpEupzuSEb_-_YpcUAY7v2gWtmw@mail.gmail.com>
Date:   Wed, 13 Apr 2022 17:02:28 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Amadeusz Sławiński 
        <amadeuszx.slawinski@...ux.intel.com>
Cc:     "the arch/x86 maintainers" <x86@...nel.org>,
        "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H . Peter Anvin" <hpa@...or.com>,
        Cezary Rojewski <cezary.rojewski@...el.com>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] x86/acpi: Preserve ACPI-table override during hibernation

On Tue, Mar 29, 2022 at 3:34 PM Amadeusz Sławiński
<amadeuszx.slawinski@...ux.intel.com> wrote:
>
> When overriding NHLT ACPI-table tests show that on some platforms
> there is problem that NHLT contains garbage after hibernation/resume
> cycle.
>
> Problem stems from the fact that ACPI override performs early memory
> allocation using memblock_phys_alloc_range() in
> memblock_phys_alloc_range(). This memory block is later being marked as
> ACPI memory block in arch_reserve_mem_area(). Later when memory areas
> are considered for hibernation it is being marked as nosave in
> e820__register_nosave_regions().
>
> Fix this by marking ACPI override memory area as ACPI NVS
> (Non-Volatile-Sleeping), which according to specification needs to be
> saved on entering S4 and restored when leaving and is implemented as
> such in kernel.
>
> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@...ux.intel.com>
> ---
>
> Changes in v2:
>  * Changed approach as method used in v1 introduced potential for memory
>    corruption, which was caught by tests.
>  * Adjusted commit message describing above change in approach.
>
> ---
>  arch/x86/kernel/acpi/boot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
> index 0d01e7f5078c..2eeca97b730b 100644
> --- a/arch/x86/kernel/acpi/boot.c
> +++ b/arch/x86/kernel/acpi/boot.c
> @@ -1772,7 +1772,7 @@ int __acpi_release_global_lock(unsigned int *lock)
>
>  void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size)
>  {
> -       e820__range_add(addr, size, E820_TYPE_ACPI);
> +       e820__range_add(addr, size, E820_TYPE_NVS);
>         e820__update_table_print();
>  }
>
> --

Given the lack of objections or concerns, applied as 5.19 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ