<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/acpi/nfit.c, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-04-21T07:30:05Z</updated>
<entry>
<title>acpi, nfit, libnvdimm: fix interleave set cookie calculation (64-bit comparison)</title>
<updated>2017-04-21T07:30:05Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2017-03-28T04:53:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=074bcc1302fd4357fa30c167bb20f684998b025f'/>
<id>urn:sha1:074bcc1302fd4357fa30c167bb20f684998b025f</id>
<content type='text'>
commit b03b99a329a14b7302f37c3ea6da3848db41c8c5 upstream.

While reviewing the -stable patch for commit 86ef58a4e35e "nfit,
libnvdimm: fix interleave set cookie calculation" Ben noted:

    "This is returning an int, thus it's effectively doing a 32-bit
     comparison and not the 64-bit comparison you say is needed."

Update the compare operation to be immune to this integer demotion problem.

Cc: Nicholas Moulin &lt;nicholas.w.moulin@linux.intel.com&gt;
Fixes: 86ef58a4e35e ("nfit, libnvdimm: fix interleave set cookie calculation")
Reported-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>nfit, libnvdimm: fix interleave set cookie calculation</title>
<updated>2017-03-18T11:09:58Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2017-03-01T02:32:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=66dd58f56eabe2795ed8f83a8480f0e8aace908f'/>
<id>urn:sha1:66dd58f56eabe2795ed8f83a8480f0e8aace908f</id>
<content type='text'>
commit 86ef58a4e35e8fa66afb5898cf6dec6a3bb29f67 upstream.

The interleave-set cookie is a sum that sanity checks the composition of
an interleave set has not changed from when the namespace was initially
created.  The checksum is calculated by sorting the DIMMs by their
location in the interleave-set. The comparison for the sort must be
64-bit wide, not byte-by-byte as performed by memcmp() in the broken
case.

Fix the implementation to accept correct cookie values in addition to
the Linux "memcmp" order cookies, but only allow correct cookies to be
generated going forward. It does mean that namespaces created by
third-party-tooling, or created by newer kernels with this fix, will not
validate on older kernels. However, there are a couple mitigating
conditions:

    1/ platforms with namespace-label capable NVDIMMs are not widely
       available.

    2/ interleave-sets with a single-dimm are by definition not affected
       (nothing to sort). This covers the QEMU-KVM NVDIMM emulation case.

The cookie stored in the namespace label will be fixed by any write the
namespace label, the most straightforward way to achieve this is to
write to the "alt_name" attribute of a namespace in sysfs.

Fixes: eaf961536e16 ("libnvdimm, nfit: add interleave-set state-tracking infrastructure")
Reported-by: Nicholas Moulin &lt;nicholas.w.moulin@linux.intel.com&gt;
Tested-by: Nicholas Moulin &lt;nicholas.w.moulin@linux.intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>acpi, nfit: check for the correct event code in notifications</title>
<updated>2016-10-28T07:01:34Z</updated>
<author>
<name>Vishal Verma</name>
</author>
<published>2016-08-19T20:40:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74688ce499ad18375b8b2fb6f784f4dddc6fc1db'/>
<id>urn:sha1:74688ce499ad18375b8b2fb6f784f4dddc6fc1db</id>
<content type='text'>
commit c09f12186d6b03b798832d95289af76495990192 upstream.

Commit 209851649dc4 "acpi: nfit: Add support for hot-add" added
support for _FIT notifications, but it neglected to verify the
notification event code matches the one in the ACPI spec for
"NFIT Update". Currently there is only one code in the spec, but
once additional codes are added, older kernels (without this fix)
will misbehave by assuming all event notifications are for an
NFIT Update.

