1. 16 11月, 2016 5 次提交
  2. 12 11月, 2016 1 次提交
  3. 09 9月, 2016 5 次提交
    • G
      ramoops: move spin_lock_init after kmalloc error checking · f88baf68
      Geliang Tang 提交于
      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: NGeliang Tang <geliangtang@gmail.com>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      f88baf68
    • 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/ram: Set pstore flags dynamically · 79d955af
      Namhyung Kim 提交于
      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: NNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      79d955af
    • 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
    • S
      pstore/ramoops: fixup driver removal · 4407de74
      Sebastian Andrzej Siewior 提交于
      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: NNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Cc: stable@vger.kernel.org # 4.4.x-
      4407de74
  4. 06 8月, 2016 2 次提交
  5. 15 6月, 2016 1 次提交
    • G
      pstore/ram: add Device Tree bindings · 35da6094
      Greg Hackmann 提交于
      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: NGreg 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: NKees Cook <keescook@chromium.org>
      35da6094
  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. 11 3月, 2016 1 次提交
  8. 22 10月, 2015 1 次提交
  9. 22 5月, 2015 3 次提交
  10. 17 3月, 2015 1 次提交
  11. 17 1月, 2015 3 次提交
  12. 12 12月, 2014 1 次提交
    • T
      pstore-ram: Allow optional mapping with pgprot_noncached · 027bc8b0
      Tony Lindgren 提交于
      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: NKees Cook <keescook@chromium.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      027bc8b0
  13. 06 11月, 2014 1 次提交
    • B
      pstore/ram: Strip ramoops header for correct decompression · a28726b4
      Ben Zhang 提交于
      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: NBen Zhang <benzh@chromium.org>
      Acked-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      a28726b4
  14. 20 10月, 2014 1 次提交
  15. 18 3月, 2014 4 次提交
  16. 31 8月, 2013 1 次提交
  17. 20 8月, 2013 3 次提交
  18. 01 7月, 2013 1 次提交
  19. 15 6月, 2013 1 次提交
  20. 09 5月, 2013 1 次提交
  21. 04 4月, 2013 2 次提交