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-next>] [day] [month] [year] [list]
Message-ID: <bb30aa44d367ad217e9c877eba7b0a12@codeaurora.org>
Date:   Fri, 13 Nov 2020 18:41:22 -0800
From:   Sudarshan Rajagopalan <sudaraja@...eaurora.org>
To:     Anshuman Khandual <anshuman.khandual@....com>,
        David Hildenbrand <david@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Steven Price <steven.price@....com>,
        Will Deacon <will@...nel.org>,
        Catalin Marinas <catalin.marinas@....com>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Suren Baghdasaryan <surenb@...gle.com>,
        Pratik Patel <pratikp@...eaurora.org>
Subject: [RFC] depopulate_range_driver_managed() for removing page-table
 mappings for hot-added memory blocks


Hello,

When memory blocks are removed, along with removing the memmap entries, 
memory resource and memory block devices, the arch specific 
arch_remove_memory() is called which takes care of tearing down the 
page-tables.

Suppose there’s a usecase where the removed memory blocks will be added 
back into the system at later point, we can remove/offline the block in 
a way that all entries such as memmaps, memory resources and block 
devices can be kept intact so that they won’t be needed to be created 
again when blocks are added back. Now this can be done by doing offline 
alone. But if there’s special usecase where the page-table entries are 
needed to be teared down when blocks are offlined in order to avoid 
speculative accesses on offlined memory region, but also keep the memmap 
entries and block devices intact, I was thinking if we can implement 
something like {populate|depopulate}_range_driver_managed() that can be 
called after online/offline which can create/tear down page table 
mappings for that range. This would avoid us from the need to do 
remove_memory() entirely just for the sake of page-table entries being 
removed. We can now just offline the block and call 
depopulate_range_driver_managed.

This basically isolates arch_{add/remove}_memory outside of 
add/remove_memory routines so that drivers can choose if it needs to 
just offline and remove page-table mappings or hotremove memory 
entirely. This gives drivers the flexibility to retain memmap entries 
and memory resource and block device creation so that they can be 
skipped when blocks are added back – this helps us reduce the latencies 
for removing and adding memory blocks.

I’m still in the process the creating the patch that implements this, 
which would give clear view about this RFC but just putting out the 
thought here if it makes sense or not.


Sudarshan
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a 
Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