1. 16 Nov, 2016 2 commits
  2. 11 Nov, 2016 1 commit
  3. 08 Sep, 2016 5 commits
    • Geliang Tang's avatar
      ramoops: move spin_lock_init after kmalloc error checking · f88baf68
      Geliang Tang authored
      
      
      If cxt->pstore.buf allocated failed, no need to initialize
      cxt->pstore.buf_lock. So this patch moves spin_lock_init() after the
      error checking.
      
      Signed-off-by: default avatarGeliang Tang <geliangtang@gmail.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      f88baf68
    • Mark Salyzyn's avatar
      pstore/pmsg: drop bounce buffer · 5bf6d1b9
      Mark Salyzyn authored
      
      
      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: default avatarMark Salyzyn <salyzyn@android.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      5bf6d1b9
    • Namhyung Kim's avatar
      pstore/ram: Set pstore flags dynamically · 79d955af
      Namhyung Kim authored
      
      
      The ramoops can be configured to enable each pstore type by setting
      their size.  In that case, it'd be better not to register disabled types
      in the first place.
      
      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>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      79d955af
    • Namhyung Kim's avatar
      pstore: Split pstore fragile flags · c950fd6f
      Namhyung Kim authored
      
      
      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: default avatarNamhyung Kim <namhyung@kernel.org>
      [kees: retained "FRAGILE" for now to make merges easier]
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      c950fd6f
    • Sebastian Andrzej Siewior's avatar
      pstore/ramoops: fixup driver removal · 4407de74
      Sebastian Andrzej Siewior authored
      A basic rmmod ramoops segfaults. Let's see why.
      
      Since commit 34f0ec82 ("pstore: Correct the max_dump_cnt clearing of
      ramoops") sets ->max_dump_cnt to zero before looping over ->przs but we
      didn't use it before that either.
      
      And since commit ee1d2674
      
       ("pstore: add pstore unregister") we free
      that memory on rmmod.
      
      But even then, we looped until a NULL pointer or ERR. I don't see where
      it is ensured that the last member is NULL. Let's try this instead:
      simply error recovery and free. Clean up in error case where resources
      were allocated. And then, in the free path, rely on ->max_dump_cnt in
      the free path.
      
      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: Namhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Cc: stable@vger.kernel.org # 4.4.x-
      4407de74
  4. 05 Aug, 2016 2 commits
  5. 14 Jun, 2016 1 commit
    • Greg Hackmann's avatar
      pstore/ram: add Device Tree bindings · 35da6094
      Greg Hackmann authored
      
      
      ramoops is one of the remaining places where ARM vendors still rely on
      board-specific shims.  Device Tree lets us replace those shims with
      generic code.
      
      These bindings mirror the ramoops module parameters, with two small
      differences:
      
      (1) dump_oops becomes an optional "no-dump-oops" property, since ramoops
          sets dump_oops=1 by default.
      
      (2) mem_type=1 becomes the more self-explanatory "unbuffered" property.
      
      Signed-off-by: default avatarGreg Hackmann <ghackmann@google.com>
      [fixed platform_get_drvdata() crash, thanks to Brian Norris]
      [switched from u64 to u32 to simplify code, various whitespace fixes]
      [use dev_of_node() to gain code-elimination for CONFIG_OF=n]
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      35da6094
  6. 02 Jun, 2016 1 commit
    • Geliang Tang's avatar
      pstore: add lzo/lz4 compression support · 8cfc8ddc
      Geliang Tang authored
      
      
      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: default avatarGeliang Tang <geliangtang@163.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      8cfc8ddc
  7. 10 Mar, 2016 1 commit
  8. 22 Oct, 2015 1 commit
  9. 21 May, 2015 3 commits
  10. 16 Mar, 2015 1 commit
  11. 17 Jan, 2015 1 commit
  12. 16 Jan, 2015 2 commits
  13. 11 Dec, 2014 1 commit
    • Tony Lindgren's avatar
      pstore-ram: Allow optional mapping with pgprot_noncached · 027bc8b0
      Tony Lindgren authored
      
      
      On some ARMs the memory can be mapped pgprot_noncached() and still
      be working for atomic operations. As pointed out by Colin Cross
      <ccross@android.com>, in some cases you do want to use
      pgprot_noncached() if the SoC supports it to see a debug printk
      just before a write hanging the system.
      
      On ARMs, the atomic operations on strongly ordered memory are
      implementation defined. So let's provide an optional kernel parameter
      for configuring pgprot_noncached(), and use pgprot_writecombine() by
      default.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Rob Herring <robherring2@gmail.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Anton Vorontsov <anton@enomsg.org>
      Cc: Colin Cross <ccross@android.com>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: stable@vger.kernel.org
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      027bc8b0
  14. 05 Nov, 2014 1 commit
    • Ben Zhang's avatar
      pstore/ram: Strip ramoops header for correct decompression · a28726b4
      Ben Zhang authored
      
      
      pstore compression/decompression was added during 3.12.
      The ramoops driver prepends a "====timestamp.timestamp-C|D\n"
      header to the compressed record before handing it over to pstore
      driver which doesn't know about the header. In pstore_decompress(),
      the pstore driver reads the first "==" as a zlib header, so the
      decompression always fails. For example, this causes the driver
      to write /dev/pstore/dmesg-ramoops-0.enc.z instead of
      /dev/pstore/dmesg-ramoops-0.
      
      This patch makes the ramoops driver remove the header before
      pstore decompression.
      
      Signed-off-by: default avatarBen Zhang <benzh@chromium.org>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      a28726b4
  15. 20 Oct, 2014 1 commit
  16. 17 Mar, 2014 4 commits
  17. 30 Aug, 2013 1 commit
  18. 19 Aug, 2013 3 commits
  19. 01 Jul, 2013 1 commit
  20. 14 Jun, 2013 1 commit
  21. 08 May, 2013 1 commit
  22. 04 Apr, 2013 2 commits
  23. 19 Mar, 2013 1 commit
  24. 11 Mar, 2013 1 commit
  25. 16 Jan, 2013 1 commit