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
| ||
|
Date: Thu, 2 May 2019 12:47:52 -0400 From: Pavel Tatashin <pasha.tatashin@...een.com> To: Dan Williams <dan.j.williams@...el.com> Cc: James Morris <jmorris@...ei.org>, Sasha Levin <sashal@...nel.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Linux MM <linux-mm@...ck.org>, linux-nvdimm <linux-nvdimm@...ts.01.org>, Andrew Morton <akpm@...ux-foundation.org>, Michal Hocko <mhocko@...e.com>, Dave Hansen <dave.hansen@...ux.intel.com>, Keith Busch <keith.busch@...el.com>, Vishal L Verma <vishal.l.verma@...el.com>, Dave Jiang <dave.jiang@...el.com>, Ross Zwisler <zwisler@...nel.org>, Tom Lendacky <thomas.lendacky@....com>, "Huang, Ying" <ying.huang@...el.com>, Fengguang Wu <fengguang.wu@...el.com>, Borislav Petkov <bp@...e.de>, Bjorn Helgaas <bhelgaas@...gle.com>, Yaowei Bai <baiyaowei@...s.chinamobile.com>, Takashi Iwai <tiwai@...e.de>, Jérôme Glisse <jglisse@...hat.com>, David Hildenbrand <david@...hat.com> Subject: Re: [v4 2/2] device-dax: "Hotremove" persistent memory that is used like normal RAM > Currently the kmem driver can be built as a module, and I don't see a > need to drop that flexibility. What about wrapping these core > routines: > > unlock_device_hotplug > __remove_memory > walk_memory_range > lock_device_hotplug > > ...into a common exported (gpl) helper like: > > int try_remove_memory(int nid, struct resource *res) > > Because as far as I can see there's nothing device-dax specific about > this "try remove iff offline" functionality outside of looking up the > related 'struct resource'. The check_devdax_mem_offlined_cb callback > can be made generic if the callback argument is the resource pointer. Makes sense, I will do both things that you suggested. Thank you, Pasha
Powered by blists - more mailing lists