Fixes: 209851649dc4 ("acpi: nfit: Add support for hot-add")
Cc: &lt;stable@vger.kernel.org&gt;
Cc: &lt;linux-acpi@vger.kernel.org&gt;
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Reported-by: Linda Knippers &lt;linda.knippers@hpe.com&gt;
Signed-off-by: Vishal Verma &lt;vishal.l.verma@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>libnvdimm, nd_blk: mask off reserved status bits</title>
<updated>2016-09-07T06:32:37Z</updated>
<author>
<name>Ross Zwisler</name>
</author>
<published>2016-07-29T20:59:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47f972e0973cfddcafcb85b8284c76c85c7733b4'/>
<id>urn:sha1:47f972e0973cfddcafcb85b8284c76c85c7733b4</id>
<content type='text'>
commit 68202c9f0ad6e16ee806fbadbc5838d55fe5aa5c upstream.

The "NVDIMM Block Window Driver Writer's Guide":

    http://pmem.io/documents/NVDIMM_DriverWritersGuide-July-2016.pdf

...defines the layout of the block window status register.  For the July
2016 version of the spec linked to above, this happens in Figure 4 on
page 26.

The only bits defined in this spec are bits 31, 5, 4, 2, 1 and 0.  The
rest of the bits in the status register are reserved, and there is a
warning following the diagram that says:

    Note: The driver cannot assume the value of the RESERVED bits in the
    status register are zero. These reserved bits need to be masked off, and
    the driver must avoid checking the state of those bits.

This change ensures that for hardware implementations that set these
reserved bits in the status register, the driver won't incorrectly fail the
block I/Os.

Reviewed-by: Lee, Chun-Yi &lt;jlee@suse.com&gt;
Signed-off-by: Ross Zwisler &lt;ross.zwisler@linux.intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>nfit: fix multi-interface dimm handling, acpi6.1 compatibility</title>
<updated>2016-03-03T23:07:24Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2016-02-05T00:51:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ef1fb7d12ac8863557390ead966566ed3477b023'/>
<id>urn:sha1:ef1fb7d12ac8863557390ead966566ed3477b023</id>
<content type='text'>
commit 6697b2cf69d4363266ca47eaebc49ef13dabc1c9 upstream.

ACPI 6.1 clarified that multi-interface dimms require multiple control
region entries (DCRs) per dimm.  Previously we were assuming that a
control region is only present when block-data-windows are present.
This implementation was done with an eye to be compatibility with the
looser ACPI 6.0 interpretation of this table.

1/ When coalescing the memory device (MEMDEV) tables for a single dimm,
coalesce on device_handle rather than control region index.

2/ Whenever we disocver a control region with non-zero block windows
re-scan for block-data-window (BDW) entries.

We may need to revisit this if a DIMM ever implements a format interface
outside of blk or pmem, but that is not on the foreseeable horizon.

Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>nfit: acpi_nfit_notify(): Do not leave device locked</title>
<updated>2015-12-11T22:24:26Z</updated>
<author>
<name>Alexey Khoroshilov</name>
</author>
<published>2015-12-11T20:24:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d91e892825ae6f0ed4f8b07ae5d348eff86ab2ea'/>
<id>urn:sha1:d91e892825ae6f0ed4f8b07ae5d348eff86ab2ea</id>
<content type='text'>
Even if dev-&gt;driver is null because we are being removed,
it is safer to not leave device locked.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Reviewed-by: Ross Zwisler &lt;ross.zwisler@linux.intel.com&gt;
Reviewed-by: Vishal Verma &lt;vishal.l.verma@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>nfit: Adjust for different _FIT and NFIT headers</title>
<updated>2015-11-30T22:51:46Z</updated>
<author>
<name>Linda Knippers</name>
</author>
<published>2015-11-21T00:05:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b577c9d772c45448aec784ec235cea228b4d3ad'/>
<id>urn:sha1:6b577c9d772c45448aec784ec235cea228b4d3ad</id>
<content type='text'>
When support for _FIT was added, the code presumed that the data
returned by the _FIT method is identical to the NFIT table, which
starts with an acpi_table_header.  However, the _FIT is defined
to return a data in the format of a series of NFIT type structure
entries and as a method, has an acpi_object header rather tahn
an acpi_table_header.

