Re: [mm PATCH v5 3/7] mm: Implement new zone specific memblock iterator

2018-11-09 Thread Pavel Tatashin
> +/** > + * for_each_free_mem_range_in_zone - iterate through zone specific free > + * memblock areas > + * @i: u64 used as loop variable > + * @zone: zone in which all of the memory blocks reside > + * @p_start: ptr to phys_addr_t for start address of the range, can be %NULL > + * @p_end: ptr to

Re: [mm PATCH v5 0/7] Deferred page init improvements

2018-11-09 Thread Alexander Duyck
On Fri, 2018-11-09 at 19:00 -0500, Pavel Tatashin wrote: > On 18-11-09 15:14:35, Alexander Duyck wrote: > > On Fri, 2018-11-09 at 16:15 -0500, Pavel Tatashin wrote: > > > On 18-11-05 13:19:25, Alexander Duyck wrote: > > > > This patchset is essentially a refactor of the page initialization logic >

Re: [mm PATCH v5 0/7] Deferred page init improvements

2018-11-09 Thread Pavel Tatashin
On 18-11-09 16:46:02, Alexander Duyck wrote: > On Fri, 2018-11-09 at 19:00 -0500, Pavel Tatashin wrote: > > On 18-11-09 15:14:35, Alexander Duyck wrote: > > > On Fri, 2018-11-09 at 16:15 -0500, Pavel Tatashin wrote: > > > > On 18-11-05 13:19:25, Alexander Duyck wrote: > > > > > This patchset is

Re: [PATCH 02/11] libnvdimm/security: change clear text nvdimm keys to encrypted keys

2018-11-09 Thread Dan Williams
On Fri, Nov 9, 2018 at 2:13 PM Dave Jiang wrote: > > In order to make nvdimm more secure, encrypted keys will be used instead of > clear text keys. A master key will be created to seal encrypted nvdimm > keys. The master key can be a trusted key generated from TPM 2.0 or a less > secure user key.

Re: [mm PATCH v5 3/7] mm: Implement new zone specific memblock iterator

2018-11-09 Thread Pavel Tatashin
> > > + unsigned long epfn = PFN_DOWN(epa); > > > + unsigned long spfn = PFN_UP(spa); > > > + > > > + /* > > > + * Verify the end is at least past the start of the zone and > > > + * that we have at least one PFN to initialize. > > > + */ > > > +

[PATCH] acpi/nfit, device-dax: Identify differentiated memory with a unique numa-node

