23 Feb, 2015

4 commits

  • Split DCACHE_FILE_TYPE into DCACHE_REGULAR_TYPE (dentries representing regular
    files) and DCACHE_SPECIAL_TYPE (representing blockdev, chardev, FIFO and
    socket files).

    d_is_reg() and d_is_special() are added to detect these subtypes and
    d_is_file() is left as the union of the two.

    This allows a number of places that use S_ISREG(dentry->d_inode->i_mode) to
    use d_is_reg(dentry) instead.

    Signed-off-by: David Howells
    Signed-off-by: Al Viro

    David Howells
     
  • Add a DCACHE_FALLTHRU flag to indicate that, in a layered filesystem, this is
    a virtual dentry that covers another one in a lower layer that should be used
    instead. This may be recorded on medium if directory integration is stored
    there.

    The flag can be set with d_set_fallthru() and tested with d_is_fallthru().

    Original-author: Valerie Aurora
    Signed-off-by: David Howells
    Signed-off-by: Al Viro

    David Howells
     
  • Add DCACHE_WHITEOUT_TYPE and provide a d_is_whiteout() accessor function. A
    d_is_miss() accessor is also added for ordinary cache misses and
    d_is_negative() is modified to indicate either an ordinary miss or an enforced
    miss (whiteout).

    Signed-off-by: David Howells
    Signed-off-by: Al Viro

    David Howells
     
  • Introduce some function for getting the inode (and also the dentry) in an
    environment where layered/unioned filesystems are in operation.

    The problem is that we have places where we need *both* the union dentry and
    the lower source or workspace inode or dentry available, but we can only have
    a handle on one of them. Therefore we need to derive the handle to the other
    from that.

    The idea is to introduce an extra field in struct dentry that allows the union
    dentry to refer to and pin the lower dentry.

    Signed-off-by: David Howells
    Signed-off-by: Al Viro

    David Howells
     

20 Feb, 2015

9 commits


18 Feb, 2015

