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: <3b4b2b3559bd3dc68adcddf99415bae57152cb6b.camel@intel.com>
Date:   Wed, 28 Oct 2020 21:15:38 +0000
From:   "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To:     "rppt@...nel.org" <rppt@...nel.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
CC:     "david@...hat.com" <david@...hat.com>,
        "cl@...ux.com" <cl@...ux.com>,
        "gor@...ux.ibm.com" <gor@...ux.ibm.com>,
        "hpa@...or.com" <hpa@...or.com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "catalin.marinas@....com" <catalin.marinas@....com>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "borntraeger@...ibm.com" <borntraeger@...ibm.com>,
        "penberg@...nel.org" <penberg@...nel.org>,
        "iamjoonsoo.kim@....com" <iamjoonsoo.kim@....com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "will@...nel.org" <will@...nel.org>,
        "aou@...s.berkeley.edu" <aou@...s.berkeley.edu>,
        "kirill@...temov.name" <kirill@...temov.name>,
        "rientjes@...gle.com" <rientjes@...gle.com>,
        "rppt@...ux.ibm.com" <rppt@...ux.ibm.com>,
        "paulus@...ba.org" <paulus@...ba.org>,
        "hca@...ux.ibm.com" <hca@...ux.ibm.com>,
        "pavel@....cz" <pavel@....cz>, "bp@...en8.de" <bp@...en8.de>,
        "sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>,
        "mpe@...erman.id.au" <mpe@...erman.id.au>,
        "luto@...nel.org" <luto@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "rjw@...ysocki.net" <rjw@...ysocki.net>,
        "linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
        "benh@...nel.crashing.org" <benh@...nel.crashing.org>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "palmer@...belt.com" <palmer@...belt.com>,
        "Brown, Len" <len.brown@...el.com>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "paul.walmsley@...ive.com" <paul.walmsley@...ive.com>
Subject: Re: [PATCH 2/4] PM: hibernate: improve robustness of mapping pages in
 the direct map

On Sun, 2020-10-25 at 12:15 +0200, Mike Rapoport wrote:
> +       if (IS_ENABLED(CONFIG_ARCH_HAS_SET_DIRECT_MAP)) {
> +               unsigned long addr = (unsigned
> long)page_address(page);
> +               int ret;
> +
> +               if (enable)
> +                       ret = set_direct_map_default_noflush(page);
> +               else
> +                       ret = set_direct_map_invalid_noflush(page);
> +
> +               if (WARN_ON(ret))
> +                       return;
> +
> +               flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
> +       } else {
> +               debug_pagealloc_map_pages(page, 1, enable);
> +       }

Looking at the arm side again, I think this might actually introduce a
regression for the arm/hibernate/DEBUG_PAGEALLOC combo.

Unlike __kernel_map_pages(), it looks like arm's cpa will always bail
in the set_direct_map_() functions if rodata_full is false. So if
rodata_full was disabled but debug page alloc is on, then this would
now skip remapping the pages. I guess the significance depends on
whether hibernate could actually try to save any DEBUG_PAGEALLOC
unmapped pages. Looks like it to me though.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