31 May, 2020

2 commits

  • If a backend was unloaded without having first removed all its
    associated records in pstorefs, subsequent removals would crash while
    attempting to call into the now missing backend. Add automatic removal
    from the tree in pstore_unregister(), so that no references to the
    backend remain.

    Reported-by: Luis Henriques
    Link: https://lore.kernel.org/lkml/87o8yrmv69.fsf@suse.com
    Link: https://lore.kernel.org/lkml/20200506152114.50375-11-keescook@chromium.org/
    Signed-off-by: Kees Cook

    Kees Cook
     
  • Nothing was protecting changes to the pstorefs superblock. Add locking
    and refactor away is_pstore_mounted(), instead using a helper to add a
    way to safely lock the pstorefs root inode during filesystem changes.

    Link: https://lore.kernel.org/lkml/20200506152114.50375-9-keescook@chromium.org/
    Signed-off-by: Kees Cook

    Kees Cook
     

13 May, 2020

3 commits

  • The "unlink" handling should perform list removal (which can also make
    sure records don't get double-erased), and the "evict" handling should
    be responsible only for memory freeing.

    Link: https://lore.kernel.org/lkml/20200506152114.50375-8-keescook@chromium.org/
    Signed-off-by: Kees Cook

    Kees Cook
     
  • The pstorefs internal list lock doesn't need to be a spinlock and will
    create problems when trying to access the list in the subsequent patch
    that will walk the pstorefs records during pstore_unregister(). Change
    this to a mutex to avoid may_sleep() warnings when unregistering devices.

    Link: https://lore.kernel.org/lkml/20200506152114.50375-6-keescook@chromium.org/
    Signed-off-by: Kees Cook

    Kees Cook
     
  • The name "allpstore" doesn't carry much meaning, so rename it to what it
    actually is: the list of all records present in the filesystem. The lock
    is also renamed accordingly.

    Link: https://lore.kernel.org/lkml/20200506152114.50375-5-keescook@chromium.org/
    Signed-off-by: Kees Cook

    Kees Cook
     

28 Feb, 2020

1 commit

  • In Aug 2018 NeilBrown noticed
    commit 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code and interface")
    "Some ->next functions do not increment *pos when they return NULL...
    Note that such ->next functions are buggy and should be fixed.
    A simple demonstration is

    dd if=/proc/swaps bs=1000 skip=1

    Choose any block size larger than the size of /proc/swaps. This will
    always show the whole last line of /proc/swaps"

    /proc/swaps output was fixed recently, however there are lot of other
    affected files, and one of them is related to pstore subsystem.

    If .next function does not change position index, following .show function
    will repeat output related to current position index.

    There are at least 2 related problems:
    - read after lseek beyond end of file, described above by NeilBrown
    "dd if= bs=1000 skip=1" will generate whole last list
    - read after lseek on in middle of last line will output expected rest of
    last line but then repeat whole last line once again.

    If .show() function generates multy-line output (like
    pstore_ftrace_seq_show() does ?) following bash script cycles endlessly

    $ q=;while read -r r;do echo "$((++q)) $r";done < AFFECTED_FILE

    Unfortunately I'm not familiar enough to pstore subsystem and was unable
    to find affected pstore-related file on my test node.

    If .next function does not change position index, following .show function
    will repeat output related to current position index.

    Cc: stable@vger.kernel.org
    Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code ...")
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=206283
    Signed-off-by: Vasily Averin
    Link: https://lore.kernel.org/r/4e49830d-4c88-0171-ee24-1ee540028dad@virtuozzo.com
    [kees: with robustness tweak from Joel Fernandes ]
    Signed-off-by: Kees Cook

    Vasily Averin
     

09 Jul, 2019

1 commit

  • The pstore_mkfile() function is passed a pointer to a struct
    pstore_record. On success it consumes this 'record' pointer and
    references it from the created inode.

    On failure, however, it may or may not free the record. There are even
    two different code paths which return -ENOMEM -- one of which does and
    the other doesn't free the record.

    Make the behaviour deterministic by never consuming and freeing the
    record when returning failure, allowing the caller to do the cleanup
    consistently.

    Signed-off-by: Norbert Manthey
    Link: https://lore.kernel.org/r/1562331960-26198-1-git-send-email-nmanthey@amazon.de
    Fixes: 83f70f0769ddd ("pstore: Do not duplicate record metadata")
    Fixes: 1dfff7dd67d1a ("pstore: Pass record contents instead of copying")
    Cc: stable@vger.kernel.org
    [kees: also move "private" allocation location, rename inode cleanup label]
    Signed-off-by: Kees Cook

    Norbert Manthey
     

05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation this program is
    distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details you should have received a copy of the gnu general
    public license along with this program if not write to the free
    software foundation inc 59 temple place suite 330 boston ma 02111
    1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 136 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Alexios Zavras
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190530000436.384967451@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

09 Apr, 2019

1 commit

  • %pF and %pf are functionally equivalent to %pS and %ps conversion
    specifiers. The former are deprecated, therefore switch the current users
    to use the preferred variant.

    The changes have been produced by the following command:

    git grep -l '%p[fF]' | grep -v '^\(tools\|Documentation\)/' | \
    while read i; do perl -i -pe 's/%pf/%ps/g; s/%pF/%pS/g;' $i; done

    And verifying the result.

    Link: http://lkml.kernel.org/r/20190325193229.23390-1-sakari.ailus@linux.intel.com
    Cc: Andy Shevchenko
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: sparclinux@vger.kernel.org
    Cc: linux-um@lists.infradead.org
    Cc: xen-devel@lists.xenproject.org
    Cc: linux-acpi@vger.kernel.org
    Cc: linux-pm@vger.kernel.org
    Cc: drbd-dev@lists.linbit.com
    Cc: linux-block@vger.kernel.org
    Cc: linux-mmc@vger.kernel.org
    Cc: linux-nvdimm@lists.01.org
    Cc: linux-pci@vger.kernel.org
    Cc: linux-scsi@vger.kernel.org
    Cc: linux-btrfs@vger.kernel.org
    Cc: linux-f2fs-devel@lists.sourceforge.net
    Cc: linux-mm@kvack.org
    Cc: ceph-devel@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Signed-off-by: Sakari Ailus
    Acked-by: David Sterba (for btrfs)
    Acked-by: Mike Rapoport (for mm/memblock.c)
    Acked-by: Bjorn Helgaas (for drivers/pci)
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Petr Mladek

    Sakari Ailus
     

04 Dec, 2018

1 commit

  • In later patches we will need to map types to names, so create a
    constant table for that which can also be used in different parts of
    old and new code. This saves the type in the PRZ which will be useful
    in later patches.

    Instead of having an explicit PSTORE_TYPE_UNKNOWN, just use ..._MAX.

    This includes removing the now redundant filename templates which can use
    a single format string. Also, there's no reason to limit the "is it still
    compressed?" test to only PSTORE_TYPE_DMESG when building the pstorefs
    filename. Records are zero-initialized, so a backend would need to have
    explicitly set compressed=1.

    Signed-off-by: Joel Fernandes (Google)
    Co-developed-by: Kees Cook
    Signed-off-by: Kees Cook

    Joel Fernandes (Google)
     

22 Oct, 2018

1 commit


08 Mar, 2018

1 commit

  • To allow for easier build test coverage and run-time testing, this allows
    multiple compression algorithms to be built into pstore. Still only one
    is supported to operate at a time (which can be selected at build time
    or at boot time, similar to how LSMs are selected).

    Signed-off-by: Kees Cook

    Kees Cook
     

18 Aug, 2017

2 commits

  • This reverts commit 68c4a4f8abc60c9440ede9cd123d48b78325f7a3, with
    various conflict clean-ups.

    The capability check required too much privilege compared to simple DAC
    controls. A system builder was forced to have crash handler processes
    run with CAP_SYSLOG which would give it the ability to read (and wipe)
    the _current_ dmesg, which is much more access than being given access
    only to the historical log stored in pstorefs.

    With the prior commit to make the root directory 0750, the files are
    protected by default but a system builder can now opt to give access
    to a specific group (via chgrp on the pstorefs root directory) without
    being forced to also give away CAP_SYSLOG.

    Suggested-by: Nick Kralevich
    Signed-off-by: Kees Cook
    Reviewed-by: Petr Mladek
    Reviewed-by: Sergey Senozhatsky

    Kees Cook
     
  • Currently only DMESG and CONSOLE record types are protected, and it isn't
    obvious that they are using a capability check. Instead switch to explicit
    root directory mode of 0750 to keep files private by default. This will
    allow the removal of the capability check, which was non-obvious and
    forces a process to have possibly too much privilege when simple post-boot
    chgrp for readers would be possible without it.

    Signed-off-by: Kees Cook
    Reviewed-by: Sergey Senozhatsky

    Kees Cook
     

16 Jul, 2017

1 commit

  • Pull ->s_options removal from Al Viro:
    "Preparations for fsmount/fsopen stuff (coming next cycle). Everything
    gets moved to explicit ->show_options(), killing ->s_options off +
    some cosmetic bits around fs/namespace.c and friends. Basically, the
    stuff needed to work with fsmount series with minimum of conflicts
    with other work.

    It's not strictly required for this merge window, but it would reduce
    the PITA during the coming cycle, so it would be nice to have those
    bits and pieces out of the way"

    * 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    isofs: Fix isofs_show_options()
    VFS: Kill off s_options and helpers
    orangefs: Implement show_options
    9p: Implement show_options
    isofs: Implement show_options
    afs: Implement show_options
    affs: Implement show_options
    befs: Implement show_options
    spufs: Implement show_options
    bpf: Implement show_options
    ramfs: Implement show_options
    pstore: Implement show_options
    omfs: Implement show_options
    hugetlbfs: Implement show_options
    VFS: Don't use save/replace_mount_options if not using generic_show_options
    VFS: Provide empty name qstr
    VFS: Make get_filesystem() return the affected filesystem
    VFS: Clean up whitespace in fs/namespace.c and fs/super.c
    Provide a function to create a NUL-terminated string from unterminated data

    Linus Torvalds
     

06 Jul, 2017

1 commit

  • Implement the show_options superblock op for pstore as part of a bid to get
    rid of s_options and generic_show_options() to make it easier to implement
    a context-based mount where the mount options can be passed individually
    over a file descriptor.

    Signed-off-by: David Howells
    cc: Kees Cook
    cc: Anton Vorontsov
    cc: Colin Cross
    cc: Tony Luck
    Signed-off-by: Al Viro

    David Howells
     

01 Jun, 2017

1 commit


28 Apr, 2017

1 commit

  • Lockdep complains about a possible deadlock between mount and unlink
    (which is technically impossible), but fixing this improves possible
    future multiple-backend support, and keeps locking in the right order.

    The lockdep warning could be triggered by unlinking a file in the
    pstore filesystem:

    -> #1 (&sb->s_type->i_mutex_key#14){++++++}:
    lock_acquire+0xc9/0x220
    down_write+0x3f/0x70
    pstore_mkfile+0x1f4/0x460
    pstore_get_records+0x17a/0x320
    pstore_fill_super+0xa4/0xc0
    mount_single+0x89/0xb0
    pstore_mount+0x13/0x20
    mount_fs+0xf/0x90
    vfs_kern_mount+0x66/0x170
    do_mount+0x190/0xd50
    SyS_mount+0x90/0xd0
    entry_SYSCALL_64_fastpath+0x1c/0xb1

    -> #0 (&psinfo->read_mutex){+.+.+.}:
    __lock_acquire+0x1ac0/0x1bb0
    lock_acquire+0xc9/0x220
    __mutex_lock+0x6e/0x990
    mutex_lock_nested+0x16/0x20
    pstore_unlink+0x3f/0xa0
    vfs_unlink+0xb5/0x190
    do_unlinkat+0x24c/0x2a0
    SyS_unlinkat+0x16/0x30
    entry_SYSCALL_64_fastpath+0x1c/0xb1

    Possible unsafe locking scenario:

    CPU0 CPU1
    ---- ----
    lock(&sb->s_type->i_mutex_key#14);
    lock(&psinfo->read_mutex);
    lock(&sb->s_type->i_mutex_key#14);
    lock(&psinfo->read_mutex);

    Reported-by: Marta Lofstedt
    Reported-by: Chris Wilson
    Signed-off-by: Kees Cook
    Acked-by: Namhyung Kim

    Kees Cook
     

08 Mar, 2017

4 commits


16 Nov, 2016

2 commits

  • When update_ms is set, pstore_get_records() will be called when there's
    a new entry. But unlink can be called at the same time and might
    contend with the open-read-close loop. Depending on the implementation
    of platform driver, it may be safe or not. But I think it'd be better
    to protect those race in the first place.

    Cc: Stefan Hajnoczi
    Signed-off-by: Namhyung Kim
    Signed-off-by: Kees Cook

    Namhyung Kim
     
  • In preparation for merging the per CPU buffers into one buffer when
    we retrieve the pstore ftrace data, we store the timestamp as a
    counter in the ftrace pstore record. We store the CPU number as well
    if !PSTORE_CPU_IN_IP, in this case we shift the counter and may lose
    ordering there but we preserve the same record size. The timestamp counter
    is also racy, and not doing any locking or synchronization here results
    in the benefit of lower overhead. Since we don't care much here for exact
    ordering of function traces across CPUs, we don't synchronize and may lose
    some counter updates but I'm ok with that.

    Using trace_clock() results in much lower performance so avoid using it
    since we don't want accuracy in timestamp and need a rough ordering to
    perform merge.

    Signed-off-by: Joel Fernandes
    [kees: updated commit message, added comments]
    Signed-off-by: Kees Cook

    Joel Fernandes
     

28 Sep, 2016

1 commit

  • CURRENT_TIME macro is not appropriate for filesystems as it
    doesn't use the right granularity for filesystem timestamps.
    Use current_time() instead.

    CURRENT_TIME is also not y2038 safe.

    This is also in preparation for the patch that transitions
    vfs timestamps to use 64 bit time and hence make them
    y2038 safe. As part of the effort current_time() will be
    extended to do range checks. Hence, it is necessary for all
    file system timestamps to use current_time(). Also,
    current_time() will be transitioned along with vfs to be
    y2038 safe.

    Note that whenever a single call to current_time() is used
    to change timestamps in different inodes, it is because they
    share the same time granularity.

    Signed-off-by: Deepa Dinamani
    Reviewed-by: Arnd Bergmann
    Acked-by: Felipe Balbi
    Acked-by: Steven Whitehouse
    Acked-by: Ryusuke Konishi
    Acked-by: David Sterba
    Signed-off-by: Al Viro

    Deepa Dinamani
     

03 Jun, 2016

1 commit

  • In ee1d267423a1 ("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: ee1d267423a1 ("pstore: add pstore unregister")
    Signed-off-by: Geliang Tang
    Signed-off-by: Kees Cook

    Geliang Tang
     

05 Apr, 2016

1 commit

  • 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:

    - << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> ;

    - >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> ;

    - 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: Kirill A. Shutemov
    Acked-by: Michal Hocko
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

23 Jan, 2016

1 commit

  • 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: Al Viro

    Al Viro
     

23 Oct, 2015

1 commit


22 Oct, 2015

1 commit

  • pstore doesn't support unregistering yet. It was marked as TODO.
    This patch adds some code to fix it:
    1) Add functions to unregister kmsg/console/ftrace/pmsg.
    2) Add a function to free compression buffer.
    3) Unmap the memory and free it.
    4) Add a function to unregister pstore filesystem.

    Signed-off-by: Geliang Tang
    Acked-by: Kees Cook
    [Removed __exit annotation from ramoops_remove(). Reported by Arnd Bergmann]
    Signed-off-by: Tony Luck

    Geliang Tang
     

