Currently memory_failure() returns zero if the error was handled. On
that result mce_unmap_kpfn() is called to zap the page out of the kernel
linear mapping to prevent speculative fetches of potentially poisoned
memory. However, in the case of dax mapped devmap pages the page may be
in active perma
In preparation for using set_memory_uc() instead set_memory_np() for
isolating poison from speculation, teach the memtype code to sanitize
physical addresses vs __PHYSICAL_MASK.
The motivation for using set_memory_uc() for this case is to allow
ongoing access to persistent memory pages via the pme
Use clear_mce_nospec() to restore WB mode for the kernel linear mapping
of a pmem page that was marked 'HWPoison'. A page with 'HWPoison' set
has also been marked UC in PAT (page attribute table) via
set_mce_nospec() to prevent speculative retrievals of poison.
The 'HWPoison' flag is only cleared
In preparation for supporting memory_failure() for dax mappings, teach
collect_procs() to also determine the mapping size. Unlike typical
mappings the dax mapping size is determined by walking page-table
entries rather than using the compound-page accounting for THP pages.
Acked-by: Naoya Horiguch
mce: Uncorrected hardware memory error in user-access at af34214200
{1}[Hardware Error]: It has been corrected by h/w and requires no further
action
mce: [Hardware Error]: Machine check events logged
{1}[Hardware Error]: event severity: corrected
Memory failure: 0xaf34214: rese
The madvise_inject_error() routine uses get_user_pages() to lookup the
pfn and other information for injected error, but it does not release
that pin. The assumption is that failed pages should be taken out of
circulation.
However, for dax mappings it is not possible to take pages out of
circulati
In preparation for implementing support for memory poison (media error)
handling via dax mappings, implement a lock_page() equivalent. Poison
error handling requires rmap and needs guarantees that the page->mapping
association is maintained / valid (inode not freed) for the duration of
the lookup.
MEMORY_DEVICE_FS_DAX relies on typical page semantics whereby ->mapping
is only ever cleared by truncation, not final put.
Without this fix dax pages may forget their mapping association at the
end of every page pin event.
Move this atypical behavior that HMM wants into the HMM ->page_free()
call
In support of enabling memory_failure() handling for filesystem-dax
mappings, set ->index to the pgoff of the page. The rmap implementation
requires ->index to bound the search through the vma interval tree. The
index is set and cleared at dax_associate_entry() and
dax_disassociate_entry() time res
Given that dax / device-mapped pages are never subject to page
allocations remove them from consideration by the soft-offline
mechanism.
Reported-by: Naoya Horiguchi
Signed-off-by: Dan Williams
---
mm/memory-failure.c |8
1 file changed, 8 insertions(+)
diff --git a/mm/memory-fail
In support of enabling memory_failure() handling for device-dax
mappings, set ->index to the pgoff of the page. The rmap implementation
requires ->index to bound the search through the vma interval tree.
The ->index value is never cleared. There is no possibility for the
page to become associated
Changes since v5 [1]:
* Move put_page() before memory_failure() in madvise_inject_error()
(Naoya)
* The previous change uncovered a latent bug / broken assumption in
__put_devmap_managed_page(). We need to preserve page->mapping for
dax pages when they go idle.
* Rename mapping_size() to dev_
In support of enabling memory_failure() handling for device-dax
mappings, set the ->mapping association of pages backing device-dax
mappings. The rmap implementation requires page_mapping() to return the
address_space hosting the vmas that map the page.
The ->mapping pointer is never cleared. Ther
Use new return type vm_fault_t for fault and huge_fault handler. For
now, this is just documenting that the function returns a VM_FAULT value
rather than an errno. Once all instances are converted, vm_fault_t will
become a distinct type.
Commit 1c8f422059ae ("mm: change return type to vm_fault_t"
On Tue, Jul 10, 2018 at 04:09:42PM -0600, Ross Zwisler wrote:
> This adds a regression test for the following series:
>
> https://lists.01.org/pipermail/linux-nvdimm/2018-July/016842.html
>
> which adds synchronization between DAX DMA in ext4 and truncate/hole-punch.
> The intention of the test i
On Thu, Jul 12, 2018 at 11:31 PM, Naoya Horiguchi
wrote:
> Hello Dan,
>
> On Wed, Jul 04, 2018 at 02:40:49PM -0700, Dan Williams wrote:
>> The madvise_inject_error() routine uses get_user_pages() to lookup the
>> pfn and other information for injected error, but it does not release
>> that pin. Th
On Fri, Jul 13, 2018 at 1:52 AM, Naoya Horiguchi
wrote:
> On Wed, Jul 04, 2018 at 02:41:06PM -0700, Dan Williams wrote:
>> mce: Uncorrected hardware memory error in user-access at af34214200
>> {1}[Hardware Error]: It has been corrected by h/w and requires no
>> further action
>> mce:
On Thu, Jul 12, 2018 at 1:49 PM, Dave Jiang wrote:
> Add theory of operation for the security support that's going into
> libnvdimm.
>
> Signed-off-by: Dave Jiang
> ---
> Documentation/nvdimm/security | 70
> +
> 1 file changed, 70 insertions(+)
> crea
On Thu, Jul 12, 2018 at 1:49 PM, Dave Jiang wrote:
> Add nfit_test support for DSM functions "Get Security State",
> "Set Passphrase", "Disable Passphrase", "Unlock Unit", "Freeze Lock",
> and "Secure Erase" for the fake DIMMs.
>
> Also adding a sysfs knob in order to put the DIMMs in "locked" sta
On Thu, Jul 12, 2018 at 1:49 PM, Dave Jiang wrote:
> In order to access the nfit_test context via sideband sysfs knobs, the
> dimm_dev needs to be more than struct device in order to point back to
> struct nfit_test. Wrapping the original struct device with a struct
> nfit_dimm_dev and saving the
On Thu, Jul 12, 2018 at 1:49 PM, Dave Jiang wrote:
> Add support to issue a secure erase DSM to the Intel nvdimm. The
> required passphrase is acquired from userspace through the kernel key
> management. To trigger the action, "erase" is written to the "security"
> sysfs attribute. libnvdimm will
This patch adds the main configuration file(/etc/ndctl/monitor.conf)
of ndctl monitor. It contains the configuration directives that give
ndctl monitor instructions. Users can change the configuration by
editing this file or using [--config-file] option to override this
file. The changed value will
This patch is used to add man page for ndctl monitor command.
Signed-off-by: QI Fuli
---
Documentation/ndctl/Makefile.am | 3 +-
Documentation/ndctl/ndctl-monitor.txt | 108 ++
2 files changed, 110 insertions(+), 1 deletion(-)
create mode 100644 Documentation/ndc
This is the v13 patch for ndctl monitor, a tiny daemon to monitor
the smart events of nvdimm DIMMs. Since NVDIMM does not have a
feature like mirroring, if it breaks down, the data will be
impossible to restore. Ndctl monitor daemon will catch the smart
events notify from firmware and outputs notif
Ndctl monitor is used for monitoring the smart events of NVDIMMs.
When a smart event fires, monitor will output the notifications which
include dimm health status and event information to syslog, standard
output or a file by setting [--log] option. The notifications follow
json format and can be co
Add a new unit test to test all options of the monitor command.
Based-on-patch-by: Yasunori Goto
Acked-by: Masayoshi Mizuma
Signed-off-by: QI Fuli
---
.gitignore | 1 +
test/Makefile.am | 14 +++-
test/list-smart-dimm.c | 117 +++
test/monitor.sh
This patch adds the systemd unit file for ndctl-monitor service.
The systemd unit directory can be configured by setting environment
variable "--with-systemd-unit-dir[=DIR]".
A monitor daemon can be started as a system service:
# systemctl start ndctl-monitor.service
Signed-off-by: QI Fuli
--
On Thu, Jul 12, 2018 at 1:49 PM, Dave Jiang wrote:
> Add support for freeze security on Intel nvdimm. This locks out any
> changes to security for the DIMM unless a reboot is done. This is triggered
> by writing "freeze" to the "security" sysfs attribute. libnvdimm will
> support the generic freez
On Thu, Jul 12, 2018 at 1:49 PM, Dave Jiang wrote:
> Add support to disable passphrase (security) for the Intel nvdimm. The
> passphrase used for disabling is pulled from userspace via the kernel
> key management. The action is triggered by writing "disable" to the sysfs
> attribute "security". li
On Thu, Jul 12, 2018 at 1:48 PM, Dave Jiang wrote:
> Add support for setting and/or updating passphrase on the Intel nvdimms.
> The passphrase is pulled from userspace through the kernel key management.
> We trigger the update via writing "update" to the sysfs attribute
> "security". The state of
On Thu, Jul 12, 2018 at 1:48 PM, Dave Jiang wrote:
> Add support to allow query the security status of the Intel nvdimms and
> also unlock the dimm via the kernel key management APIs. The passphrase is
> expected to be pulled from userspace through keyutils. Moving the Intel
> related bits to its
On Thu, Jul 12, 2018 at 1:48 PM, Dave Jiang wrote:
> The generated dimm id is needed for the sysfs attribute as well as being
> used as the identifier/description for the security key. Since it's
> constant and should never change, store it as a member of struct nvdimm.
>
> Signed-off-by: Dave Jia
On Thu, Jul 12, 2018 at 1:48 PM, Dave Jiang wrote:
> Prepping the libnvdimm to support security management by adding a keyring
> in order to provide passphrase management through the kernel key management
> APIs.
>
> Signed-off-by: Dave Jiang
> ---
> drivers/nvdimm/core.c |7 +++
> driv
On Thu, Jul 12, 2018 at 1:48 PM, Dave Jiang wrote:
> Add command definition for security commands defined in Intel DSM
> specification v1.7. This includes "get security state", "set passphrase",
> "unlock unit", "freeze lock", "secure erase", "ovewrite", and
> "overwrite query". Since we are addin
Adding a reference upcall helper for request-key in order to retrieve the
security passphrase from userspace to provide to the kernel. The reference
app uses keyutils API to respond to the upcall from the kernel and is
invoked by /sbin/request-key of the keyutils.
Signed-off-by: Dave Jiang
---
D
Add API call for triggering sysfs knob to update the security for a DIMM
in libndctl. Also add the ndctl "update-security" to trigger that as well.
ndctl does not actually handle the passphrase file. It only initiates the
update and expects all the necessary mechanisms are already in place.
Signed
Adding libndctl API call for retrieving security state for a DIMM and also
adding support to ndctl list for displaying security state.
Signed-off-by: Dave Jiang
---
Documentation/ndctl/ndctl-list.txt |8
ndctl/lib/dimm.c | 16
ndctl/lib/libndctl.
The following series implements mechanisms that utilize the sysfs knobs
provided by the kernel in order to support the Intel DSM v1.7 spec
that provides security to NVDIMM. The following abilities are added:
1. display security state
2. update security
3. disable security
4. freeze security
5. secu
Add support for disable security to libndctl and also command line option
of "disable-security" for ndctl. This provides a way to disable security
on the nvdimm. ndctl does not handle the actual processing of the
passphrase. It only starts the request.
Signed-off-by: Dave Jiang
---
Documentation
Add support for freeze security to libndctl and also command line option
of "freeze-security" for ndctl. This will lock the ability to make changes
to the NVDIMM security.
Signed-off-by: Dave Jiang
---
Documentation/ndctl/Makefile.am |1 +
Documentation/ndctl/ndctl-freeze-secur
Add support for secure erase to libndctl and also command line option
of "secure-erase" for ndctl. This will initiate the request to securely
erase a DIMM. ndctl does not actually handle the verification of the
security. That is handled by the kernel and the key upcall mechanism.
Signed-off-by: Da
On Sat, 2018-07-14 at 00:54 +0900, QI Fuli wrote:
> This patch adds the main configuration file(/etc/ndctl/monitor.conf)
> of ndctl monitor. It contains the configuration directives that give
> ndctl monitor instructions. Users can change the configuration by
> editing this file or using [--confi
On Fri, 13 Jul 2018 13:22:31 +0530
Pankaj Gupta wrote:
> This patch adds virtio-pmem driver for KVM guest.
>
> Guest reads the persistent memory range information from Qemu over
> VIRTIO and registers it on nvdimm_bus. It also creates a nd_region
> object with the persistent memory range infor
On Fri, 2018-07-13 at 19:05 +, Verma, Vishal L wrote:
> On Fri, 2018-07-13 at 14:24 -0400, Masayoshi Mizuma wrote:
> > Hi Qi,
> >
> > On 07/13/2018 11:54 AM, QI Fuli wrote:
> > > This patch adds the systemd unit file for ndctl-monitor service.
> > > The systemd unit directory can be configur
On Fri, 13 Jul 2018 13:22:30 +0530
Pankaj Gupta wrote:
> This patch adds functionality to perform flush from guest to host
> over VIRTIO. We are registering a callback based on 'nd_region' type.
> As virtio_pmem driver requires this special flush interface, for rest
> of the region types we are r
On Sat, 2018-07-14 at 00:54 +0900, QI Fuli wrote:
> This patch is used to add man page for ndctl monitor command.
>
> Signed-off-by: QI Fuli
> ---
> Documentation/ndctl/Makefile.am | 3 +-
> Documentation/ndctl/ndctl-monitor.txt | 104 ++
> 2 files changed, 106
On Fri, 2018-07-13 at 14:24 -0400, Masayoshi Mizuma wrote:
> Hi Qi,
>
> On 07/13/2018 11:54 AM, QI Fuli wrote:
> > This patch adds the systemd unit file for ndctl-monitor service.
> > The systemd unit directory can be configured by setting environment
> > variable "--with-systemd-unit-dir[=DIR]"
Hi Qi,
On Sat, 2018-07-14 at 00:53 +0900, QI Fuli wrote:
> Ndctl monitor is used for monitoring the smart events of NVDIMMs.
> When a smart event fires, monitor will output the notifications which
> include dimm health status and event information to syslog, standard
> output or a file by setting
Hi Qi,
On 07/13/2018 11:54 AM, QI Fuli wrote:
> Add a new unit test to test all options of the monitor command.
>
> Based-on-patch-by: Yasunori Goto
> Acked-by: Masayoshi Mizuma
> Signed-off-by: QI Fuli
[...]
> +test_filter_dimmevent()
> +{
> + monitor_dimms="$(get_monitor_dimm | awk '{pri
Hi Qi,
On 07/13/2018 11:54 AM, QI Fuli wrote:
> This patch adds the systemd unit file for ndctl-monitor service.
> The systemd unit directory can be configured by setting environment
> variable "--with-systemd-unit-dir[=DIR]".
>
> A monitor daemon can be started as a system service:
># system
This is the v12 patch for ndctl monitor, a tiny daemon to monitor
the smart events of nvdimm DIMMs. Since NVDIMM does not have a
feature like mirroring, if it breaks down, the data will be
impossible to restore. Ndctl monitor daemon will catch the smart
events notify from firmware and outputs notif
Ndctl monitor is used for monitoring the smart events of NVDIMMs.
When a smart event fires, monitor will output the notifications which
include dimm health status and event information to syslog, standard
output or a file by setting [--log] option. The notifications follow
json format and can be co
This patch is used to add man page for ndctl monitor command.
Signed-off-by: QI Fuli
---
Documentation/ndctl/Makefile.am | 3 +-
Documentation/ndctl/ndctl-monitor.txt | 104 ++
2 files changed, 106 insertions(+), 1 deletion(-)
create mode 100644 Documentation/ndc
This patch adds the main configuration file(/etc/ndctl/monitor.conf)
of ndctl monitor. It contains the configuration directives that give
ndctl monitor instructions. Users can change the configuration by
editing this file or using [--config-file] option to override this
file. The changed value will
This patch adds the systemd unit file for ndctl-monitor service.
The systemd unit directory can be configured by setting environment
variable "--with-systemd-unit-dir[=DIR]".
A monitor daemon can be started as a system service:
# systemctl start ndctl-monitor.service
Signed-off-by: QI Fuli
--
Add a new unit test to test all options of the monitor command.
Based-on-patch-by: Yasunori Goto
Acked-by: Masayoshi Mizuma
Signed-off-by: QI Fuli
---
.gitignore | 1 +
test/Makefile.am | 14 +++-
test/list-smart-dimm.c | 117 +++
test/monitor.sh
Hi Qi,
On 07/13/2018 08:57 AM, Qi, Fuli wrote:
>> -Original Message-
>> From: Verma, Vishal L [mailto:vishal.l.ve...@intel.com]
>> Sent: Friday, July 13, 2018 11:47 AM
>> To: linux-nvdimm@lists.01.org; Qi, Fuli/斉 福利
>> Subject: Re: [ndctl PATCH v11 3/5] ndctl, monitor: add the unit file o
> -Original Message-
> From: Verma, Vishal L [mailto:vishal.l.ve...@intel.com]
> Sent: Friday, July 13, 2018 11:47 AM
> To: linux-nvdimm@lists.01.org; Qi, Fuli/斉 福利
> Subject: Re: [ndctl PATCH v11 3/5] ndctl, monitor: add the unit file of
> systemd for
> ndctl-monitor service
>
>
> On W
On Wed, Jul 04, 2018 at 02:41:06PM -0700, Dan Williams wrote:
> mce: Uncorrected hardware memory error in user-access at af34214200
> {1}[Hardware Error]: It has been corrected by h/w and requires no further
> action
> mce: [Hardware Error]: Machine check events logged
> {1}[Hardwa
This patch adds virtio-pmem driver for KVM guest.
Guest reads the persistent memory range information from Qemu over
VIRTIO and registers it on nvdimm_bus. It also creates a nd_region
object with the persistent memory range information so that existing
'nvdimm/pmem' driver can reserve this into
This patch adds virtio-pmem Qemu device.
This device presents memory address range information to guest
which is backed by file backend type. It acts like persistent
memory device for KVM guest. Guest can perform read and persistent
write operations on this memory range with the help of DAX c
This is RFC V3 for 'fake DAX' flushing interface sharing
for review. This patchset has two parts:
- Guest virtio-pmem driver
Guest driver reads persistent memory range from paravirt device
and registers with 'nvdimm_bus'. 'nvdimm/pmem' driver uses this
information to allocate persistent me
This patch adds functionality to perform flush from guest to host
over VIRTIO. We are registering a callback based on 'nd_region' type.
As virtio_pmem driver requires this special flush interface, for rest
of the region types we are registering existing flush function.
Also report the error returne
63 matches
Mail list logo