1. 16 May, 2019 20 commits
    • David Howells's avatar
      afs: Make vnode->cb_interest RCU safe · f642404a
      David Howells authored
      Use RCU-based freeing for afs_cb_interest struct objects and use RCU on
      vnode->cb_interest.  Use that change to allow afs_check_validity() to use
      read_seqbegin_or_lock() instead of read_seqlock_excl().
      
      This also requires the caller of afs_check_validity() to hold the RCU read
      lock across the call.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      f642404a
    • David Howells's avatar
      afs: Split afs_validate() so first part can be used under LOOKUP_RCU · c925bd0a
      David Howells authored
      Split afs_validate() so that the part that decides if the vnode is still
      valid can be used under LOOKUP_RCU conditions from afs_d_revalidate().
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      c925bd0a
    • David Howells's avatar
      afs: Don't save callback version and type fields · 7c712458
      David Howells authored
      Don't save callback version and type fields as the version is about the
      format of the callback information and the type is relative to the
      particular RPC call.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      7c712458
    • David Howells's avatar
      afs: Fix application of status and callback to be under same lock · a58823ac
      David Howells authored
      When applying the status and callback in the response of an operation,
      apply them in the same critical section so that there's no race between
      checking the callback state and checking status-dependent state (such as
      the data version).
      
      Fix this by:
      
       (1) Allocating a joint {status,callback} record (afs_status_cb) before
           calling the RPC function for each vnode for which the RPC reply
           contains a status or a status plus a callback.  A flag is set in the
           record to indicate if a callback was actually received.
      
       (2) These records are passed into the RPC functions to be filled in.  The
           afs_decode_status() and yfs_decode_status() functions are removed and
           the cb_lock is no longer taken.
      
       (3) xdr_decode_AFSFetchStatus() and xdr_decode_YFSFetchStatus() no longer
           update the vnode.
      
       (4) xdr_decode_AFSCallBack() and xdr_decode_YFSCallBack() no longer update
           the vnode.
      
       (5) vnodes, expected data-version numbers and callback break counters
           (cb_break) no longer need to be passed to the reply delivery
           functions.
      
           Note that, for the moment, the file locking functions still need
           access to both the call and the vnode at the same time.
      
       (6) afs_vnode_commit_status() is now given the cb_break value and the
           expected data_version and the task of applying the status and the
           callback to the vnode are now done here.
      
           This is done under a single taking of vnode->cb_lock.
      
       (7) afs_pages_written_back() is now called by afs_store_data() rather than
           by the reply delivery function.
      
           afs_pages_written_back() has been moved to before the call point and
           is now given the first and last page numbers rather than a pointer to
           the call.
      
       (8) The indicator from YFS.RemoveFile2 as to whether the target file
           actually got removed (status.abort_code == VNOVNODE) rather than
           merely dropping a link is now checked in afs_unlink rather than in
           xdr_decode_YFSFetchStatus().
      
      Supplementary fixes:
      
       (*) afs_cache_permit() now gets the caller_access mask from the
           afs_status_cb object rather than picking it out of the vnode's status
           record.  afs_fetch_status() returns caller_access through its argument
           list for this purpose also.
      
       (*) afs_inode_init_from_status() now uses a write lock on cb_lock rather
           than a read lock and now sets the callback inside the same critical
           section.
      
      Fixes: c435ee34 ("afs: Overhaul the callback handling")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      a58823ac
    • David Howells's avatar
      afs: Always get the reply time · 4571577f
      David Howells authored
      Always ask for the reply time from AF_RXRPC as it's used to calculate the
      callback expiry time and lock expiry times, so it's needed by most FS
      operations.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      4571577f
    • David Howells's avatar
      afs: Fix order-1 allocation in afs_do_lookup() · 87182759
      David Howells authored
      afs_do_lookup() will do an order-1 allocation to allocate status records if
      there are more than 39 vnodes to stat.
      
      Fix this by allocating an array of {status,callback} records for each vnode
      we want to examine using vmalloc() if larger than a page.
      
      This not only gets rid of the order-1 allocation, but makes it easier to
      grow beyond 50 records for YFS servers.  It also allows us to move to
      {status,callback} tuples for other calls too and makes it easier to lock
      across the application of the status and the callback to the vnode.
      
      Fixes: 5cf9dd55 ("afs: Prospectively look up extra files when doing a single lookup")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      87182759
    • David Howells's avatar
      afs: Get rid of afs_call::reply[] · ffba718e
      David Howells authored
      Replace the afs_call::reply[] array with a bunch of typed members so that
      the compiler can use type-checking on them.  It's also easier for the eye
      to see what's going on.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      ffba718e
    • David Howells's avatar
      afs: Don't pass the vnode pointer through into the inline bulk status op · fefb2483
      David Howells authored
      Don't pass the vnode pointer through into the inline bulk status op.  We
      want to process the status records outside of it anyway.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      fefb2483
    • David Howells's avatar
      afs: Fix double inc of vnode->cb_break · fd711586
      David Howells authored
      When __afs_break_callback() clears the CB_PROMISED flag, it increments
      vnode->cb_break to trigger a future refetch of the status and callback -
      however it also calls afs_clear_permits(), which also increments
      vnode->cb_break.
      
      Fix this by removing the increment from afs_clear_permits().
      
      Whilst we're at it, fix the conditional call to afs_put_permits() as the
      function checks to see if the argument is NULL, so the check is redundant.
      
      Fixes: be080a6f ("afs: Overhaul permit caching");
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      fd711586
    • David Howells's avatar
      afs: Fix lock-wait/callback-break double locking · c7226e40
      David Howells authored
      __afs_break_callback() holds vnode->lock around its call of
      afs_lock_may_be_available() - which also takes that lock.
      
      Fix this by not taking the lock in __afs_break_callback().
      
      Also, there's no point checking the granted_locks and pending_locks queues;
      it's sufficient to check lock_state, so move that check out of
      afs_lock_may_be_available() into __afs_break_callback() to replace the
      queue checks.
      
      Fixes: e8d6c554 ("AFS: implement file locking")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      c7226e40
    • David Howells's avatar
      afs: Don't invalidate callback if AFS_VNODE_DIR_VALID not set · d9052dda
      David Howells authored
      Don't invalidate the callback promise on a directory if the
      AFS_VNODE_DIR_VALID flag is not set (which indicates that the directory
      contents are invalid, due to edit failure, callback break, page reclaim).
      
      The directory will be reloaded next time the directory is accessed, so
      clearing the callback flag at this point may race with a reload of the
      directory and cancel it's recorded callback promise.
      
      Fixes: f3ddee8d ("afs: Fix directory handling")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      d9052dda
    • David Howells's avatar
      afs: Fix calculation of callback expiry time · 78107055
      David Howells authored
      Fix the calculation of the expiry time of a callback promise, as obtained
      from operations like FS.FetchStatus and FS.FetchData.
      
      The time should be based on the timestamp of the first DATA packet in the
      reply and the calculation needs to turn the ktime_t timestamp into a
      time64_t.
      
      Fixes: c435ee34 ("afs: Overhaul the callback handling")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      78107055
    • David Howells's avatar
      afs: Make dynamic root population wait uninterruptibly for proc_cells_lock · 3b05e528
      David Howells authored
      Make dynamic root population wait uninterruptibly for proc_cells_lock.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      3b05e528
    • David Howells's avatar
      afs: Make some RPC operations non-interruptible · 20b8391f
      David Howells authored
      Make certain RPC operations non-interruptible, including:
      
       (*) Set attributes
       (*) Store data
      
           We don't want to get interrupted during a flush on close, flush on
           unlock, writeback or an inode update, leaving us in a state where we
           still need to do the writeback or update.
      
       (*) Extend lock
       (*) Release lock
      
           We don't want to get lock extension interrupted as the file locks on
           the server are time-limited.  Interruption during lock release is less
           of an issue since the lock is time-limited, but it's better to
           complete the release to avoid a several-minute wait to recover it.
      
           *Setting* the lock isn't a problem if it's interrupted since we can
            just return to the user and tell them they were interrupted - at
            which point they can elect to retry.
      
       (*) Silly unlink
      
           We want to remove silly unlink files if we can, rather than leaving
           them for the salvager to clear up.
      
      Note that whilst these calls are no longer interruptible, they do have
      timeouts on them, so if the server stops responding the call will fail with
      something like ETIME or ECONNRESET.
      
      Without this, the following:
      
      	kAFS: Unexpected error from FS.StoreData -512
      
      appears in dmesg when a pending store data gets interrupted and some
      processes may just hang.
      
      Additionally, make the code that checks/updates the server record ignore
      failure due to interruption if the main call is uninterruptible and if the
      server has an address list.  The next op will check it again since the
      expiration time on the old list has past.
      
      Fixes: d2ddc776 ("afs: Overhaul volume and server record caching and fileserver rotation")
      Reported-by: default avatarJonathan Billings <jsbillings@jsbillings.org>
      Reported-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      20b8391f
    • David Howells's avatar
      rxrpc: Allow the kernel to mark a call as being non-interruptible · b960a34b
      David Howells authored
      Allow kernel services using AF_RXRPC to indicate that a call should be
      non-interruptible.  This allows kafs to make things like lock-extension and
      writeback data storage calls non-interruptible.
      
      If this is set, signals will be ignored for operations on that call where
      possible - such as waiting to get a call channel on an rxrpc connection.
      
      It doesn't prevent UDP sendmsg from being interrupted, but that will be
      handled by packet retransmission.
      
      rxrpc_kernel_recv_data() isn't affected by this since that never waits,
      preferring instead to return -EAGAIN and leave the waiting to the caller.
      
      Userspace initiated calls can't be set to be uninterruptible at this time.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      b960a34b
    • David Howells's avatar
      afs: Fix error propagation from server record check/update · 0ab4c959
      David Howells authored
      afs_check/update_server_record() should be setting fc->error rather than
      fc->ac.error as they're called from within the cursor iteration function.
      
      afs_fs_cursor::error is where the error code of the attempt to call the
      operation on multiple servers is integrated and is the final result,
      whereas afs_addr_cursor::error is used to hold the error from individual
      iterations of the call loop.  (Note there's also an afs_vl_cursor which
      also wraps afs_addr_cursor for accessing VL servers rather than file
      servers).
      
      Fix this by setting fc->error in the afs_check/update_server_record() so
      that any error incurred whilst talking to the VL server correctly
      propagates to the final result.
      
      This results in:
      
      	kAFS: Unexpected error from FS.StoreData -512
      
      being seen, even though the store-data op is non-interruptible.  The error
      is actually coming from the server record update getting interrupted.
      
      Fixes: d2ddc776 ("afs: Overhaul volume and server record caching and fileserver rotation")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      0ab4c959
    • David Howells's avatar
      afs: Fix the maximum lifespan of VL and probe calls · 94f699c9
      David Howells authored
      If an older AFS server doesn't support an operation, it may accept the call
      and then sit on it forever, happily responding to pings that make kafs
      think that the call is still alive.
      
      Fix this by setting the maximum lifespan of Volume Location service calls
      in particular and probe calls in general so that they don't run on
      endlessly if they're not supported.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      94f699c9
    • David Howells's avatar
      rxrpc: Provide kernel interface to set max lifespan on a call · bbd172e3
      David Howells authored
      Provide an interface to set max lifespan on a call from inside of the
      kernel without having to call kernel_sendmsg().
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      bbd172e3
    • David Howells's avatar
      afs: Fix "kAFS: AFS vnode with undefined type 0" · 51eba999
      David Howells authored
      Under some circumstances afs_select_fileserver() can return without setting
      an error in fc->error.  The problem is in the no_more_servers segment where
      the accumulated errors from attempts to contact various servers are
      integrated into an afs_error-type variable 'e'.  The resultant error code
      is, however, then abandoned.
      
      Fix this by getting the error out of e.error and putting it in 'error' so
      that the next part will store it into fc->error.
      
      Not doing this causes a report like the following:
      
          kAFS: AFS vnode with undefined type 0
          kAFS: A=0 m=0 s=0 v=0
          kAFS: vnode 20000025:1:1
      
      because the code following the server selection loop then sees what it
      thinks is a successful invocation because fc.error is 0.  However, it can't
      apply the status record because it's all zeros.
      
      The report is followed on the first instance with a trace looking something
      like:
      
           dump_stack+0x67/0x8e
           afs_inode_init_from_status.isra.2+0x21b/0x487
           afs_fetch_status+0x119/0x1df
           afs_iget+0x130/0x295
           afs_get_tree+0x31d/0x595
           vfs_get_tree+0x1f/0xe8
           fc_mount+0xe/0x36
           afs_d_automount+0x328/0x3c3
           follow_managed+0x109/0x20a
           lookup_fast+0x3bf/0x3f8
           do_last+0xc3/0x6a4
           path_openat+0x1af/0x236
           do_filp_open+0x51/0xae
           ? _raw_spin_unlock+0x24/0x2d
           ? __alloc_fd+0x1a5/0x1b7
           do_sys_open+0x13b/0x1e8
           do_syscall_64+0x7d/0x1b3
           entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Fixes: 4584ae96 ("afs: Fix missing net error handling")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      51eba999
    • David Howells's avatar
      afs: Fix cell DNS lookup · d5c32c89
      David Howells authored
      Currently, once configured, AFS cells are looked up in the DNS at regular
      intervals - which is a waste of resources if those cells aren't being
      used.  It also leads to a problem where cells preloaded, but not
      configured, before the network is brought up end up effectively statically
      configured with no VL servers and are unable to get any.
      
      Fix this by not doing the DNS lookup until the first time a cell is
      touched.  It is waited for if we don't have any cached records yet,
      otherwise the DNS lookup to maintain the record is done in the background.
      
      This has the downside that the first time you touch a cell, you now have to
      wait for the upcall to do the required DNS lookups rather than them already
      being cached.
      
      Further, the record is not replaced if the old record has at least one
      server in it and the new record doesn't have any.
      
      Fixes: 0a5143f2 ("afs: Implement VL server rotation")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      d5c32c89
  2. 15 May, 2019 7 commits
  3. 08 May, 2019 13 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next · 80f23212
      Linus Torvalds authored
      Pull networking updates from David Miller:
       "Highlights:
      
         1) Support AES128-CCM ciphers in kTLS, from Vakul Garg.
      
         2) Add fib_sync_mem to control the amount of dirty memory we allow to
            queue up between synchronize RCU calls, from David Ahern.
      
         3) Make flow classifier more lockless, from Vlad Buslov.
      
         4) Add PHY downshift support to aquantia driver, from Heiner
            Kallweit.
      
         5) Add SKB cache for TCP rx and tx, from Eric Dumazet. This reduces
            contention on SLAB spinlocks in heavy RPC workloads.
      
         6) Partial GSO offload support in XFRM, from Boris Pismenny.
      
         7) Add fast link down support to ethtool, from Heiner Kallweit.
      
         8) Use siphash for IP ID generator, from Eric Dumazet.
      
         9) Pull nexthops even further out from ipv4/ipv6 routes and FIB
            entries, from David Ahern.
      
        10) Move skb->xmit_more into a per-cpu variable, from Florian
            Westphal.
      
        11) Improve eBPF verifier speed and increase maximum program size,
            from Alexei Starovoitov.
      
        12) Eliminate per-bucket spinlocks in rhashtable, and instead use bit
            spinlocks. From Neil Brown.
      
        13) Allow tunneling with GUE encap in ipvs, from Jacky Hu.
      
        14) Improve link partner cap detection in generic PHY code, from
            Heiner Kallweit.
      
        15) Add layer 2 encap support to bpf_skb_adjust_room(), from Alan
            Maguire.
      
        16) Remove SKB list implementation assumptions in SCTP, your's truly.
      
        17) Various cleanups, optimizations, and simplifications in r8169
            driver. From Heiner Kallweit.
      
        18) Add memory accounting on TX and RX path of SCTP, from Xin Long.
      
        19) Switch PHY drivers over to use dynamic featue detection, from
            Heiner Kallweit.
      
        20) Support flow steering without masking in dpaa2-eth, from Ioana
            Ciocoi.
      
        21) Implement ndo_get_devlink_port in netdevsim driver, from Jiri
            Pirko.
      
        22) Increase the strict parsing of current and future netlink
            attributes, also export such policies to userspace. From Johannes
            Berg.
      
        23) Allow DSA tag drivers to be modular, from Andrew Lunn.
      
        24) Remove legacy DSA probing support, also from Andrew Lunn.
      
        25) Allow ll_temac driver to be used on non-x86 platforms, from Esben
            Haabendal.
      
        26) Add a generic tracepoint for TX queue timeouts to ease debugging,
            from Cong Wang.
      
        27) More indirect call optimizations, from Paolo Abeni"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1763 commits)
        cxgb4: Fix error path in cxgb4_init_module
        net: phy: improve pause mode reporting in phy_print_status
        dt-bindings: net: Fix a typo in the phy-mode list for ethernet bindings
        net: macb: Change interrupt and napi enable order in open
        net: ll_temac: Improve error message on error IRQ
        net/sched: remove block pointer from common offload structure
        net: ethernet: support of_get_mac_address new ERR_PTR error
        net: usb: smsc: fix warning reported by kbuild test robot
        staging: octeon-ethernet: Fix of_get_mac_address ERR_PTR check
        net: dsa: support of_get_mac_address new ERR_PTR error
        net: dsa: sja1105: Fix status initialization in sja1105_get_ethtool_stats
        vrf: sit mtu should not be updated when vrf netdev is the link
        net: dsa: Fix error cleanup path in dsa_init_module
        l2tp: Fix possible NULL pointer dereference
        taprio: add null check on sched_nest to avoid potential null pointer dereference
        net: mvpp2: cls: fix less than zero check on a u32 variable
        net_sched: sch_fq: handle non connected flows
        net_sched: sch_fq: do not assume EDT packets are ordered
        net: hns3: use devm_kcalloc when allocating desc_cb
        net: hns3: some cleanup for struct hns3_enet_ring
        ...
      80f23212
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 82efe439
      Linus Torvalds authored
      Pull Devicetree updates from Rob Herring:
      
       - Fix possible memory leak in reserved-memory failure case
      
       - Support for DMA parent bus which are not a parent node
      
       - Clang -Wunsequenced fix
      
       - Remove some unnecessary prints on memory alloc failures
      
       - Various printk msg and comment fixes
      
       - Update DT schema tools repository location
      
       - Convert simple-framebuffer binding to DT schema
      
       - Bindings for isl68137 and ir38064 trivial devices
      
       - New documentation on binding do's and don't's for binding writers to
         ignore
      
      * tag 'devicetree-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (22 commits)
        of: unittest: Remove error printing on OOM
        of: irq: Remove WARN_ON() for kzalloc() failure
        dt-bindings: pinctrl: fix bias-pull,up typo
        dt-bindings: Update schema project location to devicetree.org github group
        of: fix clang -Wunsequenced for be32_to_cpu()
        of/device.c: fix the wrong comments
        dt-bindings: Add isl68137 as a trivial device
        dt-bindings: Add ir38064 as a trivial device
        of: del redundant type conversion
        dt-bindings: mfd: axp20x: Add fallback for axp805
        of: Improve of_phandle_iterator_next() error message
        dt-bindings: connector: Spelling mistake
        dt-bindings: Add schemas for simple-framebuffer
        of: address: Add support for the parent DMA bus
        of: address: Retrieve a parent through a callback in __of_translate_address
        dt-bindings: bus: Add binding for the Allwinner MBUS controller
        dt-bindings: interconnect: Add a dma interconnect name
        of: use correct function prototype for of_overlay_fdt_apply()
        of: reserved_mem: fix reserve memory leak
        of: property: Document that of_graph_get_endpoint_by_regs needs of_node_put
        ...
      82efe439
    • Linus Torvalds's avatar
      Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random · dd5001e2
      Linus Torvalds authored
      Pull randomness updates from Ted Ts'o:
      
       - initialize the random driver earler
      
       - fix CRNG initialization when we trust the CPU's RNG on NUMA systems
      
       - other miscellaneous cleanups and fixes.
      
      * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
        random: add a spinlock_t to struct batched_entropy
        random: document get_random_int() family
        random: fix CRNG initialization when random.trust_cpu=1
        random: move rand_initialize() earlier
        random: only read from /dev/random after its pool has received 128 bits
        drivers/char/random.c: make primary_crng static
        drivers/char/random.c: remove unused stuct poolinfo::poolbits
        drivers/char/random.c: constify poolinfo_table
      dd5001e2
    • Linus Torvalds's avatar
      Merge tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt · a9fbcd67
      Linus Torvalds authored
      Pull fscrypt updates from Ted Ts'o:
       "Clean up fscrypt's dcache revalidation support, and other
        miscellaneous cleanups"
      
      * tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt:
        fscrypt: cache decrypted symlink target in ->i_link
        vfs: use READ_ONCE() to access ->i_link
        fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext
        fscrypt: only set dentry_operations on ciphertext dentries
        fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directory
        fscrypt: fix race allowing rename() and link() of ciphertext dentries
        fscrypt: clean up and improve dentry revalidation
        fscrypt: use READ_ONCE() to access ->i_crypt_info
        fscrypt: remove WARN_ON_ONCE() when decryption fails
        fscrypt: drop inode argument from fscrypt_get_ctx()
      a9fbcd67
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 5abe3795
      Linus Torvalds authored
      Pull ext4 updates from Ted Ts'o:
       "Add as a feature case-insensitive directories (the casefold feature)
        using Unicode 12.1.
      
        Also, the usual largish number of cleanups and bug fixes"
      
      * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (25 commits)
        ext4: export /sys/fs/ext4/feature/casefold if Unicode support is present
        ext4: fix ext4_show_options for file systems w/o journal
        unicode: refactor the rule for regenerating utf8data.h
        docs: ext4.rst: document case-insensitive directories
        ext4: Support case-insensitive file name lookups
        ext4: include charset encoding information in the superblock
        MAINTAINERS: add Unicode subsystem entry
        unicode: update unicode database unicode version 12.1.0
        unicode: introduce test module for normalized utf8 implementation
        unicode: implement higher level API for string handling
        unicode: reduce the size of utf8data[]
        unicode: introduce code for UTF-8 normalization
        unicode: introduce UTF-8 character database
        ext4: actually request zeroing of inode table after grow
        ext4: cond_resched in work-heavy group loops
        ext4: fix use-after-free race with debug_want_extra_isize
        ext4: avoid drop reference to iloc.bh twice
        ext4: ignore e_value_offs for xattrs with value-in-ea-inode
        ext4: protect journal inode's blocks using block_validity
        ext4: use BUG() instead of BUG_ON(1)
        ...
      5abe3795
    • Linus Torvalds's avatar
      Merge tag 'afs-next-20190507' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs · e5fef2a9
      Linus Torvalds authored
      Pull AFS updates from David Howells:
       "A set of fix and development patches for AFS for 5.2.
      
        Summary:
      
         - Fix the AFS file locking so that sqlite can run on an AFS mount and
           also so that firefox and gnome can use a homedir that's mounted
           through AFS.
      
           This required emulation of fine-grained locking when the server
           will only support whole-file locks and no upgrade/downgrade. Four
           modes are provided, settable by mount parameter:
      
             "flock=local"   - No reference to the server
      
             "flock=openafs" - Fine-grained locks are local-only, whole-file
                               locks require sufficient server locks
      
             "flock=strict"  - All locks require sufficient server locks
      
             "flock=write"   - Always get an exclusive server lock
      
           If the volume is a read-only or backup volume, then flock=local for
           that volume.
      
         - Log extra information for a couple of cases where the client mucks
           up somehow: AFS vnode with undefined type and dir check failure -
           in both cases we seem to end up with unfilled data, but the issues
           happen infrequently and are difficult to reproduce at will.
      
         - Implement silly rename for unlink() and rename().
      
         - Set i_blocks so that du can get some information about usage.
      
         - Fix xattr handlers to return the right amount of data and to not
           overflow buffers.
      
         - Implement getting/setting raw AFS and YFS ACLs as xattrs"
      
      * tag 'afs-next-20190507' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        afs: Implement YFS ACL setting
        afs: Get YFS ACLs and information through xattrs
        afs: implement acl setting
        afs: Get an AFS3 ACL as an xattr
        afs: Fix getting the afs.fid xattr
        afs: Fix the afs.cell and afs.volume xattr handlers
        afs: Calculate i_blocks based on file size
        afs: Log more information for "kAFS: AFS vnode with undefined type\n"
        afs: Provide mount-time configurable byte-range file locking emulation
        afs: Add more tracepoints
        afs: Implement sillyrename for unlink and rename
        afs: Add directory reload tracepoint
        afs: Handle lock rpc ops failing on a file that got deleted
        afs: Improve dir check failure reports
        afs: Add file locking tracepoints
        afs: Further fix file locking
        afs: Fix AFS file locking to allow fine grained locks
        afs: Calculate lock extend timer from set/extend reply reception
        afs: Split wait from afs_make_call()
      e5fef2a9
    • Linus Torvalds's avatar
      Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 149e703c
      Linus Torvalds authored
      Pull misc vfs updates from Al Viro:
       "Assorted stuff, with no common topic whatsoever..."
      
      * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        libfs: document simple_get_link()
        Documentation/filesystems/Locking: fix ->get_link() prototype
        Documentation/filesystems/vfs.txt: document how ->i_link works
        Documentation/filesystems/vfs.txt: remove bogus "Last updated" date
        fs: use timespec64 in relatime_need_update
        fs/block_dev.c: remove unused include
      149e703c
    • Linus Torvalds's avatar
      Merge branch 'work.file' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · d897166d
      Linus Torvalds authored
      Pull vfs 'struct file' related updates from Al Viro:
       "A bit more of 'this fget() would be better off as fdget()'
        whack-a-mole + a couple of ->f_count-related cleanups"
      
      * 'work.file' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        media: switch to fdget()
        drm_syncobj: switch to fdget()
        amdgpu: switch to fdget()
        don't open-code file_count()
        fs: drop unused fput_atomic definition
      d897166d
    • Linus Torvalds's avatar
      Merge branch 'work.mount-syscalls' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 40091325
      Linus Torvalds authored
      Pull mount ABI updates from Al Viro:
       "The syscalls themselves, finally.
      
        That's not all there is to that stuff, but switching individual
        filesystems to new methods is fortunately independent from everything
        else, so e.g. NFS series can go through NFS tree, etc.
      
        As those conversions get done, we'll be finally able to get rid of a
        bunch of duplication in fs/super.c introduced in the beginning of the
        entire thing. I expect that to be finished in the next window..."
      
      * 'work.mount-syscalls' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        vfs: Add a sample program for the new mount API
        vfs: syscall: Add fspick() to select a superblock for reconfiguration
        vfs: syscall: Add fsmount() to create a mount for a superblock
        vfs: syscall: Add fsconfig() for configuring and managing a context
        vfs: Implement logging through fs_context
        vfs: syscall: Add fsopen() to prepare for superblock creation
        Make anon_inodes unconditional
        teach move_mount(2) to work with OPEN_TREE_CLONE
        vfs: syscall: Add move_mount(2) to move mounts around
        vfs: syscall: Add open_tree(2) to reference or clone a mount
      40091325
    • Linus Torvalds's avatar
      Merge branch 'work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · d27fb65b
      Linus Torvalds authored
      Pull misc dcache updates from Al Viro:
       "Most of this pile is putting name length into struct name_snapshot and
        making use of it.
      
        The beginning of this series ("ovl_lookup_real_one(): don't bother
        with strlen()") ought to have been split in two (separate switch of
        name_snapshot to struct qstr from overlayfs reaping the trivial
        benefits of that), but I wanted to avoid a rebase - by the time I'd
        spotted that it was (a) in -next and (b) close to 5.1-final ;-/"
      
      * 'work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        audit_compare_dname_path(): switch to const struct qstr *
        audit_update_watch(): switch to const struct qstr *
        inotify_handle_event(): don't bother with strlen()
        fsnotify: switch send_to_group() and ->handle_event to const struct qstr *
        fsnotify(): switch to passing const struct qstr * for file_name
        switch fsnotify_move() to passing const struct qstr * for old_name
        ovl_lookup_real_one(): don't bother with strlen()
        sysv: bury the broken "quietly truncate the long filenames" logics
        nsfs: unobfuscate
        unexport d_alloc_pseudo()
      d27fb65b
    • Linus Torvalds's avatar
      Merge branch 'parisc-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · d3511f53
      Linus Torvalds authored
      Pull parisc updates from Helge Deller:
       "Many great new features, fixes and optimizations, including:
      
         - Convert page table updates to use per-pagetable spinlocks which
           overall improves performance on SMP machines a lot, by Mikulas
           Patocka
      
         - Kernel debugger (KGDB) support, by Sven Schnelle
      
         - KPROBES support, by Sven Schnelle
      
         - Lots of TLB lock/flush improvements, by Dave Anglin
      
         - Drop DISCONTIGMEM and switch to SPARSEMEM
      
         - Added JUMP_LABEL, branch runtime-patching support
      
         - Lots of other small speedups and cleanups, e.g. for QEMU, stack
           randomization, avoidance of name clashes, documentation updates,
           etc ..."
      
      * 'parisc-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: (28 commits)
        parisc: Add static branch and JUMP_LABEL feature
        parisc: Use PA_ASM_LEVEL in boot code
        parisc: Rename LEVEL to PA_ASM_LEVEL to avoid name clash with DRBD code
        parisc: Update huge TLB page support to use per-pagetable spinlock
        parisc: Use per-pagetable spinlock
        parisc: Allow live-patching of __meminit functions
        parisc: Add memory barrier to asm pdc and sync instructions
        parisc: Add memory clobber to TLB purges
        parisc: Use ldcw instruction for SMP spinlock release barrier
        parisc: Remove lock code to serialize TLB operations in pacache.S
        parisc: Switch from DISCONTIGMEM to SPARSEMEM
        parisc: enable wide mode early
        parisc: update feature lists
        parisc: Show n/a if product number not available
        parisc: remove unused flags parameter in __patch_text()
        doc: update kprobes supported architecture list
        parisc: Implement kretprobes
        parisc: remove kprobes.h from generic-y
        parisc: Implement kprobes
        parisc: add functions required by KPROBE_EVENTS
        ...
      d3511f53
    • Linus Torvalds's avatar
      Merge tag 'audit-pr-20190507' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit · 02aff8db
      Linus Torvalds authored
      Pull audit updates from Paul Moore:
       "We've got a reasonably broad set of audit patches for the v5.2 merge
        window, the highlights are below:
      
         - The biggest change, and the source of all the arch/* changes, is
           the patchset from Dmitry to help enable some of the work he is
           doing around PTRACE_GET_SYSCALL_INFO.
      
           To be honest, including this in the audit tree is a bit of a
           stretch, but it does help move audit a little further along towards
           proper syscall auditing for all arches, and everyone else seemed to
           agree that audit was a "good" spot for this to land (or maybe they
           just didn't want to merge it? dunno.).
      
         - We can now audit time/NTP adjustments.
      
         - We continue the work to connect associated audit records into a
           single event"
      
      * tag 'audit-pr-20190507' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: (21 commits)
        audit: fix a memory leak bug
        ntp: Audit NTP parameters adjustment
        timekeeping: Audit clock adjustments
        audit: purge unnecessary list_empty calls
        audit: link integrity evm_write_xattrs record to syscall event
        syscall_get_arch: add "struct task_struct *" argument
        unicore32: define syscall_get_arch()
        Move EM_UNICORE to uapi/linux/elf-em.h
        nios2: define syscall_get_arch()
        nds32: define syscall_get_arch()
        Move EM_NDS32 to uapi/linux/elf-em.h
        m68k: define syscall_get_arch()
        hexagon: define syscall_get_arch()
        Move EM_HEXAGON to uapi/linux/elf-em.h
        h8300: define syscall_get_arch()
        c6x: define syscall_get_arch()
        arc: define syscall_get_arch()
        Move EM_ARCOMPACT and EM_ARCV2 to uapi/linux/elf-em.h
        audit: Make audit_log_cap and audit_copy_inode static
        audit: connect LOGIN record to its syscall record
        ...
      02aff8db
    • Linus Torvalds's avatar
      Merge tag 'selinux-pr-20190507' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux · f72dae20
      Linus Torvalds authored
      Pull selinux updates from Paul Moore:
       "We've got a few SELinux patches for the v5.2 merge window, the
        highlights are below:
      
         - Add LSM hooks, and the SELinux implementation, for proper labeling
           of kernfs. While we are only including the SELinux implementation
           here, the rest of the LSM folks have given the hooks a thumbs-up.
      
         - Update the SELinux mdp (Make Dummy Policy) script to actually work
           on a modern system.
      
         - Disallow userspace to change the LSM credentials via
           /proc/self/attr when the task's credentials are already overridden.
      
           The change was made in procfs because all the LSM folks agreed this
           was the Right Thing To Do and duplicating it across each LSM was
           going to be annoying"
      
      * tag 'selinux-pr-20190507' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
        proc: prevent changes to overridden credentials
        selinux: Check address length before reading address family
        kernfs: fix xattr name handling in LSM helpers
        MAINTAINERS: update SELinux file patterns
        selinux: avoid uninitialized variable warning
        selinux: remove useless assignments
        LSM: lsm_hooks.h - fix missing colon in docstring
        selinux: Make selinux_kernfs_init_security static
        kernfs: initialize security of newly created nodes
        selinux: implement the kernfs_init_security hook
        LSM: add new hook for kernfs node initialization
        kernfs: use simple_xattrs for security attributes
        selinux: try security xattr after genfs for kernfs filesystems
        kernfs: do not alloc iattrs in kernfs_xattr_get
        kernfs: clean up struct kernfs_iattrs
        scripts/selinux: fix build
        selinux: use kernel linux/socket.h for genheaders and mdp
        scripts/selinux: modernize mdp
      f72dae20