01 Jul, 2015

1 commit

  • This allows for better documentation in the code and
    it allows for a simpler and fully correct version of
    fs_fully_visible to be written.

    The mount points converted and their filesystems are:
    /sys/hypervisor/s390/ s390_hypfs
    /sys/kernel/config/ configfs
    /sys/kernel/debug/ debugfs
    /sys/firmware/efi/efivars/ efivarfs
    /sys/fs/fuse/connections/ fusectl
    /sys/fs/pstore/ pstore
    /sys/kernel/tracing/ tracefs
    /sys/fs/cgroup/ cgroup
    /sys/kernel/security/ securityfs
    /sys/fs/selinux/ selinuxfs
    /sys/fs/smackfs/ smackfs

    Cc: stable@vger.kernel.org
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: "Eric W. Biederman"

    Eric W. Biederman
     

27 Apr, 2015

1 commit

  • Pull fourth vfs update from Al Viro:
    "d_inode() annotations from David Howells (sat in for-next since before
    the beginning of merge window) + four assorted fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    RCU pathwalk breakage when running into a symlink overmounting something
    fix I_DIO_WAKEUP definition
    direct-io: only inc/dec inode->i_dio_count for file systems
    fs/9p: fix readdir()
    VFS: assorted d_backing_inode() annotations
    VFS: fs/inode.c helpers: d_inode() annotations
    VFS: fs/cachefiles: d_backing_inode() annotations
    VFS: fs library helpers: d_inode() annotations
    VFS: assorted weird filesystems: d_inode() annotations
    VFS: normal filesystems (and lustre): d_inode() annotations
    VFS: security/: d_inode() annotations
    VFS: security/: d_backing_inode() annotations
    VFS: net/: d_inode() annotations
    VFS: net/unix: d_backing_inode() annotations
    VFS: kernel/: d_inode() annotations
    VFS: audit: d_backing_inode() annotations
    VFS: Fix up some ->d_inode accesses in the chelsio driver
    VFS: Cachefiles should perform fs modifications on the top layer only
    VFS: AF_UNIX sockets should call mknod on the top layer only

    Linus Torvalds
     