To address the differences, explicitly save the acpi_table_header
from the NFIT, since it is accessible through /sys, and change
the nfit pointer in the acpi_desc structure to point to the
table entries rather than the headers.

Reported-by: Jeff Moyer (jmoyer@redhat.com&gt;
Signed-off-by: Linda Knippers &lt;linda.knippers@hpe.com&gt;
Acked-by: Vishal Verma &lt;vishal.l.verma@intel.com&gt;
[vishal: fix up unit test for new header assumptions]
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>nfit: Fix the check for a successful NFIT merge</title>
<updated>2015-11-30T22:51:46Z</updated>
<author>
<name>Linda Knippers</name>
</author>
<published>2015-11-21T00:05:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff5a55f89c6690a0b292f1a7e0cd4532961588d5'/>
<id>urn:sha1:ff5a55f89c6690a0b292f1a7e0cd4532961588d5</id>
<content type='text'>
Missed previously due to a lack of test coverage on a platform that
provided an valid response to _FIT.

Signed-off-by: Linda Knippers &lt;linda.knippers@hpe.com&gt;
Acked-by: Vishal Verma &lt;vishal.l.verma@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>nfit: Account for table size length variation</title>
<updated>2015-11-30T22:22:35Z</updated>
<author>
<name>Linda Knippers</name>
</author>
<published>2015-11-21T00:05:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=826c416f3c9493b69630a811832cfb7c9007f840'/>
<id>urn:sha1:826c416f3c9493b69630a811832cfb7c9007f840</id>
<content type='text'>
The size of NFIT tables don't necessarily match the size of the
data structures that we use for them.  For example, the NVDIMM
Control Region Structure table is shorter for a device with
no block control windows than for a device with block control windows.
Other tables, such as Flush Hint Address Structure and the Interleave
Structure are variable length by definition.

Account for the size difference when comparing table entries by
using the actual table size from the table header if it's less
than the structure size.

Signed-off-by: Linda Knippers &lt;linda.knippers@hpe.com&gt;
Acked-by: Vishal Verma &lt;vishal.l.verma@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'libnvdimm-for-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm</title>
<updated>2015-11-10T20:07:22Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2015-11-10T20:07:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=264015f8a83fefc62c5125d761fbbadf924e520c'/>
<id>urn:sha1:264015f8a83fefc62c5125d761fbbadf924e520c</id>
<content type='text'>
Pull libnvdimm updates from Dan Williams:
 "Outside of the new ACPI-NFIT hot-add support this pull request is more
  notable for what it does not contain, than what it does.  There were a
  handful of development topics this cycle, dax get_user_pages, dax
  fsync, and raw block dax, that need more more iteration and will wait
  for 4.5.

  The patches to make devm and the pmem driver NUMA aware have been in
  -next for several weeks.  The hot-add support has not, but is
  contained to the NFIT driver and is passing unit tests.  The coredump
  support is straightforward and was looked over by Jeff.  All of it has
  received a 0day build success notification across 107 configs.

  Summary:

   - Add support for the ACPI 6.0 NFIT hot add mechanism to process
     updates of the NFIT at runtime.

   - Teach the coredump implementation how to filter out DAX mappings.

   - Introduce NUMA hints for allocations made by the pmem driver, and
     as a side effect all devm allocations now hint their NUMA node by
     default"

* tag 'libnvdimm-for-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  coredump: add DAX filtering for FDPIC ELF coredumps
  coredump: add DAX filtering for ELF coredumps
  acpi: nfit: Add support for hot-add
  nfit: in acpi_nfit_init, break on a 0-length table
  pmem, memremap: convert to numa aware allocations
  devm_memremap_pages: use numa_mem_id
  devm: make allocations numa aware by default
  devm_memremap: convert to return ERR_PTR
  devm_memunmap: use devres_release()
  pmem: kill memremap_pmem()
  x86, mm: quiet arch_add_memory()
</content>
</entry>
</feed>
