[ndctl PATCH] ndctl, create-namespace: clarify autolabel failures and fallback

2017-11-11 Thread Dan Williams
The autolabel feature tries to enable labels whenever a namespace in a label-less mode region is reconfigured. It builds on the assumption that if the entire capacity is being reconfigured then the operation can try to assume exclusive ownership of all the DIMMs in that region. However, if a

[ndctl PATCH] ndctl, disable-region: check for mounted namespaces

2017-11-11 Thread Dan Williams
Perform a ndctl_namespace_disable_safe loop to disable a region to make sure we are not ripping out a namespace from underneath an actively mounted filesystem. Signed-off-by: Dan Williams --- ndctl/action.h| 15 +++ ndctl/namespace.c | 15

[ndctl PATCH] ndctl, {create, destroy}-namespace: clarify --force option

2017-11-11 Thread Dan Williams
When 'destroy-namespace' or 'create-namespace --reconfig' operations encounter a namespace that is mounted, the operation will always fail. The '--force' option only forces continuation when the namespace is active and not mounted. If the namespace is mounted then even --force will fail.

[PATCH v2 4/4] mm: replace pte_write with pte_access_permitted in fault + gup paths

2017-11-11 Thread Dan Williams
The 'access_permitted' helper is used in the gup-fast path and goes beyond the simple _PAGE_RW check to also: * validate that the mapping is writable from a protection keys standpoint * validate that the pte has _PAGE_USER set since all fault paths where pte_write is must be referencing

[PATCH v2 3/4] mm: replace pmd_write with pmd_access_permitted in fault + gup paths

2017-11-11 Thread Dan Williams
The 'access_permitted' helper is used in the gup-fast path and goes beyond the simple _PAGE_RW check to also: * validate that the mapping is writable from a protection keys standpoint * validate that the pte has _PAGE_USER set since all fault paths where pmd_write is must be referencing

[PATCH v2 2/4] mm: replace pud_write with pud_access_permitted in fault + gup paths

2017-11-11 Thread Dan Williams
The 'access_permitted' helper is used in the gup-fast path and goes beyond the simple _PAGE_RW check to also: * validate that the mapping is writable from a protection keys standpoint * validate that the pte has _PAGE_USER set since all fault paths where pud_write is must be referencing

[PATCH v2 0/4] fix device-dax pud crash and fixup {pte, pmd, pud}_write

2017-11-11 Thread Dan Williams
Changes since v1 [1]: * fix arm64 compilation, add __HAVE_ARCH_PUD_WRITE * fix sparc64 compilation, add __HAVE_ARCH_PUD_WRITE * fix s390 compilation, add a pud_write() helper --- Andrew, Here is a third version to the pud_write() fix [2], and some follow-on patches to use the

[PATCH v2 1/4] mm: fix device-dax pud write-faults triggered by get_user_pages()

2017-11-11 Thread Dan Williams
Currently only get_user_pages_fast() can safely handle the writable gup case due to its use of pud_access_permitted() to check whether the pud entry is writable. In the gup slow path pud_write() is used instead of pud_access_permitted() and to date it has been unimplemented, just calls BUG_ON().