Re: [RFC PATCH v1 0/6] use mm to manage NVDIMM (pmem) zone

From: Dan Williams
Date: Mon May 07 2018 - 15:30:46 EST


On Mon, May 7, 2018 at 12:18 PM, Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
> On Mon, May 07, 2018 at 11:57:10AM -0700, Dan Williams wrote:
>> I think adding yet one more mm-zone is the wrong direction. Instead,
>> what we have been considering is a mechanism to allow a device-dax
>> instance to be given back to the kernel as a distinct numa node
>> managed by the VM. It seems it times to dust off those patches.
>
> I was wondering how "safe" we think that ability is. NV-DIMM pages
> (obviously) differ from normal pages by their non-volatility. Do we
> want their contents from the previous boot to be observable? If not,
> then we need the BIOS to clear them at boot-up, which means we would
> want no kernel changes at all; rather the BIOS should just describe
> those pages as if they were DRAM (after zeroing them).

Certainly the BIOS could do it, but the impetus for having a kernel
mechanism to do the same is for supporting the configuration
flexibility afforded by namespaces, or otherwise having the capability
when the BIOS does not offer it. However, you are right that there are
extra security implications when System-RAM is persisted, perhaps
requiring the capacity to be explicitly locked / unlocked could
address that concern?