2018-11-09 Thread Dan Williams
Persistent memory, as described by the ACPI NFIT (NVDIMM Firmware Interface Table), is the first known instance of a memory range described by a unique "target" proximity domain. Where "initiator" and "target" proximity domains is an approach that the ACPI HMAT (Heterogeneous Memory Attributes

Re: [mm PATCH v5 0/7] Deferred page init improvements

2018-11-09 Thread Pavel Tatashin
On 18-11-09 15:14:35, Alexander Duyck wrote: > On Fri, 2018-11-09 at 16:15 -0500, Pavel Tatashin wrote: > > On 18-11-05 13:19:25, Alexander Duyck wrote: > > > This patchset is essentially a refactor of the page initialization logic > > > that is meant to provide for better code reuse while

Re: [mm PATCH v5 3/7] mm: Implement new zone specific memblock iterator

2018-11-09 Thread Alexander Duyck
On Fri, 2018-11-09 at 18:26 -0500, Pavel Tatashin wrote: > > +/** > > + * for_each_free_mem_range_in_zone - iterate through zone specific free > > + * memblock areas > > + * @i: u64 used as loop variable > > + * @zone: zone in which all of the memory blocks reside > > + * @p_start: ptr to

Re: [mm PATCH v5 6/7] mm: Add reserved flag setting to set_page_links

2018-11-09 Thread Pavel Tatashin
On 18-11-05 13:19:56, Alexander Duyck wrote: > This patch modifies the set_page_links function to include the setting of > the reserved flag via a simple AND and OR operation. The motivation for > this is the fact that the existing __set_bit call still seems to have > effects on performance as

RE: [PATCH 10/11] tools/testing/nvdimm: add Intel DSM 1.8 support for nfit_test

2018-11-09 Thread Elliott, Robert (Persistent Memory)
> -Original Message- > From: Linux-nvdimm On Behalf Of > Dave Jiang > Sent: Friday, November 09, 2018 4:15 PM > To: dan.j.willi...@intel.com; zo...@linux.vnet.ibm.com > Cc: linux-nvdimm@lists.01.org > Subject: [PATCH 10/11] tools/testing/nvdimm: add Intel DSM 1.8 > support for

Re: [mm PATCH v5 5/7] mm: Move hot-plug specific memory init into separate functions and optimize

2018-11-09 Thread Pavel Tatashin
On 18-11-05 13:19:50, Alexander Duyck wrote: > This patch is going through and combining the bits in memmap_init_zone and > memmap_init_zone_device that are related to hotplug into a single function > called __memmap_init_hotplug. > > I also took the opportunity to integrate __init_single_page's

RE: [PATCH 07/11] libnvdimm/security: add overwrite status notification

2018-11-09 Thread Elliott, Robert (Persistent Memory)
> -Original Message- > From: Linux-nvdimm On Behalf Of > Dave Jiang > Sent: Friday, November 09, 2018 4:14 PM > Subject: [PATCH 07/11] libnvdimm/security: add overwrite status > notification > ... > @@ -2033,6 +2033,11 @@ static int acpi_nfit_register_dimms(struct > acpi_nfit_desc

Re: [mm PATCH v5 4/7] mm: Initialize MAX_ORDER_NR_PAGES at a time instead of doing larger sections

2018-11-09 Thread Pavel Tatashin
On 18-11-05 13:19:45, Alexander Duyck wrote: > } > - first_init_pfn = max(zone->zone_start_pfn, first_init_pfn); > + > + /* If the zone is empty somebody else may have cleared out the zone */ > + if (!deferred_init_mem_pfn_range_in_zone(, zone, , , > +

Re: [mm PATCH v5 7/7] mm: Use common iterator for deferred_init_pages and deferred_free_pages

2018-11-09 Thread Pavel Tatashin
On 18-11-05 13:20:01, Alexander Duyck wrote: > +static unsigned long __next_pfn_valid_range(unsigned long *i, > + unsigned long end_pfn) > { > - if (!pfn_valid_within(pfn)) > - return false; > - if (!(pfn & (pageblock_nr_pages - 1)) &&

Re: fsdax memory error handling regression

2018-11-09 Thread Dan Williams
On Tue, Nov 6, 2018 at 10:01 PM Williams, Dan J wrote: > > On Tue, 2018-11-06 at 06:48 -0800, Matthew Wilcox wrote: > > On Tue, Nov 06, 2018 at 03:44:47AM +, Williams, Dan J wrote: > > > Hi Willy, > > > > > > I'm seeing the following warning with v4.20-rc1 and the "dax.sh" > > > test > > >

[PATCH 03/11] libnvdimm/security: add override module param for key self verification

2018-11-09 Thread Dave Jiang
Provide the user an override via kernel module parameter for security key self verification. no_key_self_verify parameter is being added to bypass security key verify against the hardware during nvdimm unlock path. Signed-off-by: Dave Jiang --- drivers/nvdimm/security.c | 11 +++ 1

[PATCH 04/11] libnvdimm/security: introduce NDD_SECURITY_BUSY flag

2018-11-09 Thread Dave Jiang
Adding a flag for nvdimm->flags to support erase functions. While it's ok to hold the nvdimm_bus lock for secure erase due to minimal time to execute the command, overwrite requires a significantly longer time and makes this impossible. The flag will block any drivers from being loaded and DIMMs

[PATCH 07/11] libnvdimm/security: add overwrite status notification

2018-11-09 Thread Dave Jiang
Adding sysfs notification for when overwrite has completed to allow user monitoring app to be aware of overwrite completion status. Signed-off-by: Dave Jiang --- drivers/acpi/nfit/core.c |5 + drivers/nvdimm/dimm_devs.c | 10 ++ drivers/nvdimm/nd-core.h |1 +

[PATCH 01/11] keys-encrypted: add nvdimm key format type to encrypted keys

2018-11-09 Thread Dave Jiang
Adding nvdimm key format type to encrypted keys in order to limit the size of the key to 32bytes. Signed-off-by: Dave Jiang --- security/keys/encrypted-keys/encrypted.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git

[PATCH 00/11] Additional patches for nvdimm security support

2018-11-09 Thread Dave Jiang
The following series adds additional support for nvdimm security. 1. Converted logon keys to encrypted-keys. 2. Add overwrite DSM support 3. Add DSM 1.8 master passphrase support The patch series is based off the branch from here:

[PATCH 02/11] libnvdimm/security: change clear text nvdimm keys to encrypted keys

2018-11-09 Thread Dave Jiang
In order to make nvdimm more secure, encrypted keys will be used instead of clear text keys. A master key will be created to seal encrypted nvdimm keys. The master key can be a trusted key generated from TPM 2.0 or a less secure user key. In the process of this conversion, the kernel cached key

[PATCH 0/2] kvm: Use huge pages for DAX-backed files

2018-11-09 Thread Barret Rhoden
This patch series depends on dax pages not being PageReserved. Once that is in place, these changes will let KVM use huge pages with dax-backed files. Without the PageReserved change, KVM and DAX still work with these patches, simply without huge pages - which is the current situation.

[PATCH 2/2] kvm: Use huge pages for DAX-backed files

2018-11-09 Thread Barret Rhoden
This change allows KVM to map DAX-backed files made of huge pages with huge mappings in the EPT/TDP. DAX pages are not PageTransCompound. The existing check is trying to determine if the mapping for the pfn is a huge mapping or not. For non-DAX maps, e.g. hugetlbfs, that means checking

Re: [mm PATCH v5 0/7] Deferred page init improvements

2018-11-09 Thread Pavel Tatashin
On 18-11-05 13:19:25, Alexander Duyck wrote: > This patchset is essentially a refactor of the page initialization logic > that is meant to provide for better code reuse while providing a > significant improvement in deferred page initialization performance. > > In my testing on an x86_64 system

[PATCH 08/11] libnvdimm/security: add documentation for ovewrite

2018-11-09 Thread Dave Jiang
Add overwrite command usages to security documentation. Signed-off-by: Dave Jiang --- Documentation/nvdimm/security.txt | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Documentation/nvdimm/security.txt b/Documentation/nvdimm/security.txt index

[PATCH 11/11] acpi/nfit: prevent indiscriminate DSM payload dumping for security DSMs

2018-11-09 Thread Dave Jiang
Right now when debug is enabled, we dump the command buffer indescriminately. This exposes the clear text payload for security DSMs. Introducing a kernel config to only dump the payload if the config option is turned on so the production kernels can leave this option off and not expose the

[PATCH 06/11] tools/testing/nvdimm: Add overwrite support for nfit_test

2018-11-09 Thread Dave Jiang
With the implementation of Intel NVDIMM DSM overwrite, we are adding unit test to nfit_test for testing of overwrite operation. Signed-off-by: Dave Jiang --- drivers/acpi/nfit/intel.h|1 + tools/testing/nvdimm/dimm_devs.c |2 + tools/testing/nvdimm/test/nfit.c | 55

[PATCH 09/11] acpi/nfit, libnvdimm/security: add Intel DSM 1.8 master passphrase support

2018-11-09 Thread Dave Jiang
With Intel DSM 1.8 [1] two new security DSMs are introduced. Enable/update master passphrase and master secure erase. The master passphrase allows a secure erase to be performed without the user passphrase that is set on the NVDIMM. The commands of master_update and master_erase are added to the

[PATCH 05/11] acpi/nfit, libnvdimm/security: Add security DSM overwrite support

2018-11-09 Thread Dave Jiang
We are adding support for the security calls of ovewrite and query overwrite from Intel DSM spec v1.7. This will allow triggering of overwrite on Intel NVDIMMs. The overwrite operation can take tens of minutes. When the overwrite DSM is issued successfully, the NVDIMMs will be unaccessible. The

[PATCH 10/11] tools/testing/nvdimm: add Intel DSM 1.8 support for nfit_test

2018-11-09 Thread Dave Jiang
Adding test support for new Intel DSM from v1.8. The ability of simulating master passphrase update and master secure erase have been added to nfit_test. Signed-off-by: Dave Jiang --- tools/testing/nvdimm/test/nfit.c | 86 ++ 1 file changed, 86

RE: nfit_test.ko.xz needs unknown symbol ....

2018-11-09 Thread Dorau, Lukasz
On Thursday, November 8, 2018 5:32 PM Dan Williams wrote: > On Thu, Nov 8, 2018 at 6:45 AM Dorau, Lukasz wrote: > > > > Hi, > > > > I am building and installing the linux kernel from the 'libnvdimm-for-next' > branch at git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git with > the