27 commits

  • Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • ... so make it return void and drop the check for it being non-NULL

    Signed-off-by: Al Viro

    Al Viro
     
  • Note that ll_prep_inode() in the latter does *not* modify ->d_inode;
    it expects non-negative dentry, and in such cases ll_prep_inode() doesn't
    modify *inode - it only uses the value.

    Signed-off-by: Al Viro

    Al Viro
     
  • Pull networking updates from David Miller:

    1) Missing netlink attribute validation in nft_lookup, from Patrick
    McHardy.

    2) Restrict ipv6 partial checksum handling to UDP, since that's the
    only case it works for. From Vlad Yasevich.

    3) Clear out silly device table sentinal macros used by SSB and BCMA
    drivers. From Joe Perches.

    4) Make sure the remote checksum code never creates a situation where
    the remote checksum is applied yet the tunneling metadata describing
    the remote checksum transformation is still present. Otherwise an
    external entity might see this and apply the checksum again. From
    Tom Herbert.

    5) Use msecs_to_jiffies() where applicable, from Nicholas Mc Guire.

    6) Don't explicitly initialize timer struct fields, use setup_timer()
    and mod_timer() instead. From Vaishali Thakkar.

    7) Don't invoke tg3_halt() without the tp->lock held, from Jun'ichi
    Nomura.

    8) Missing __percpu annotation in ipvlan driver, from Eric Dumazet.

    9) Don't potentially perform skb_get() on shared skbs, also from Eric
    Dumazet.

    10) Fix COW'ing of metrics for non-DST_HOST routes in ipv6, from Martin
    KaFai Lau.

    11) Fix merge resolution error between the iov_iter changes in vhost and
    some bug fixes that occurred at the same time. From Jason Wang.

    12) If rtnl_configure_link() fails we have to perform a call to
    ->dellink() before unregistering the device. From WANG Cong.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (39 commits)
    net: dsa: Set valid phy interface type
    rtnetlink: call ->dellink on failure when ->newlink exists
    com20020-pci: add support for eae single card
    vhost_net: fix wrong iter offset when setting number of buffers
    net: spelling fixes
    net/core: Fix warning while make xmldocs caused by dev.c
    net: phy: micrel: disable NAND-tree for KSZ8021, KSZ8031, KSZ8051, KSZ8081
    ipv6: fix ipv6_cow_metrics for non DST_HOST case
    openvswitch: Fix key serialization.
    r8152: restore hw settings
    hso: fix rx parsing logic when skb allocation fails
    tcp: make sure skb is not shared before using skb_get()
    bridge: netfilter: Move sysctl-specific error code inside #ifdef
    ipv6: fix possible deadlock in ip6_fl_purge / ip6_fl_gc
    ipvlan: add a missing __percpu pcpu_stats
    tg3: Hold tp->lock before calling tg3_halt() from tg3_init_one()
    bgmac: fix device initialization on Northstar SoCs (condition typo)
    qlcnic: Delete existing multicast MAC list before adding new
    net/mlx5_core: Fix configuration of log_uar_page_sz
    sunvnet: don't change gso data on clones
    ...

    Linus Torvalds
     
  • Pull md bugfixes from Neil Brown:
    "Three bug md fixes for 3.20

    yet-another-livelock in raid5, and a problem with write errors to
    4K-block devices"

    * tag 'md/3.20-fixes' of git://neil.brown.name/md:
    md/raid5: Fix livelock when array is both resyncing and degraded.
    md/raid10: round up to bdev_logical_block_size in narrow_write_error.
    md/raid1: round up to bdev_logical_block_size in narrow_write_error

    Linus Torvalds
     
  • Pull mcelog regression fix from Tony Luck:
    "Fix regression - functions on the mce notifier chain should not be
    able to decide that an event should not be logged"

    * tag 'please-pull-fixmcelog' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
    x86/mce: Fix regression. All error records should report via /dev/mcelog

    Linus Torvalds
     
  • Pull DocBook build fix from Jonathan Corbet:
    "Fix the DocBook build failure caused by the move of the i2o subsystem
    to the staging tree"

    * tag 'docs-fix' of git://git.lwn.net/linux-2.6:
    Fix docs build failure caused by i2o removal

    Linus Torvalds
     
  • Pull nfsd bugfixes from Bruce Fields:
    "These are fixes for two bugs introduced during the merge window"

    * 'for-3.20' of git://linux-nfs.org/~bfields/linux:
    nfsd4: fix v3-less build
    nfsd: fix comparison in fh_fsid_match()

    Linus Torvalds
     
  • Commit a7854487cd7128a30a7f4f5259de9f67d5efb95f:
    md: When RAID5 is dirty, force reconstruct-write instead of read-modify-write.

    Causes an RCW cycle to be forced even when the array is degraded.
    A degraded array cannot support RCW as that requires reading all data
    blocks, and one may be missing.

    Forcing an RCW when it is not possible causes a live-lock and the code
    spins, repeatedly deciding to do something that cannot succeed.

    So change the condition to only force RCW on non-degraded arrays.

    Reported-by: Manibalan P
    Bisected-by: Jes Sorensen
    Tested-by: Jes Sorensen
    Signed-off-by: NeilBrown
    Fixes: a7854487cd7128a30a7f4f5259de9f67d5efb95f
    Cc: stable@vger.kernel.org (v3.7+)

    NeilBrown
     
  • Pull lazytime mount option support from Al Viro:
    "Lazytime stuff from tytso"

    * 'lazytime' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    ext4: add optimization for the lazytime mount option
    vfs: add find_inode_nowait() function
    vfs: add support for a lazytime mount option

    Linus Torvalds
     
  • Pull iov_iter updates from Al Viro:
    "More iov_iter work - missing counterpart of iov_iter_init() for
    bvec-backed ones and vfs_read_iter()/vfs_write_iter() - wrappers for
    sync calls of ->read_iter()/->write_iter()"

    * 'iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    fs: add vfs_iter_{read,write} helpers
    new helper: iov_iter_bvec()

    Linus Torvalds
     
  • Pull getname/putname updates from Al Viro:
    "Rework of getname/getname_kernel/etc., mostly from Paul Moore. Gets
    rid of quite a pile of kludges between namei and audit..."

    * 'getname2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    audit: replace getname()/putname() hacks with reference counters
    audit: fix filename matching in __audit_inode() and __audit_inode_child()
    audit: enable filename recording via getname_kernel()
    simpler calling conventions for filename_mountpoint()
    fs: create proper filename objects using getname_kernel()
    fs: rework getname_kernel to handle up to PATH_MAX sized filenames
    cut down the number of do_path_lookup() callers

    Linus Torvalds
     
  • Pull debugfs patches from Al Viro:
    "debugfs patches, mostly to make it possible for something like tracefs
    to be transparently automounted on given directory in debugfs.

    New primitive in there is debugfs_create_automount(name, parent, func,
    arg), which creates a directory and makes its ->d_automount() return
    func(arg). Another missing primitive was debugfs_create_file_size() -
    open-coded in quite a few places. Dave's patch adds it and converts
    the open-code instances to calling it"

    * 'debugfs_automount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    debugfs: Provide a file creation function that also takes an initial size
    new primitive: debugfs_create_automount()
    debugfs: split end_creating() into success and failure cases
    debugfs: take mode-dependent parts of debugfs_get_inode() into callers
    fold debugfs_mknod() into callers
    fold debugfs_create() into caller
    fold debugfs_mkdir() into caller
    debugfs_mknod(): get rid useless arguments
    fold debugfs_link() into caller
    debugfs: kill __create_file()
    debugfs: split the beginning and the end of __create_file() off
    debugfs_{mkdir,create,link}(): get rid of redundant argument

    Linus Torvalds
     
  • Pull misc VFS updates from Al Viro:
    "This cycle a lot of stuff sits on topical branches, so I'll be sending
    more or less one pull request per branch.

    This is the first pile; more to follow in a few. In this one are
    several misc commits from early in the cycle (before I went for
    separate branches), plus the rework of mntput/dput ordering on umount,
    switching to use of fs_pin instead of convoluted games in
    namespace_unlock()"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    switch the IO-triggering parts of umount to fs_pin
    new fs_pin killing logics
    allow attaching fs_pin to a group not associated with some superblock
    get rid of the second argument of acct_kill()
    take count and rcu_head out of fs_pin
    dcache: let the dentry count go down to zero without taking d_lock
    pull bumping refcount into ->kill()
    kill pin_put()
    mode_t whack-a-mole: chelsio
    file->f_path.dentry is pinned down for as long as the file is open...
    get rid of lustre_dump_dentry()
    gut proc_register() a bit
    kill d_validate()
    ncpfs: get rid of d_validate() nonsense
    selinuxfs: don't open-code d_genocide()

    Linus Torvalds
     
  • Merge yet more updates from Andrew Morton:

    - a pile of minor fs fixes and cleanups

    - kexec updates

    - random misc fixes in various places: vmcore, rbtree, eventfd, ipc, seccomp.

    - a series of python-based kgdb helper scripts

    * emailed patches from Andrew Morton : (58 commits)
    seccomp: cap SECCOMP_RET_ERRNO data to MAX_ERRNO
    samples/seccomp: improve label helper
    ipc,sem: use current->state helpers
    scripts/gdb: disable pagination while printing from breakpoint handler
    scripts/gdb: define maintainer
    scripts/gdb: convert CpuList to generator function
    scripts/gdb: convert ModuleList to generator function
    scripts/gdb: use a generator instead of iterator for task list
    scripts/gdb: ignore byte-compiled python files
    scripts/gdb: port to python3 / gdb7.7
    scripts/gdb: add basic documentation
    scripts/gdb: add lx-lsmod command
    scripts/gdb: add class to iterate over CPU masks
    scripts/gdb: add lx_current convenience function
    scripts/gdb: add internal helper and convenience function for per-cpu lookup
    scripts/gdb: add get_gdbserver_type helper
    scripts/gdb: add internal helper and convenience function to retrieve thread_info
    scripts/gdb: add is_target_arch helper
    scripts/gdb: add helper and convenience function to look up tasks
    scripts/gdb: add task iteration class
    ...

    Linus Torvalds
     
  • The value resulting from the SECCOMP_RET_DATA mask could exceed MAX_ERRNO
    when setting errno during a SECCOMP_RET_ERRNO filter action. This makes
    sure we have a reliable value being set, so that an invalid errno will not
    be ignored by userspace.

    Signed-off-by: Kees Cook
    Reported-by: Dmitry V. Levin
    Cc: Andy Lutomirski
    Cc: Will Drewry
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     
  • Fixes a potential corruption with uninitialized stack memory in the
    seccomp BPF sample program.

    [akpm@linux-foundation.org: coding-style fixlet]
    Signed-off-by: Kees Cook
    Reported-by: Robert Swiecki
    Tested-by: Robert Swiecki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     
  • Call __set_current_state() instead of assigning the new state directly.
    These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP environments, keeping
    track of who changed the state.

    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davidlohr Bueso
     
  • While reporting the (refreshed) list of modules on automatic updates we
    may hit the page boundary of the output console and cause a stop if
    pagination is enabled. However, gdb does not accept user input while
    running over the breakpoint handler. So we get stuck, and the user is
    forced to interrupt gdb.

    Resolve this by disabling pagination during automatic symbol updates. We
    restore the user's configuration once done.

    Signed-off-by: Jan Kiszka
    Cc: Thomas Gleixner
    Cc: Jason Wessel
    Cc: Andi Kleen
    Cc: Ben Widawsky
    Cc: Borislav Petkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kiszka
     
  • I'm proposing myself for keeping an eye on these scripts and integrating
    contributions.

    Signed-off-by: Jan Kiszka
    Cc: Thomas Gleixner
    Cc: Jason Wessel
    Cc: Andi Kleen
    Cc: Ben Widawsky
    Cc: Borislav Petkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kiszka
     
  • Yet another code simplification.

    Signed-off-by: Jan Kiszka
    Cc: Thomas Gleixner
    Cc: Jason Wessel
    Cc: Andi Kleen
    Cc: Ben Widawsky
    Cc: Borislav Petkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kiszka
     
  • Analogously to the task list, convert the module list to a generator
    function. It noticeably simplifies the code.

    Signed-off-by: Jan Kiszka
    Cc: Thomas Gleixner
    Cc: Jason Wessel
    Cc: Andi Kleen
    Cc: Ben Widawsky
    Cc: Borislav Petkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kiszka
     
  • The iterator does not return any task_struct from the thread_group list
    because the first condition in the 'if not t or ...' will only be the
    first time None.

    Instead of keeping track of the state ourself in the next() function, we
    fall back using Python's generator.

    Signed-off-by: Daniel Wagner
    Signed-off-by: Jan Kiszka
    Cc: Thomas Gleixner
    Cc: Jason Wessel
    Cc: Andi Kleen
    Cc: Ben Widawsky
    Cc: Borislav Petkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Wagner
     
  • Using the gdb scripts leaves byte-compiled python files in the scripts/
    directory. These should be ignored by git.

    [jan.kiszka@siemens.com: drop redundant mrproper rule as suggested by Michal]
    Signed-off-by: Daniel Thompson
    Signed-off-by: Jan Kiszka
    Cc: Michal Marek
    Cc: Thomas Gleixner
    Cc: Jason Wessel
    Cc: Andi Kleen
    Cc: Ben Widawsky
    Cc: Borislav Petkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Thompson
     
  • I tried to use these scripts in an ubuntu 14.04 host (gdb 7.7 compiled
    against python 3.3) but there were several errors.

    I believe this patch fixes these issues so that the commands now work (I
    tested lx-symbols, lx-dmesg, lx-lsmod).

    Main issues that needed to be resolved:

    * In python 2 iterators have a "next()" method. In python 3 it is
    __next__() instead (so let's just add both).

    * In older python versions there was an implicit conversion
    in object.__format__() (used when an object is in string.format())
    where it was converting the object to str first and then
    calling str's __format__(). This has now been removed so
    we must explicitly convert to str the objects for which
    we need to keep this behavior.

    * In dmesg.py: in python 3 log_buf is now a "memoryview" object
    which needs to be converted to a string in order to use string
    methods like "splitlines()". Luckily memoryview exists in
    python 2.7.6 as well, so we can convert log_buf to memoryview
    and use the same code in both python 2 and python 3.

    This version of the patch has now been tested with gdb 7.7 and both python
    3.4 and python 2.7.6 (I think asking for at least python 2.7.6 is a
    reasonable requirement instead of complicating the code with version
    checks etc).

    Signed-off-by: Pantelis Koukousoulas
    Signed-off-by: Jan Kiszka
    Cc: Thomas Gleixner
    Cc: Jason Wessel
    Cc: Andi Kleen
    Cc: Ben Widawsky
    Cc: Borislav Petkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pantelis Koukousoulas
     
  • Signed-off-by: Jan Kiszka
    Cc: Rob Landley
    Cc: Thomas Gleixner
    Cc: Jason Wessel
    Cc: Andi Kleen
    Cc: Ben Widawsky
    Cc: Borislav Petkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kiszka