All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] nfit, libnvdimm: fix and unit test isetcookie calculation
@ 2017-03-01  9:11 ` Dan Williams
  0 siblings, 0 replies; 11+ messages in thread
From: Dan Williams @ 2017-03-01  9:11 UTC (permalink / raw)
  To: linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw
  Cc: linux-acpi-u79uwXL29TY76Z2rM5mHXA, stable-u79uwXL29TY76Z2rM5mHXA

Nick noticed that his implementation of the isetcookie calculation was
producing different results than the Linux enabling. Linux is broken in
its usage of memcmp() to sort the components of an array that is hashed
by a fletcher64 sum. See patch2 for more details.

Patch1 arranges for the unit test infrastructure to produce data that
sorts differently under the two schemes. The original simulated data was
masking this problem.

This implementation is tested with a new "ndctl write-labels" command.
It allows namespace labels with broken cookie values to be written and
validate that the compatibility code behaves as expected.

---

Dan Williams (2):
      tools/testing/nvdimm: make iset cookie predictable
      nfit, libnvdimm: fix interleave set cookie calculation


 drivers/acpi/nfit/core.c         |   16 +++++++++++++++-
 drivers/nvdimm/namespace_devs.c  |   18 ++++++++++++++----
 drivers/nvdimm/nd.h              |    1 +
 drivers/nvdimm/region_devs.c     |    9 +++++++++
 include/linux/libnvdimm.h        |    2 ++
 tools/testing/nvdimm/test/nfit.c |   14 +++++++-------
 6 files changed, 48 insertions(+), 12 deletions(-)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-03-01 19:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-01  9:11 [PATCH 0/2] nfit, libnvdimm: fix and unit test isetcookie calculation Dan Williams
2017-03-01  9:11 ` Dan Williams
2017-03-01  9:11 ` Dan Williams
     [not found] ` <148835947931.28806.15339584183213827869.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-03-01  9:11   ` [PATCH 1/2] tools/testing/nvdimm: make iset cookie predictable Dan Williams
2017-03-01  9:11     ` Dan Williams
2017-03-01  9:11   ` [PATCH 2/2] nfit, libnvdimm: fix interleave set cookie calculation Dan Williams
2017-03-01  9:11     ` Dan Williams
2017-03-01  9:11     ` Dan Williams
     [not found]     ` <148835949014.28806.14335060350919963814.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-03-01 19:57       ` Nicholas Moulin
2017-03-01 19:57         ` Nicholas Moulin
2017-03-01 19:57         ` Nicholas Moulin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.