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]
Date:   Mon, 25 Jul 2022 09:46:04 +0300
From:   Mike Rapoport <rppt@...nel.org>
To:     Will Deacon <will@...nel.org>
Cc:     "guanghui.fgh" <guanghuifeng@...ux.alibaba.com>,
        baolin.wang@...ux.alibaba.com, catalin.marinas@....com,
        akpm@...ux-foundation.org, david@...hat.com, jianyong.wu@....com,
        james.morse@....com, quic_qiancai@...cinc.com,
        christophe.leroy@...roup.eu, jonathan@...ek.ca,
        mark.rutland@....com, thunder.leizhen@...wei.com,
        anshuman.khandual@....com, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, geert+renesas@...der.be,
        ardb@...nel.org, linux-mm@...ck.org, yaohongbo@...ux.alibaba.com,
        alikernel-developer@...ux.alibaba.com
Subject: Re: [PATCH v5] arm64: mm: fix linear mem mapping access performance
 degradation

On Mon, Jul 18, 2022 at 02:10:06PM +0100, Will Deacon wrote:
> On Sun, Jul 10, 2022 at 11:33:02PM +0800, guanghui.fgh wrote:
> > In short, this path work:
> > 
> > 1.Before doing work for rebuiling crashkernel mem, the pgd is swapper_pg_dir
> > in [[[ttbr1]]]
> > 
> > 2.Change the [[[ttbr0]]]to use idmap_pg_dir pgd
> > 
> > 3.The [[[idmap_cpu_replace_ttbr1_with_flush_tlb]]] are mapped [[[only]]]
> > with idmap_pg_dir mapping in [[[ttbr0]]]
> > 
> > 4.The [[[idmap_cpu_replace_ttbr1_with_flush_tlb]]] will flush tlb all,
> > switch [[[ttbr1]]] to use init_pg_dir pgd(and flush tlb all again).
> > There is no tlb conflict to swapper_pg_dir.
> > There is no tlb cache for swapper_pg_dir.
> > 
> > 5.Woring with init_pg_dir pgd to access swapper_pg_dir pagetable with fix
> > mapping. And modify crashkernel mapping in the swapper_pg_dir without any
> > tlb conflict and flush.
> > 
> > 6.When finishing the work, switch ttbr1 pgd to the origin swapper_pg_dir
> > with cpu_replace_ttbr1 function(similar to the above).
> 
> I do not think that this complexity is justified. As I have stated on
> numerous occasions already, I would prefer that we leave the crashkernel
> mapped when rodata is not "full". That fixes your performance issue and
> matches what we do for module code, so I do not see a security argument
> against it.

The protection of the crash kernel is not about security. This is about an
ability to do post mortem with kdump and such when the things go awry.

I think it's possible to have both large pages in the linear map and the
protection of crash kernel in much simpler way that this patch does, I'll
try to send an RFC Really Soon.

> I do not plan to merge this patch as-is.
> 
> Thanks,
> 
> Will

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