1. 06 8月, 2016 2 次提交
  2. 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
  3. 03 6月, 2016 2 次提交
    • G
      pstore: drop file opened reference count · 52d210d9
      Geliang Tang 提交于
      In ee1d2674 ("pstore: add pstore unregister") I added:
      	.owner = THIS_MODULE,
      in both pstore_fs_type and pstore_file_operations to increase a reference
      count when pstore filesystem is mounted and pstore file is opened.
      
      But, it's repetitive. There is no need to increase the opened reference
      count. We only need to increase the mounted reference count. When a file
      is opened, the filesystem can't be unmounted. Hence the pstore module
      can't be unloaded either.
      
      So I drop the opened reference count in this patch.
      
      Fixes: ee1d2674 ("pstore: add pstore unregister")
      Signed-off-by: NGeliang Tang <geliangtang@163.com>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      52d210d9
    • 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
  4. 01 6月, 2016 3 次提交
  5. 30 5月, 2016 1 次提交
  6. 05 4月, 2016 1 次提交
    • K
      mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros · 09cbfeaf
      Kirill A. Shutemov 提交于
      PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
      ago with promise that one day it will be possible to implement page
      cache with bigger chunks than PAGE_SIZE.
      
      This promise never materialized.  And unlikely will.
      
      We have many places where PAGE_CACHE_SIZE assumed to be equal to
      PAGE_SIZE.  And it's constant source of confusion on whether
      PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
      especially on the border between fs and mm.
      
      Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
      breakage to be doable.
      
      Let's stop pretending that pages in page cache are special.  They are
      not.
      
      The changes are pretty straight-forward:
      
       - <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
      
       - page_cache_get() -> get_page();
      
       - page_cache_release() -> put_page();
      
      This patch contains automated changes generated with coccinelle using
      script below.  For some reason, coccinelle doesn't patch header files.
      I've called spatch for them manually.
      
      The only adjustment after coccinelle is revert of changes to
      PAGE_CAHCE_ALIGN definition: we are going to drop it later.
      
      There are few places in the code where coccinelle didn't reach.  I'll
      fix them manually in a separate patch.  Comments and documentation also
      will be addressed with the separate patch.
      
      virtual patch
      
      @@
      expression E;
      @@
      - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      expression E;
      @@
      - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      @@
      - PAGE_CACHE_SHIFT
      + PAGE_SHIFT
      
      @@
      @@
      - PAGE_CACHE_SIZE
      + PAGE_SIZE
      
      @@
      @@
      - PAGE_CACHE_MASK
      + PAGE_MASK
      
      @@
      expression E;
      @@
      - PAGE_CACHE_ALIGN(E)
      + PAGE_ALIGN(E)
      
      @@
      expression E;
      @@
      - page_cache_get(E)
      + get_page(E)
      
      @@
      expression E;
      @@
      - page_cache_release(E)
      + put_page(E)
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      09cbfeaf
  7. 11 3月, 2016 1 次提交
  8. 23 1月, 2016 1 次提交
    • A
      wrappers for ->i_mutex access · 5955102c
      Al Viro 提交于
      parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
      inode_foo(inode) being mutex_foo(&inode->i_mutex).
      
      Please, use those for access to ->i_mutex; over the coming cycle
      ->i_mutex will become rwsem, with ->lookup() done with it held
      only shared.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      5955102c
  9. 03 11月, 2015 1 次提交
  10. 23 10月, 2015 1 次提交
  11. 22 10月, 2015 3 次提交
  12. 01 7月, 2015 1 次提交
  13. 22 5月, 2015 5 次提交
  14. 16 4月, 2015 1 次提交
  15. 23 3月, 2015 1 次提交
  16. 17 3月, 2015 1 次提交
  17. 17 1月, 2015 5 次提交
  18. 12 12月, 2014 2 次提交
    • 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
    • R
      pstore-ram: Fix hangs by using write-combine mappings · 7ae9cb81
      Rob Herring 提交于
      Currently trying to use pstore on at least ARMs can hang as we're
      mapping the peristent RAM with pgprot_noncached().
      
      On ARMs, pgprot_noncached() will actually make the memory strongly
      ordered, and as the atomic operations pstore uses are implementation
      defined for strongly ordered memory, they may not work. So basically
      atomic operations have undefined behavior on ARM for device or strongly
      ordered memory types.
      
      Let's fix the issue by using write-combine variants for mappings. This
      corresponds to normal, non-cacheable memory on ARM. For many other
      architectures, this change does not change the mapping type as by
      default we have:
      
      #define pgprot_writecombine pgprot_noncached
      
      The reason why pgprot_noncached() was originaly used for pstore
      is because Colin Cross <ccross@android.com> had observed lost
      debug prints right before a device hanging write operation on some
      systems. For the platforms supporting pgprot_noncached(), we can
      add a an optional configuration option to support that. But let's
      get pstore working first before adding new features.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Anton Vorontsov <cbouatmailru@gmail.com>
      Cc: Colin Cross <ccross@android.com>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: linux-kernel@vger.kernel.org
      Cc: stable@vger.kernel.org
      Acked-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      [tony@atomide.com: updated description]
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      7ae9cb81
  19. 06 11月, 2014 2 次提交
  20. 20 10月, 2014 1 次提交
  21. 16 10月, 2014 1 次提交
    • V
      pstore: Fix duplicate {console,ftrace}-efi entries · d4bf205d
      Valdis Kletnieks 提交于
      The pstore filesystem still creates duplicate filename/inode pairs for
      some pstore types.  Add the id to the filename to prevent that.
      
      Before patch:
      
      [/sys/fs/pstore] ls -li
      total 0
      1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
      1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
      1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
      1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
      1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
      1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
      1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
      1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
      1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
      
      After:
      
      [/sys/fs/pstore] ls -li
      total 0
      1232 -r--r--r--. 1 root root 148 Sep 29 17:09 console-efi-141202499100000
      1231 -r--r--r--. 1 root root  67 Sep 29 17:09 console-efi-141202499200000
      1230 -r--r--r--. 1 root root 148 Sep 29 17:44 console-efi-141202705400000
      1229 -r--r--r--. 1 root root  67 Sep 29 17:44 console-efi-141202705500000
      1228 -r--r--r--. 1 root root  67 Sep 29 20:42 console-efi-141203772600000
      1227 -r--r--r--. 1 root root 148 Sep 29 23:42 console-efi-141204854900000
      1226 -r--r--r--. 1 root root  67 Sep 29 23:42 console-efi-141204855000000
      1225 -r--r--r--. 1 root root 148 Sep 29 23:59 console-efi-141204954200000
      1224 -r--r--r--. 1 root root  67 Sep 29 23:59 console-efi-141204954400000
      Signed-off-by: NValdis Kletnieks <valdis.kletnieks@vt.edu>
      Acked-by: NKees Cook <keescook@chromium.org>
      Cc: stable@vger.kernel.org # 3.6+
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      d4bf205d
  22. 09 8月, 2014 1 次提交
  23. 07 6月, 2014 1 次提交
  24. 18 3月, 2014 1 次提交