mbox series

[v4,0/6] Validating namespace size and start address attributes.

Message ID 20200120140749.69549-1-aneesh.kumar@linux.ibm.com (mailing list archive)
Headers show
Series Validating namespace size and start address attributes. | expand

Message

Aneesh Kumar K.V Jan. 20, 2020, 2:07 p.m. UTC
When creating a new namespace, the kernel needs to make sure namespace size and
start address are correctly aligned to SUBSECTION_SIZE. This ensures kernel can
enable/disable namespace without conflicting with memory hotplug rules. Without this,
a namespace that partially covers a SUBSECTION can prevent the creation of an
adjacent namespace because the hotplug subsystem will find the subsection already active.

To make sure new kernel don't break an existing install with an unaligned start/size attribute,
while initializing the namespace the kernel validates these attribute against direct-map
mapping page size rather than subsection size.


Aneesh Kumar K.V (6):
  libnvdimm/namespace: Make namespace size validation arch dependent
  libnvdimm/namespace: Validate namespace start addr and size
  libnvdimm/namespace: Add arch dependent callback for namespace create
    time validation
  libnvdimm/namespace: Validate namespace size when creating a new
    namespace.
  libnvdimm/namespace: Align DPA based on arch restrictions
  libnvdimm/namespace: Expose arch specific supported size align value

 arch/arm64/mm/flush.c           | 13 +++++
 arch/powerpc/lib/pmem.c         | 20 ++++++++
 arch/x86/mm/pageattr.c          | 13 +++++
 drivers/nvdimm/namespace_devs.c | 85 +++++++++++++++++++++++++++++++--
 include/linux/libnvdimm.h       |  2 +
 5 files changed, 128 insertions(+), 5 deletions(-)