New incoming fax document.
Please, download fax document attached to this email.
Scanned in: 17 seconds
Pages sent: 4
File name: task-000678451.doc
Sender: Mitchell Odom
Filesize: 197 Kb
Date of scan: Sat, 26 Dec 2015 06:22:39 +0300
Resolution: 600 DPI
Thank you for using Interfax!
In the case of memory error injection, einj_error_inject() checks
if a target address is System RAM. Change this check to allow
injecting a memory error to NVDIMM by calling region_intersects()
with IORES_DESC_PERSISTENT_MEMORY. This enables memory error
testing on both System RAM and NVDIMM.
In addition, page_is_ram() is replaced with region_intersects()
with IORESOURCE_SYSTEM_RAM, so that it can verify a target address
range with the requested size.
Cc: Rafael J. Wysocki <rjw(a)rjwysocki.net>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: Vishal Verma <vishal.l.verma(a)intel.com>
Cc: Tony Luck <tony.luck(a)intel.com>
Cc: Dan Williams <dan.j.williams(a)intel.com>
Acked-by: Tony Luck <tony.luck(a)intel.com>
Reviewed-by: Dan Williams <dan.j.williams(a)intel.com>
Signed-off-by: Toshi Kani <toshi.kani(a)hpe.com>
drivers/acpi/apei/einj.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
index 0431883..16cae66 100644
@@ -519,7 +519,7 @@ static int einj_error_inject(u32 type, u32 flags, u64 param1, u64 param2,
u64 param3, u64 param4)
- unsigned long pfn;
+ u64 base_addr, size;
/* If user manually set "flags", make sure it is legal */
if (flags && (flags &
@@ -545,10 +545,17 @@ static int einj_error_inject(u32 type, u32 flags, u64 param1, u64 param2,
* Disallow crazy address masks that give BIOS leeway to pick
* injection address almost anywhere. Insist on page or
- * better granularity and that target address is normal RAM.
+ * better granularity and that target address is normal RAM or
+ * NVDIMM.
- pfn = PFN_DOWN(param1 & param2);
- if (!page_is_ram(pfn) || ((param2 & PAGE_MASK) != PAGE_MASK))
+ base_addr = param1 & param2;
+ size = ~param2 + 1;
+ if (((param2 & PAGE_MASK) != PAGE_MASK) ||
+ ((region_intersects(base_addr, size, IORESOURCE_SYSTEM_RAM,
+ IORES_DESC_NONE) != REGION_INTERSECTS) &&
+ (region_intersects(base_addr, size, IORESOURCE_MEM,
+ IORES_DESC_PERSISTENT_MEMORY) != REGION_INTERSECTS)))
This patch-set enhances the iomem table and its search interfacs, and
then changes EINJ to support NVDIMM.
- Patches 1-2 add a new System RAM type, IORESOURCE_SYSTEM_RAM, and
make the iomem search interfaces work with resource flags with
modifier bits set. IORESOURCE_SYSTEM_RAM has IORESOURCE_MEM bit set
for backward compatibility.
- Patch 3 adds a new field, I/O resource descriptor, in struct resource.
Drivers can assign their unique descritor to a range when they
support the iomem search interfaces.
- Patches 4-9 changes initializations of resource entries. They set
the System RAM type to System RAM ranges, set I/O resource descriptors
to the regions targeted by the iomem search interfaces, and change
to call kzalloc() where kmalloc() is used to allocate struct resource
- Patches 10-14 extend the iomem interfaces to check System RAM ranges
with the System RAM type and the I/O resource descriptor.
- Patch 15 adds a check to checkpatch.pl to warn on new use of
- Patch 16 changes the EINJ driver to allow injecting a memory error
- Add 'desc' to struct resource, and add a new iomem interface to
search with the desc. (Borislav Petkov)
- Add a check to checkpatch.pl to warn on new use of walk_iomem_res().
- Searching for System RAM in the resource table should not require
strcmp(). (Borislav Petkov)
- Add a new System RAM type as a modifier to IORESOURCE_MEM.
- NVDIMM check needs to be able to distinguish legacy and NFIT pmem
ranges. (Dan Williams)
Toshi Kani (16):
01/16 resource: Add System RAM resource type
02/16 resource: make resource flags handled properly
03/16 resource: Add I/O resource descriptor
04/16 x86/e820: Set System RAM type and descriptor
05/16 ia64: Set System RAM type and descriptor
06/16 arch: Set IORESOURCE_SYSTEM_RAM to System RAM
07/16 kexec: Set IORESOURCE_SYSTEM_RAM to System RAM
08/16 xen, mm: Set IORESOURCE_SYSTEM_RAM to System RAM
09/16 drivers: Initialize resource entry to zero
10/16 resource: Change walk_system_ram to use System RAM type
11/16 arm/samsung: Change s3c_pm_run_res() to use System RAM type
12/16 memremap: Change region_intersects() to take @flags and @desc
13/16 resource: Add walk_iomem_res_desc()
14/16 x86,nvdimm,kexec: Use walk_iomem_res_desc() for iomem search
15/16 checkpatch: Add warning on deprecated walk_iomem_res
16/16 ACPI/EINJ: Allow memory error injection to NVDIMM
arch/arm/kernel/setup.c | 6 +-
arch/arm/plat-samsung/pm-check.c | 4 +-
arch/arm64/kernel/setup.c | 6 +-
arch/avr32/kernel/setup.c | 6 +-
arch/ia64/kernel/efi.c | 13 ++++-
arch/ia64/kernel/setup.c | 6 +-
arch/m32r/kernel/setup.c | 4 +-
arch/mips/kernel/setup.c | 10 ++--
arch/parisc/mm/init.c | 6 +-
arch/powerpc/mm/mem.c | 2 +-
arch/s390/kernel/setup.c | 8 +--
arch/score/kernel/setup.c | 2 +-
arch/sh/kernel/setup.c | 8 +--
arch/sparc/mm/init_64.c | 8 +--
arch/tile/kernel/setup.c | 11 +++-
arch/unicore32/kernel/setup.c | 6 +-
arch/x86/kernel/crash.c | 4 +-
arch/x86/kernel/e820.c | 38 ++++++++++++-
arch/x86/kernel/pmem.c | 4 +-
arch/x86/kernel/setup.c | 6 +-
drivers/acpi/acpi_platform.c | 2 +-
drivers/acpi/apei/einj.c | 15 +++--
drivers/nvdimm/e820.c | 2 +-
drivers/parisc/eisa_enumerator.c | 4 +-
drivers/rapidio/rio.c | 8 +--
drivers/sh/superhyway/superhyway.c | 2 +-
drivers/xen/balloon.c | 2 +-
include/linux/ioport.h | 33 +++++++++++
include/linux/mm.h | 3 +-
kernel/kexec_core.c | 8 ++-
kernel/kexec_file.c | 8 +--
kernel/memremap.c | 13 +++--
kernel/resource.c | 110 +++++++++++++++++++++++++++----------
mm/memory_hotplug.c | 2 +-
scripts/checkpatch.pl | 6 ++
35 files changed, 265 insertions(+), 111 deletions(-)
- Rebase to v4.4-rc6
- Revert back to using kzalloc from __get_free_page based on the discussion at:
- Rebase to v4.4-rc4
- Add kernel-doc style comments to all exported functions in badblocks.c (James)
- Make return values from badblocks functions consistent with themselves
and the kernel style. Change the polarity of badblocks_set, and update
all callers accordingly (James)
- In gendisk, don't unconditionally allocate badblocks, export the initializer.
This also allows the initializer to be a non-void return type, so that the
badblocks user can act upon failures better (James)
- In badblocks_free, make 'page' NULL (patch 1)
- Move the core badblocks code to a new .c file (patch 1) (Jens)
- Fix a sizeof usage in disk_alloc_badblocks (patch 2) (Dan)
- Since disk_alloc_badblocks can fail, check disk->bb for NULL in the
genhd wrappers (patch 2) (Jeff)
- Update the md conversion to also ise the badblocks init and free
functions (patch 3)
- Remove the BB_* macros from md.h as they are now in badblocks.h (patch 3)
Patch 1 copies badblock management code into a header of its own,
making it generally available. It follows common libraries of code
such as linked lists, where anyone may embed a core data structure
in another place, and use the provided accessor functions to
manipulate the data.
Patch 2 adds badblock tracking to gendisks (in preparation for use
by NVDIMM devices).
Patch 3 converts md over to use the new badblocks 'library'. I have
done some pretty simple testing on this - created a raid 1 device,
made sure the sysfs entries show up, and can be used to add and view
badblocks. A closer look by the md folks would be nice here.
Vishal Verma (3):
badblocks: Add core badblock management code
block: Add badblock management for gendisks
md: convert to use the generic badblocks code
block/Makefile | 2 +-
block/badblocks.c | 561 ++++++++++++++++++++++++++++++++++++++++++++++
block/genhd.c | 76 +++++++
drivers/md/md.c | 516 +++---------------------------------------
drivers/md/md.h | 40 +---
include/linux/badblocks.h | 53 +++++
include/linux/genhd.h | 7 +
7 files changed, 726 insertions(+), 529 deletions(-)
create mode 100644 block/badblocks.c
create mode 100644 include/linux/badblocks.h
This series is initially targeted at the folks doing filesystems
on top of NVDIMMs. They really want to be able to return -EIO
when there is a h/w error (just like spinning rust, and SSD does).
I plan to use the same infrastructure in parts 1&2 to write a
machine check aware "copy_from_user()" that will SIGBUS the
calling application when a syscall touches poison in user space
(just like we do when the application touches the poison itself).
Andy: Don't hack "regs->ax = BIT(63) | addr;" in the machine check
handler. Now have better fixup code that computes the number
of remaining bytes (just like page-fault fixup).
Andy: #define for BIT(63). Done, plus couple of extra macros using it.
Boris: Don't clutter up generic code (like mm/extable.c) with this.
I moved everything under arch/x86 (the asm-generic change is
a more generic #define).
Boris: Dependencies for CONFIG_MCE_KERNEL_RECOVERY are too generic.
I made it a real menu item with default "n". Dan Williams
will use "select MCE_KERNEL_RECOVERY" from his persistent
Boris: Simplify conditionals in mce.c by moving tolerant/kill_it
checks earlier, with a skip to end if they aren't set.
Boris: Miscellaneous grammar/punctuation. Fixed.
Boris: Don't leak spurious __start_mcextable symbols into kernels
that didn't configure MCE_KERNEL_RECOVERY. Done.
Tony: New code doesn't belong in user_copy_64.S/uaccess*.h. Moved
to new .S/.h files
Elliott:Cacheing behavior non-optimal. Could use movntdqa, vmovntdqa
or vmovntdqa on source addresses. I didn't fix this yet. Think
of the current mcsafe_memcpy() as the first of several functions.
This one is useful for small copies (meta-data) where the overhead
of saving SSE/AVX state isn't justified.
0-day: Reported build errors and warnings on 32-bit systems. Fixed
0-day: Reported bloat to tinyconfig. Fixed
Boris: Suggestions to use extra macros to reduce code duplication in _ASM_*EXTABLE. Done
Boris: Re-write "tolerant==3" check to reduce indentation level. See below.
Andy: Check IP is valid before searching kernel exception tables. Done.
Andy: Explain use of BIT(63) on return value from mcsafe_memcpy(). Done (added decode macros).
Andy: Untangle mess of code in tail of do_machine_check() to make it
clear what is going on (e.g. that we only enter the ist_begin_non_atomic()
if we were called from user code, not from kernel!). Done.
Tony Luck (3):
x86, ras: Add new infrastructure for machine check fixup tables
x86, ras: Extend machine check recovery code to annotated ring0 areas
x86, ras: Add mcsafe_memcpy() function to recover from machine checks
arch/x86/Kconfig | 10 +++
arch/x86/include/asm/asm.h | 10 ++-
arch/x86/include/asm/mce.h | 14 +++
arch/x86/include/asm/mcsafe_copy.h | 11 +++
arch/x86/kernel/cpu/mcheck/mce-severity.c | 21 ++++-
arch/x86/kernel/cpu/mcheck/mce.c | 86 +++++++++++-------
arch/x86/kernel/vmlinux.lds.S | 6 +-
arch/x86/kernel/x8664_ksyms_64.c | 5 ++
arch/x86/lib/Makefile | 1 +
arch/x86/lib/mcsafe_copy.S | 142 ++++++++++++++++++++++++++++++
arch/x86/mm/extable.c | 19 ++++
include/asm-generic/vmlinux.lds.h | 12 +--
12 files changed, 293 insertions(+), 44 deletions(-)
create mode 100644 arch/x86/include/asm/mcsafe_copy.h
create mode 100644 arch/x86/lib/mcsafe_copy.S
From: Vishal Verma <vishal.l.verma(a)intel.com>
This series does a few things:
- Retrieve all known poison in the system physical address (SPA) space
using ARS (Address Range Scrub) commands to firmware
- Store this poison in a new 'nd_poison' structure
- In pmem, consume the poison list and expose the ranges as bad sectors
This depends on the badblocks series sent out previously
This was tested using nfit_test to add poison at specific address ranges.
More testing, specially on NVDIMM-N hardware is much appreciated!
Vishal Verma (3):
nfit_test: Enable DSMs for all test NFITs
libnvdimm: Add a poison list
pmem: Use the poison list to expose badblocks
drivers/acpi/nfit.c | 193 +++++++++++++++++++++++++++++++++++++++
drivers/nvdimm/core.c | 63 +++++++++++++
drivers/nvdimm/nd-core.h | 1 +
drivers/nvdimm/nd.h | 6 ++
drivers/nvdimm/pmem.c | 124 +++++++++++++++++++++++++
include/linux/libnvdimm.h | 2 +
tools/testing/nvdimm/test/nfit.c | 9 ++
7 files changed, 398 insertions(+)
Changes from v4:
- Explicity prevent shadow entries from being added to radix trees for DAX
mappings in patch 2. The only shadow entries that would be generated
for DAX radix trees would be to track zero page mappings that were
created for holes. These pages would receive minimal benefit from
having shadow entries, and the choice to have only one type of
exceptional entry in a given radix tree makes the logic simpler both in
clear_exceptional_entry() and in the rest of DAX. (Jan)
- Added Reviewed-by from Jan to patch 3.
This series is built upon ext4/master. A working tree with this series
applied can be found here:
Ross Zwisler (7):
pmem: add wb_cache_pmem() to the PMEM API
dax: support dirty DAX entries in radix tree
mm: add find_get_entries_tag()
dax: add support for fsync/sync
ext2: call dax_pfn_mkwrite() for DAX fsync/msync
ext4: call dax_pfn_mkwrite() for DAX fsync/msync
xfs: call dax_pfn_mkwrite() for DAX fsync/msync
arch/x86/include/asm/pmem.h | 11 +--
fs/block_dev.c | 3 +-
fs/dax.c | 159 ++++++++++++++++++++++++++++++++++++++++++--
fs/ext2/file.c | 4 +-
fs/ext4/file.c | 4 +-
fs/inode.c | 1 +
fs/xfs/xfs_file.c | 7 +-
include/linux/dax.h | 7 ++
include/linux/fs.h | 1 +
include/linux/pagemap.h | 3 +
include/linux/pmem.h | 22 +++++-
include/linux/radix-tree.h | 9 +++
mm/filemap.c | 84 ++++++++++++++++++++++-
mm/truncate.c | 64 ++++++++++--------
mm/vmscan.c | 9 ++-
15 files changed, 339 insertions(+), 49 deletions(-)