1. 24 Sep, 2019 1 commit
  2. 29 Aug, 2019 1 commit
  3. 20 Aug, 2019 1 commit
  4. 15 Aug, 2019 1 commit
  5. 02 Jul, 2019 3 commits
  6. 14 Jun, 2019 1 commit
  7. 05 Jun, 2019 2 commits
  8. 22 Apr, 2019 1 commit
    • Vishal Verma's avatar
      tools/testing/nvdimm: add watermarks for dax_pmem* modules · 92f6f2d7
      Vishal Verma authored
      Add nfit_test 'watermarks' for the dax_pmem, dax_pmem_core, and
      dax_pmem_compat modules. This causes the nfit_test module to fail
      loading in case any of these modules are also not overridden with the
      ldconfig wrapped modules. Without this, nfit_test would sometimes fail
      creation of device-dax namespaces on the nfit_test_bus with an unhelpful
      error log such as:
          dax_pmem dax5.0: could not reserve metadata
          dax_pmem: probe of dax5.0 failed with error -16
      Which was caused due to the unwrapped version of
      devm_request_mem_region() being called.
      Cc: Dan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
  9. 08 Apr, 2019 1 commit
  10. 30 Mar, 2019 1 commit
    • Dave Jiang's avatar
      libnvdimm/security: provide fix for secure-erase to use zero-key · 037c8489
      Dave Jiang authored
      Add a zero key in order to standardize hardware that want a key of 0's to
      be passed. Some platforms defaults to a zero-key with security enabled
      rather than allow the OS to enable the security. The zero key would allow
      us to manage those platform as well. This also adds a fix to secure erase
      so it can use the zero key to do crypto erase. Some other security commands
      already use zero keys. This introduces a standard zero-key to allow
      unification of semantics cross nvdimm security commands.
      Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
  11. 21 Jan, 2019 1 commit
  12. 07 Jan, 2019 3 commits
    • Dan Williams's avatar
      device-dax: Add /sys/class/dax backwards compatibility · 730926c3
      Dan Williams authored
      On the expectation that some environments may not upgrade libdaxctl
      (userspace component that depends on the /sys/class/dax hierarchy),
      provide a default / legacy dax_pmem_compat driver. The dax_pmem_compat
      driver implements the original /sys/class/dax sysfs layout rather than
      /sys/bus/dax. When userspace is upgraded it can blacklist this module
      and switch to the dax_pmem driver going forward.
      CONFIG_DEV_DAX_PMEM_COMPAT and supporting code will be deleted according
      to the dax_pmem entry in Documentation/ABI/obsolete/.
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
    • Dan Williams's avatar
      device-dax: Start defining a dax bus model · 51cf784c
      Dan Williams authored
      Towards eliminating the dax_class, move the dax-device-attribute
      enabling to a new bus.c file in the core. The amount of code
      thrash of sub-sequent patches is reduced as no logic changes are made,
      just pure code movement.
      A temporary export of unregister_dex_dax() and dax_attribute_groups is
      needed to preserve compilation, but those symbols become static again in
      a follow-on patch.
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
    • Dan Williams's avatar
      device-dax: Remove multi-resource infrastructure · 753a0850
      Dan Williams authored
      The multi-resource implementation anticipated discontiguous sub-division
      support. That has not yet materialized, delete the infrastructure and
      related code.
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
  13. 28 Dec, 2018 2 commits
  14. 21 Dec, 2018 3 commits
  15. 14 Dec, 2018 2 commits
  16. 05 Dec, 2018 1 commit
  17. 05 Nov, 2018 1 commit
    • Masayoshi Mizuma's avatar
      tools/testing/nvdimm: Fix the array size for dimm devices. · af31b04b
      Masayoshi Mizuma authored
      KASAN reports following global out of bounds access while
      nfit_test is being loaded. The out of bound access happens
      the following reference to dimm_fail_cmd_flags[dimm]. 'dimm' is
      over than the index value, NUM_DCR (==5).
        static int override_return_code(int dimm, unsigned int func, int rc)
                if ((1 << func) & dimm_fail_cmd_flags[dimm]) {
      dimm_fail_cmd_flags[] definition:
        static unsigned long dimm_fail_cmd_flags[NUM_DCR];
      'dimm' is the return value of get_dimm(), and get_dimm() returns
      the index of handle[] array. The handle[] has 7 index. Let's use
      ARRAY_SIZE(handle) as the array size.
      KASAN report:
      BUG: KASAN: global-out-of-bounds in nfit_test_ctl+0x47bb/0x55b0 [nfit_test]
      Read of size 8 at addr ffffffffc10cbbe8 by task kworker/u41:0/8
      Call Trace:
       ? dump_stack_print_info.cold.0+0x1b/0x1b
       ? kmsg_dump_rewind_nolock+0xd9/0xd9
       ? nfit_test_ctl+0x47bb/0x55b0 [nfit_test]
       nfit_test_ctl+0x47bb/0x55b0 [nfit_test]
      The buggy address belongs to the variable:
       dimm_fail_cmd_flags+0x28/0xffffffffffffa440 [nfit_test]
      Fixes: 39611e83
       ("tools/testing/nvdimm: Make DSM failure code injection...")
      Signed-off-by: default avatarMasayoshi Mizuma <m.mizuma@jp.fujitsu.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
  18. 17 Oct, 2018 2 commits
  19. 01 Aug, 2018 1 commit
    • Vishal Verma's avatar
      tools/testing/nvdimm: improve emulation of smart injection · b4d4702f
      Vishal Verma authored
      The emulation for smart injection commands for nfit neglected to check
      the smart field validity flags before injecting to that field. This is
      required as a way to distinguish un-injection vs. leave-alone.
      The emulation was also missing support for un-injection entirely. To add
      this support, first, fix the above flags check. Second, use the
      'enable' field in the injection command to determine injection vs
      un-injection. Third, move the smart initialization struct to be a global
      static structure for the nfit_test module. Reference this to get the
      smart 'defaults' when un-injecting a smart field.
      Signed-off-by: default avatarVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
  20. 30 Jul, 2018 1 commit
  21. 14 Jul, 2018 2 commits
  22. 30 Jun, 2018 1 commit
  23. 23 May, 2018 1 commit
    • Dan Williams's avatar
      x86, nfit_test: Add unit test for memcpy_mcsafe() · 5d8beee2
      Dan Williams authored
      Given the fact that the ACPI "EINJ" (error injection) facility is not
      universally available, implement software infrastructure to validate the
      memcpy_mcsafe() exception handling implementation.
      For each potential read exception point in memcpy_mcsafe(), inject a
      emulated exception point at the address identified by 'mcsafe_inject'
      variable. With this infrastructure implement a test to validate that the
      'bytes remaining' calculation is correct for a range of various source
      buffer alignments.
      This code is compiled out by default. The CONFIG_MCSAFE_DEBUG
      configuration symbol needs to be manually enabled by editing
      Kconfig.debug. I.e. this functionality can not be accidentally enabled
      by a user / distro, it's only for development.
      Cc: <x86@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Reported-by: default avatarTony Luck <tony.luck@intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
  24. 16 Apr, 2018 4 commits
  25. 06 Apr, 2018 2 commits