16 Apr, 2015

1 commit


23 Mar, 2015

1 commit


17 Jan, 2015

2 commits

  • A secured user-space accessible pstore object. Writes
    to /dev/pmsg0 are appended to the buffer, on reboot
    the persistent contents are available in
    /sys/fs/pstore/pmsg-ramoops-[ID].

    One possible use is syslogd, or other daemon, can
    write messages, then on reboot provides a means to
    triage user-space activities leading up to a panic
    as a companion to the pstore dmesg or console logs.

    Signed-off-by: Mark Salyzyn
    Acked-by: Kees Cook
    Signed-off-by: Tony Luck

    Mark Salyzyn
     
  • No guarantees that the names will not exceed the
    name buffer with future adjustments.

    Signed-off-by: Mark Salyzyn
    Acked-by: Kees Cook
    Signed-off-by: Tony Luck

    Mark Salyzyn
     

06 Nov, 2014

1 commit

  • When the kernel.dmesg_restrict restriction is in place, only users with
    CAP_SYSLOG should be able to access crash dumps (like: attacker is
    trying to exploit a bug, watchdog reboots, attacker can happily read
    crash dumps and logs).

    This puts the restriction on console-* types as well as sensitive
    information could have been leaked there.

    Other log types are unaffected.

    Signed-off-by: Sebastian Schmidt
    Acked-by: Kees Cook
    Signed-off-by: Tony Luck

    Sebastian Schmidt
     

