1. 08 3月, 2017 10 次提交
  2. 25 2月, 2017 1 次提交
  3. 16 11月, 2016 1 次提交
    • N
      pstore: Convert console write to use ->write_buf · 70ad35db
      Namhyung Kim 提交于
      Maybe I'm missing something, but I don't know why it needs to copy the
      input buffer to psinfo->buf and then write.  Instead we can write the
      input buffer directly.  The only implementation that supports console
      message (i.e. ramoops) already does it for ftrace messages.
      
      For the upcoming virtio backend driver, it needs to protect psinfo->buf
      overwritten from console messages.  If it could use ->write_buf method
      instead of ->write, the problem will be solved easily.
      
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      70ad35db
  4. 09 11月, 2016 1 次提交
  5. 09 9月, 2016 2 次提交
    • M
      pstore/pmsg: drop bounce buffer · 5bf6d1b9
      Mark Salyzyn 提交于
      Removing a bounce buffer copy operation in the pmsg driver path is
      always better. We also gain in overall performance by not requesting
      a vmalloc on every write as this can cause precious RT tasks, such
      as user facing media operation, to stall while memory is being
      reclaimed. Added a write_buf_user to the pstore functions, a backup
      platform write_buf_user that uses the small buffer that is part of
      the instance, and implemented a ramoops write_buf_user that only
      supports PSTORE_TYPE_PMSG.
      Signed-off-by: NMark Salyzyn <salyzyn@android.com>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      5bf6d1b9
    • N
      pstore: Split pstore fragile flags · c950fd6f
      Namhyung Kim 提交于
      This patch adds new PSTORE_FLAGS for each pstore type so that they can
      be enabled separately.  This is a preparation for ongoing virtio-pstore
      work to support those types flexibly.
      
      The PSTORE_FLAGS_FRAGILE is changed to PSTORE_FLAGS_DMESG to preserve the
      original behavior.
      
      Cc: Anton Vorontsov <anton@enomsg.org>
      Cc: Colin Cross <ccross@android.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: linux-acpi@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      [kees: retained "FRAGILE" for now to make merges easier]
      Signed-off-by: NKees Cook <keescook@chromium.org>
      c950fd6f
  6. 03 6月, 2016 1 次提交
    • G
      pstore: add lzo/lz4 compression support · 8cfc8ddc
      Geliang Tang 提交于
      Like zlib compression in pstore, this patch added lzo and lz4
      compression support so that users can have more options and better
      compression ratio.
      
      The original code treats the compressed data together with the
      uncompressed ECC correction notice by using zlib decompress. The
      ECC correction notice is missing in the decompression process. The
      treatment also makes lzo and lz4 not working. So I treat them
      separately by using pstore_decompress() to treat the compressed
      data, and memcpy() to treat the uncompressed ECC correction notice.
      Signed-off-by: NGeliang Tang <geliangtang@163.com>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      8cfc8ddc
  7. 01 6月, 2016 3 次提交
  8. 03 11月, 2015 1 次提交
  9. 22 10月, 2015 2 次提交
  10. 22 5月, 2015 2 次提交
  11. 17 1月, 2015 2 次提交
  12. 07 6月, 2014 1 次提交
  13. 18 3月, 2014 1 次提交
  14. 21 12月, 2013 1 次提交
  15. 17 9月, 2013 3 次提交
  16. 20 8月, 2013 5 次提交
  17. 01 7月, 2013 1 次提交
  18. 29 6月, 2013 1 次提交
    • L
      pstore: Return unique error if backend registration excluded by kernel param · 8e48b1a8
      Lenny Szubowicz 提交于
      This is patch 1/3 of a patch set that avoids what misleadingly appears
      to be a error during boot:
      
      ERST: Could not register with persistent store
      
      This message is displayed if the system has a valid ACPI ERST table and the
      pstore.backend kernel parameter has been used to disable use of ERST by
      pstore. But this same message is used for errors that preclude registration.
      
      As part of fixing this, return a unique error status from pstore_register
      if the pstore.backend kernel parameter selects a specific facility other
      than the requesting facility and check for this condition before any others.
      This allows the caller to distinquish this benign case from the other failure
      cases.
      
      Also, print an informational console message about which facility
      successfully registered as the pstore backend. Since there are various
      kernel parameters, config build options, and boot-time errors that can
      influence which facility registers with pstore, it's useful to have a
      positive indication.
      Signed-off-by: NLenny Szubowicz <lszubowi@redhat.com>
      Reported-by: NNaotaka Hamaguchi <n.hamaguchi@jp.fujitsu.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      8e48b1a8
  19. 12 1月, 2013 1 次提交
    • S
      pstore: Avoid deadlock in panic and emergency-restart path · 9f244e9c
      Seiji Aguchi 提交于
      [Issue]
      
      When pstore is in panic and emergency-restart paths, it may be blocked
      in those paths because it simply takes spin_lock.
      
      This is an example scenario which pstore may hang up in a panic path:
      
       - cpuA grabs psinfo->buf_lock
       - cpuB panics and calls smp_send_stop
       - smp_send_stop sends IRQ to cpuA
       - after 1 second, cpuB gives up on cpuA and sends an NMI instead
       - cpuA is now in an NMI handler while still holding buf_lock
       - cpuB is deadlocked
      
      This case may happen if a firmware has a bug and
      cpuA is stuck talking with it more than one second.
      
      Also, this is a similar scenario in an emergency-restart path:
      
       - cpuA grabs psinfo->buf_lock and stucks in a firmware
       - cpuB kicks emergency-restart via either sysrq-b or hangcheck timer.
         And then, cpuB is deadlocked by taking psinfo->buf_lock again.
      
      [Solution]
      
      This patch avoids the deadlocking issues in both panic and emergency_restart
      paths by introducing a function, is_non_blocking_path(), to check if a cpu
      can be blocked in current path.
      
      With this patch, pstore is not blocked even if another cpu has
      taken a spin_lock, in those paths by changing from spin_lock_irqsave
      to spin_trylock_irqsave.
      
      In addition, according to a comment of emergency_restart() in kernel/sys.c,
      spin_lock shouldn't be taken in an emergency_restart path to avoid
      deadlock. This patch fits the comment below.
      
      <snip>
      /**
       *      emergency_restart - reboot the system
       *
       *      Without shutting down any hardware or taking any locks
       *      reboot the system.  This is called when we know we are in
       *      trouble so this is our best effort to reboot.  This is
       *      safe to call in interrupt context.
       */
      void emergency_restart(void)
      <snip>
      Signed-off-by: NSeiji Aguchi <seiji.aguchi@hds.com>
      Acked-by: NDon Zickus <dzickus@redhat.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      9f244e9c