16 Oct, 2014

1 commit

  • 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: Valdis Kletnieks
    Acked-by: Kees Cook
    Cc: stable@vger.kernel.org # 3.6+
    Signed-off-by: Tony Luck

    Valdis Kletnieks
     

13 Mar, 2014

1 commit

  • Previously, the no-op "mount -o mount /dev/xxx" operation when the
    file system is already mounted read-write causes an implied,
    unconditional syncfs(). This seems pretty stupid, and it's certainly
    documented or guaraunteed to do this, nor is it particularly useful,
    except in the case where the file system was mounted rw and is getting
    remounted read-only.

    However, it's possible that there might be some file systems that are
    actually depending on this behavior. In most file systems, it's
    probably fine to only call sync_filesystem() when transitioning from
    read-write to read-only, and there are some file systems where this is
    not needed at all (for example, for a pseudo-filesystem or something
    like romfs).

    Signed-off-by: "Theodore Ts'o"
    Cc: linux-fsdevel@vger.kernel.org
    Cc: Christoph Hellwig
    Cc: Artem Bityutskiy
    Cc: Adrian Hunter
    Cc: Evgeniy Dushistov
    Cc: Jan Kara
    Cc: OGAWA Hirofumi
    Cc: Anders Larsen
    Cc: Phillip Lougher
    Cc: Kees Cook
    Cc: Mikulas Patocka
    Cc: Petr Vandrovec
    Cc: xfs@oss.sgi.com
    Cc: linux-btrfs@vger.kernel.org
    Cc: linux-cifs@vger.kernel.org
    Cc: samba-technical@lists.samba.org
    Cc: codalist@coda.cs.cmu.edu
    Cc: linux-ext4@vger.kernel.org
    Cc: linux-f2fs-devel@lists.sourceforge.net
    Cc: fuse-devel@lists.sourceforge.net
    Cc: cluster-devel@redhat.com
    Cc: linux-mtd@lists.infradead.org
    Cc: jfs-discussion@lists.sourceforge.net
    Cc: linux-nfs@vger.kernel.org
    Cc: linux-nilfs@vger.kernel.org
    Cc: linux-ntfs-dev@lists.sourceforge.net
    Cc: ocfs2-devel@oss.oracle.com
    Cc: reiserfs-devel@vger.kernel.org

    Theodore Ts'o
     

20 Aug, 2013

1 commit