06 Apr, 2018

11 commits

  • Link: http://lkml.kernel.org/r/1521116681-14602-2-git-send-email-ge.changwei@h3c.com
    Signed-off-by: Changwei Ge
    Cc: Mark Fasheh
    Cc: Joseph Qi
    Cc: Junxiao Bi
    Cc: Joel Becker
    Cc: Changwei Ge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Changwei Ge
     
  • Link: http://lkml.kernel.org/r/1521116681-14602-1-git-send-email-ge.changwei@h3c.com
    Signed-off-by: Changwei Ge
    Cc: Mark Fasheh
    Cc: Joseph Qi
    Cc: Junxiao Bi
    Cc: Joel Becker
    Cc: Changwei Ge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Changwei Ge
     
  • Obviously, the comment before dlm_do_local_recovery_cleanup() has nothing
    to do with it. So remove it.

    Link: http://lkml.kernel.org/r/1519371054-4648-1-git-send-email-ge.changwei@h3c.com
    Signed-off-by: Changwei Ge
    Acked-by: Joseph Qi
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Junxiao Bi
    Cc: Changwei Ge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Changwei Ge
     
  • The two functions are no longer used.

    Link: http://lkml.kernel.org/r/1519609595-26229-1-git-send-email-ge.changwei@h3c.com
    Signed-off-by: Changwei Ge
    Reviewed-by: Andrew Morton
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Junxiao Bi
    Cc: Joseph Qi
    Cc: Changwei Ge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Changwei Ge
     
  • As kmem_cache_destroy() already handles null pointers, so we can remove
    the conditional test entirely.

    Link: http://lkml.kernel.org/r/5A9EB21D.3000209@huawei.com
    Signed-off-by: Jun Piao
    Reviewed-by: Yiwen Jiang
    Reviewed-by: Andrew Morton
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Junxiao Bi
    Cc: Joseph Qi
    Cc: Changwei Ge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    piaojun
     
  • We should not handle migrate lockres if we are already in
    'DLM_CTXT_IN_SHUTDOWN', as that will cause lockres remains after leaving
    dlm domain. At last other nodes will get stuck into infinite loop when
    requsting lock from us.

    The problem is caused by concurrency umount between nodes. Before
    receiveing N1's DLM_BEGIN_EXIT_DOMAIN_MSG, N2 has picked up N1 as the
    migrate target. So N2 will continue sending lockres to N1 even though
    N1 has left domain.

    N1 N2 (owner)
    touch file

    access the file,
    and get pr lock

    begin leave domain and
    pick up N1 as new owner

    begin leave domain and
    migrate all lockres done

    begin migrate lockres to N1

    end leave domain, but
    the lockres left
    unexpectedly, because
    migrate task has passed

    [piaojun@huawei.com: v3]
    Link: http://lkml.kernel.org/r/5A9CBD19.5020107@huawei.com
    Link: http://lkml.kernel.org/r/5A99F028.2090902@huawei.com
    Signed-off-by: Jun Piao
    Reviewed-by: Yiwen Jiang
    Reviewed-by: Joseph Qi
    Reviewed-by: Changwei Ge
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Junxiao Bi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jun Piao
     
  • Keep the trace point consistent with the function name.

    Link: http://lkml.kernel.org/r/02609aba-84b2-a22d-3f3b-bc1944b94260@huawei.com
    Fixes: 3ef045c3d8ae ("ocfs2: switch to ->write_iter()")
    Signed-off-by: Jia Guo
    Reviewed-by: Jun Piao
    Reviewed-by: Yiwen Jiang
    Reviewed-by: Alex Chen
    Acked-by: Gang He
    Acked-by: Joseph Qi
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Junxiao Bi
    Cc: Changwei Ge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jia Guo
     
  • Remove some unused function declarations in dlmcommon.h.

    Link: http://lkml.kernel.org/r/5A7D1034.7050807@huawei.com
    Signed-off-by: Jun Piao
    Reviewed-by: Yiwen Jiang
    Reviewed-by: Changwei Ge
    Reviewed-by: Alex Chen
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Junxiao Bi
    Cc: Joseph Qi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    piaojun
     
  • We could use 'oi' instead of 'OCFS2_I()' to make code more elegant.

    Link: http://lkml.kernel.org/r/5A7020FE.5050906@huawei.com
    Signed-off-by: Jun Piao
    Reviewed-by: Yiwen Jiang
    Reviewed-by: Alex Chen
    Reviewed-by: Andrew Morton
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Junxiao Bi
    Cc: Joseph Qi
    Cc: Changwei Ge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    piaojun
     
  • We could use 'osb' instead of 'OCFS2_SB()' to make code more elegant.

    Link: http://lkml.kernel.org/r/5A702111.7090907@huawei.com
    Signed-off-by: Jun Piao
    Reviewed-by: Yiwen Jiang
    Reviewed-by: Andrew Morton
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Junxiao Bi
    Cc: Joseph Qi
    Cc: Changwei Ge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    piaojun
     
  • This is a fix for a regression in 32 bit kernels caused by an invalid
    check for pgoff overflow in hugetlbfs mmap setup. The check incorrectly
    specified that the size of a loff_t was the same as the size of a long.
    The regression prevents mapping hugetlbfs files at offsets greater than
    4GB on 32 bit kernels.

    On 32 bit kernels conversion from a page based unsigned long can not
    overflow a loff_t byte offset. Therefore, skip this check if
    sizeof(unsigned long) != sizeof(loff_t).

    Link: http://lkml.kernel.org/r/20180330145402.5053-1-mike.kravetz@oracle.com
    Fixes: 63489f8e8211 ("hugetlbfs: check for pgoff value overflow")
    Reported-by: Dan Rue
    Signed-off-by: Mike Kravetz
    Tested-by: Anders Roxell
    Cc: Michal Hocko
    Cc: Yisheng Xie
    Cc: "Kirill A . Shutemov"
    Cc: Nic Losby
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Kravetz
     

05 Apr, 2018

8 commits

  • Pull char/misc updates from Greg KH:
    "Here is the big set of char/misc driver patches for 4.17-rc1.

    There are a lot of little things in here, nothing huge, but all
    important to the different hardware types involved:

    - thunderbolt driver updates

    - parport updates (people still care...)

    - nvmem driver updates

    - mei updates (as always)

    - hwtracing driver updates

    - hyperv driver updates

    - extcon driver updates

    - ... and a handful of even smaller driver subsystem and individual
    driver updates

    All of these have been in linux-next with no reported issues"

    * tag 'char-misc-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (149 commits)
    hwtracing: Add HW tracing support menu
    intel_th: Add ACPI glue layer
    intel_th: Allow forcing host mode through drvdata
    intel_th: Pick up irq number from resources
    intel_th: Don't touch switch routing in host mode
    intel_th: Use correct method of finding hub
    intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate
    stm class: Make dummy's master/channel ranges configurable
    stm class: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate
    MAINTAINERS: Bestow upon myself the care for drivers/hwtracing
    hv: add SPDX license id to Kconfig
    hv: add SPDX license to trace
    Drivers: hv: vmbus: do not mark HV_PCIE as perf_device
    Drivers: hv: vmbus: respect what we get from hv_get_synint_state()
    /dev/mem: Avoid overwriting "err" in read_mem()
    eeprom: at24: use SPDX identifier instead of GPL boiler-plate
    eeprom: at24: simplify the i2c functionality checking
    eeprom: at24: fix a line break
    eeprom: at24: tweak newlines
    eeprom: at24: refactor at24_probe()
    ...

    Linus Torvalds
     
  • Pull tty/serial driver updates from Greg KH:
    "Here is the big set of tty and serial driver patches for 4.17-rc1

    Not all that big really, most are just small fixes and additions to
    existing drivers. There's a bunch of work on the imx serial driver
    recently for some reason, and a new embedded serial driver added as
    well.

    Full details are in the shortlog.

    All of these have been in the linux-next tree for a while with no
    reported issues"

    * tag 'tty-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (66 commits)
    serial: expose buf_overrun count through proc interface
    serial: mvebu-uart: fix tx lost characters
    tty: serial: msm_geni_serial: Fix return value check in qcom_geni_serial_probe()
    tty: serial: msm_geni_serial: Add serial driver support for GENI based QUP
    8250-men-mcb: add support for 16z025 and 16z057
    powerpc: Mark the variable earlycon_acpi_spcr_enable maybe_unused
    serial: stm32: fix initialization of RS485 mode
    ARM: dts: STi: Remove "console=ttyASN" from bootargs for STi boards
    vt: change SGR 21 to follow the standards
    serdev: Fix typo in serdev_device_alloc
    ARM: dts: STi: Fix aliases property name for STi boards
    tty: st-asc: Update tty alias
    serial: stm32: add support for RS485 hardware control mode
    dt-bindings: serial: stm32: add RS485 optional properties
    selftests: add devpts selftests
    devpts: comment devpts_mntget()
    devpts: resolve devpts bind-mounts
    devpts: hoist out check for DEVPTS_SUPER_MAGIC
    serial: 8250: Add Nuvoton NPCM UART
    serial: mxs-auart: disable clks of Alphascale ASM9260
    ...

    Linus Torvalds
     
  • Pull ext4 updates from Ted Ts'o:
    "Cleanups and bugfixes for ext4, including some fixes to make ext4 more
    robust against maliciously crafted file system images.

    (I still don't recommend that container folks hold any delusions that
    mounting arbitary images that can be crafted by malicious attackers
    should be considered sane thing to do, though!)"

    * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (29 commits)
    ext4: force revalidation of directory pointer after seekdir(2)
    ext4: add extra checks to ext4_xattr_block_get()
    ext4: add bounds checking to ext4_xattr_find_entry()
    ext4: move call to ext4_error() into ext4_xattr_check_block()
    ext4: don't show data= option if defaulted
    ext4: omit init_itable=n in procfs when disabled
    ext4: show more binary mount options in procfs
    ext4: simplify kobject usage
    ext4: remove unused parameters in sysfs code
    ext4: null out kobject* during sysfs cleanup
    ext4: don't allow r/w mounts if metadata blocks overlap the superblock
    ext4: always initialize the crc32c checksum driver
    ext4: fail ext4_iget for root directory if unallocated
    ext4: limit xattr size to INT_MAX
    ext4: add validity checks for bitmap block numbers
    ext4: fix comments in ext4_swap_extents()
    ext4: use generic_writepages instead of __writepage/write_cache_pages
    ext4: don't complain about incorrect features when probing
    ext4: remove EXT4_STATE_DIOREAD_LOCK flag
    ext4: fix offset overflow on 32-bit archs in ext4_iomap_begin()
    ...

    Linus Torvalds
     
  • Pull cifs updates from Steve French:
    "Includes SMB3.11 security improvements, as well as various fixes for
    stable and some debugging improvements"

    * tag '4.17-SMB3-Fixes' of git://git.samba.org/sfrench/cifs-2.6:
    cifs: Add minor debug message during negprot
    smb3: Fix root directory when server returns inode number of zero
    cifs: fix sparse warning on previous patch in a few printks
    cifs: add server->vals->header_preamble_size
    cifs: smbd: disconnect transport on RDMA errors
    cifs: smbd: avoid reconnect lockup
    Don't log confusing message on reconnect by default
    Don't log expected error on DFS referral request
    fs: cifs: Replace _free_xid call in cifs_root_iget function
    SMB3.1.1 dialect is no longer experimental
    Tree connect for SMB3.1.1 must be signed for non-encrypted shares
    fix smb3-encryption breakage when CONFIG_DEBUG_SG=y
    CIFS: fix sha512 check in cifs_crypto_secmech_release
    CIFS: implement v3.11 preauth integrity
    CIFS: add sha512 secmech
    CIFS: refactor crypto shash/sdesc allocation&free
    Update README file for cifs.ko
    Update TODO list for cifs.ko
    cifs: fix memory leak in SMB2_open()
    CIFS: SMBD: fix spelling mistake: "faield" and "legnth"

    Linus Torvalds
     
  • Pull gfs2 updates from Bob Peterson:
    "We've only got nine GFS2 patches for this merge window:

    - report journal recovery times more accurately during journal replay
    (Abhi Das)

    - fix fallocate chunk size (Andreas Gruenbacher)

    - correctly dirty inodes during rename (Andreas Gruenbacher)

    - improve the comment for function gfs2_block_map (Andreas
    Gruenbacher)

    - improve kernel trace point iomap end: The physical block address
    was added (Andreas Gruenbacher)

    - fix a nasty file system corruption bug that surfaced in xfstests
    476 in punch-hole/truncate (Andreas Gruenbacher)

    - fix a problem Christoph Helwig pointed out, namely, that GFS2 was
    misusing the IOMAP_ZERO flag. The zeroing of new blocks was moved
    to the proper fallocate code (Andreas Gruenbacher)

    - declare function gfs2_remove_from_ail as static (Bob Peterson)

    - only set PageChecked for jdata page writes (Bob Peterson)"

    * tag 'gfs2-4.17.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
    gfs2: time journal recovery steps accurately
    gfs2: Zero out fallocated blocks in fallocate_chunk
    gfs2: Check for the end of metadata in punch_hole
    gfs2: gfs2_iomap_end tracepoint: log block address
    gfs2: Improve gfs2_block_map comment
    GFS2: Only set PageChecked for jdata pages
    GFS2: Make function gfs2_remove_from_ail static
    gfs2: Dirty source inode during rename
    gfs2: Fix fallocate chunk size

    Linus Torvalds
     
  • Pull btrfs updates from David Sterba:
    "There are a several user visible changes, the rest is mostly invisible
    and continues to clean up the whole code base.

    User visible changes:
    - new mount option nossd_spread (pair for ssd_spread)

    - mount option subvolid will detect junk after the number and fail
    the mount

    - add message after cancelled device replace

    - direct module dependency on libcrc32, removed own crc wrappers

    - removed user space transaction ioctls

    - use lighter locking when reading /proc/self/mounts, RCU instead of
    mutex to avoid unnecessary contention

    Enhancements:
    - skip writeback of last page when truncating file to same size

    - send: do not issue unnecessary truncate operations

    - mount option token specifiers: use %u for unsigned values, more
    validation

    - selftests: more tree block validations

    qgroups:
    - preparatory work for splitting reservation types for data and
    metadata, this should allow for more accurate tracking and fix some
    issues with underflows or do further enhancements

    - split metadata reservations for started and joined transaction so
    they do not get mixed up and are accounted correctly at commit time

    - with the above, it's possible to revert patch that potentially
    deadlocks when trying to make more space by explicitly committing
    when the quota limit is hit

    - fix root item corruption when multiple same source snapshots are
    created with quota enabled

    RAID56:
    - make sure target is identical to source when raid56 rebuild fails
    after dev-replace

    - faster rebuild during scrub, batch by stripes and not
    block-by-block

    - make more use of cached data when rebuilding from a missing device

    Fixes:
    - null pointer deref when device replace target is missing

    - fix fsync after hole punching when using no-holes feature

    - fix lockdep splat when allocating percpu data with wrong GFP flags

    Cleanups, refactoring, core changes:
    - drop redunant parameters from various functions

    - kill and opencode trivial helpers

    - __cold/__exit function annotations

    - dead code removal

    - continued audit and documentation of memory barriers

    - error handling: handle removal from uuid tree

    - error handling: remove handling of impossible condtitons

    - more debugging or error messages

    - updated tracepoints

    - one VLA use removal (and one still left)"

    * tag 'for-4.17-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (164 commits)
    btrfs: lift errors from add_extent_changeset to the callers
    Btrfs: print error messages when failing to read trees
    btrfs: user proper type for btrfs_mask_flags flags
    btrfs: split dev-replace locking helpers for read and write
    btrfs: remove stale comments about fs_mutex
    btrfs: use RCU in btrfs_show_devname for device list traversal
    btrfs: update barrier in should_cow_block
    btrfs: use lockdep_assert_held for mutexes
    btrfs: use lockdep_assert_held for spinlocks
    btrfs: Validate child tree block's level and first key
    btrfs: tests/qgroup: Fix wrong tree backref level
    Btrfs: fix copy_items() return value when logging an inode
    Btrfs: fix fsync after hole punching when using no-holes feature
    btrfs: use helper to set ulist aux from a qgroup
    Revert "btrfs: qgroups: Retry after commit on getting EDQUOT"
    btrfs: qgroup: Update trace events for metadata reservation
    btrfs: qgroup: Use root::qgroup_meta_rsv_* to record qgroup meta reserved space
    btrfs: delayed-inode: Use new qgroup meta rsv for delayed inode and item
    btrfs: qgroup: Use separate meta reservation type for delalloc
    btrfs: qgroup: Introduce function to convert META_PREALLOC into META_PERTRANS
    ...

    Linus Torvalds
     
  • Pull xfs updates from Darrick Wong:
    "Here's the first round of fixes for XFS for 4.17.

    The biggest new features this time around are the addition of lazytime
    support, further enhancement of the on-disk inode metadata verifiers,
    and a patch to smooth over some of the AGFL padding problems that have
    intermittently plagued users since 4.5. I forsee sending a second pull
    request next week with further bug fixes and speedups in the online
    scrub code and elsewhere.

    This series has been run through a full xfstests run over the weekend
    and through a quick xfstests run against this morning's master, with
    no major failures reported.

    Summary of changes for this release:

    - Various cleanups and code fixes

    - Implement lazytime as a mount option

    - Convert various on-disk metadata checks from asserts to -EFSCORRUPTED

    - Fix accounting problems with the rmap per-ag reservations

    - Refactorings and cleanups for xfs_log_force

    - Various bugfixes for the reflink code

    - Work around v5 AGFL padding problems to prevent fs shutdowns

    - Establish inode fork verifiers to inspect on-disk metadata
    correctness

    - Various online scrub fixes

    - Fix v5 swapext blowing up on deleted inodes"

    * tag 'xfs-4.17-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (49 commits)
    xfs: do not log/recover swapext extent owner changes for deleted inodes
    xfs: clean up xfs_mount allocation and dynamic initializers
    xfs: remove dead inode version setting code
    xfs: catch inode allocation state mismatch corruption
    xfs: xfs_scrub_iallocbt_xref_rmap_inodes should use xref_set_corrupt
    xfs: flag inode corruption if parent ptr doesn't get us a real inode
    xfs: don't accept inode buffers with suspicious unlinked chains
    xfs: move inode extent size hint validation to libxfs
    xfs: record inode buf errors as a xref error in inobt scrubber
    xfs: remove xfs_buf parameter from inode scrub methods
    xfs: inode scrubber shouldn't bother with raw checks
    xfs: bmap scrubber should do rmap xref with bmap for sparse files
    xfs: refactor inode buffer verifier error logging
    xfs: refactor inode verifier error logging
    xfs: refactor bmap record validation
    xfs: sanity-check the unused space before trying to use it
    xfs: detect agfl count corruption and reset agfl
    xfs: unwind the try_again loop in xfs_log_force
    xfs: refactor xfs_log_force_lsn
    xfs: minor cleanup for xfs_reflink_end_cow
    ...

    Linus Torvalds
     
  • Pull vfs dcache updates from Al Viro:
    "Part of this is what the trylock loop elimination series has turned
    into, part making d_move() preserve the parent (and thus the path) of
    victim, plus some general cleanups"

    * 'work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (22 commits)
    d_genocide: move export to definition
    fold dentry_lock_for_move() into its sole caller and clean it up
    make non-exchanging __d_move() copy ->d_parent rather than swap them
    oprofilefs: don't oops on allocation failure
    lustre: get rid of pointless casts to struct dentry *
    debugfs_lookup(): switch to lookup_one_len_unlocked()
    fold lookup_real() into __lookup_hash()
    take out orphan externs (empty_string/slash_string)
    split d_path() and friends into a separate file
    dcache.c: trim includes
    fs/dcache: Avoid a try_lock loop in shrink_dentry_list()
    get rid of trylock loop around dentry_kill()
    handle move to LRU in retain_dentry()
    dput(): consolidate the "do we need to retain it?" into an inlined helper
    split the slow part of lock_parent() off
    now lock_parent() can't run into killed dentry
    get rid of trylock loop in locking dentries on shrink list
    d_delete(): get rid of trylock loop
    fs/dcache: Move dentry_kill() below lock_parent()
    fs/dcache: Remove stale comment from dentry_kill()
    ...

    Linus Torvalds
     

04 Apr, 2018

2 commits

  • Pull workqueue updates from Tejun Heo:
    "rcu_work addition and a couple trivial changes"

    * 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
    workqueue: remove the comment about the old manager_arb mutex
    workqueue: fix the comments of nr_idle
    fs/aio: Use rcu_work instead of explicit rcu and work item
    cgroup: Use rcu_work instead of explicit rcu and work item
    RCU, workqueue: Implement rcu_work

    Linus Torvalds
     
  • Pull networking updates from David Miller:

    1) Support offloading wireless authentication to userspace via
    NL80211_CMD_EXTERNAL_AUTH, from Srinivas Dasari.

    2) A lot of work on network namespace setup/teardown from Kirill Tkhai.
    Setup and cleanup of namespaces now all run asynchronously and thus
    performance is significantly increased.

    3) Add rx/tx timestamping support to mv88e6xxx driver, from Brandon
    Streiff.

    4) Support zerocopy on RDS sockets, from Sowmini Varadhan.

    5) Use denser instruction encoding in x86 eBPF JIT, from Daniel
    Borkmann.

    6) Support hw offload of vlan filtering in mvpp2 dreiver, from Maxime
    Chevallier.

    7) Support grafting of child qdiscs in mlxsw driver, from Nogah
    Frankel.

    8) Add packet forwarding tests to selftests, from Ido Schimmel.

    9) Deal with sub-optimal GSO packets better in BBR congestion control,
    from Eric Dumazet.

    10) Support 5-tuple hashing in ipv6 multipath routing, from David Ahern.

    11) Add path MTU tests to selftests, from Stefano Brivio.

    12) Various bits of IPSEC offloading support for mlx5, from Aviad
    Yehezkel, Yossi Kuperman, and Saeed Mahameed.

    13) Support RSS spreading on ntuple filters in SFC driver, from Edward
    Cree.

    14) Lots of sockmap work from John Fastabend. Applications can use eBPF
    to filter sendmsg and sendpage operations.

    15) In-kernel receive TLS support, from Dave Watson.

    16) Add XDP support to ixgbevf, this is significant because it should
    allow optimized XDP usage in various cloud environments. From Tony
    Nguyen.

    17) Add new Intel E800 series "ice" ethernet driver, from Anirudh
    Venkataramanan et al.

    18) IP fragmentation match offload support in nfp driver, from Pieter
    Jansen van Vuuren.

    19) Support XDP redirect in i40e driver, from Björn Töpel.

    20) Add BPF_RAW_TRACEPOINT program type for accessing the arguments of
    tracepoints in their raw form, from Alexei Starovoitov.

    21) Lots of striding RQ improvements to mlx5 driver with many
    performance improvements, from Tariq Toukan.

    22) Use rhashtable for inet frag reassembly, from Eric Dumazet.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1678 commits)
    net: mvneta: improve suspend/resume
    net: mvneta: split rxq/txq init and txq deinit into SW and HW parts
    ipv6: frags: fix /proc/sys/net/ipv6/ip6frag_low_thresh
    net: bgmac: Fix endian access in bgmac_dma_tx_ring_free()
    net: bgmac: Correctly annotate register space
    route: check sysctl_fib_multipath_use_neigh earlier than hash
    fix typo in command value in drivers/net/phy/mdio-bitbang.
    sky2: Increase D3 delay to sky2 stops working after suspend
    net/mlx5e: Set EQE based as default TX interrupt moderation mode
    ibmvnic: Disable irqs before exiting reset from closed state
    net: sched: do not emit messages while holding spinlock
    vlan: also check phy_driver ts_info for vlan's real device
    Bluetooth: Mark expected switch fall-throughs
    Bluetooth: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for BTUSB_QCA_ROME
    Bluetooth: btrsi: remove unused including
    Bluetooth: hci_bcm: Remove DMI quirk for the MINIX Z83-4
    sh_eth: kill useless check in __sh_eth_get_regs()
    sh_eth: add sh_eth_cpu_data::no_xdfar flag
    ipv6: factorize sk_wmem_alloc updates done by __ip6_append_data()
    ipv4: factorize sk_wmem_alloc updates done by __ip_append_data()
    ...

    Linus Torvalds
     

03 Apr, 2018

19 commits

  • Pull removal of in-kernel calls to syscalls from Dominik Brodowski:
    "System calls are interaction points between userspace and the kernel.
    Therefore, system call functions such as sys_xyzzy() or
    compat_sys_xyzzy() should only be called from userspace via the
    syscall table, but not from elsewhere in the kernel.

    At least on 64-bit x86, it will likely be a hard requirement from
    v4.17 onwards to not call system call functions in the kernel: It is
    better to use use a different calling convention for system calls
    there, where struct pt_regs is decoded on-the-fly in a syscall wrapper
    which then hands processing over to the actual syscall function. This
    means that only those parameters which are actually needed for a
    specific syscall are passed on during syscall entry, instead of
    filling in six CPU registers with random user space content all the
    time (which may cause serious trouble down the call chain). Those
    x86-specific patches will be pushed through the x86 tree in the near
    future.

    Moreover, rules on how data may be accessed may differ between kernel
    data and user data. This is another reason why calling sys_xyzzy() is
    generally a bad idea, and -- at most -- acceptable in arch-specific
    code.

    This patchset removes all in-kernel calls to syscall functions in the
    kernel with the exception of arch/. On top of this, it cleans up the
    three places where many syscalls are referenced or prototyped, namely
    kernel/sys_ni.c, include/linux/syscalls.h and include/linux/compat.h"

    * 'syscalls-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: (109 commits)
    bpf: whitelist all syscalls for error injection
    kernel/sys_ni: remove {sys_,sys_compat} from cond_syscall definitions
    kernel/sys_ni: sort cond_syscall() entries
    syscalls/x86: auto-create compat_sys_*() prototypes
    syscalls: sort syscall prototypes in include/linux/compat.h
    net: remove compat_sys_*() prototypes from net/compat.h
    syscalls: sort syscall prototypes in include/linux/syscalls.h
    kexec: move sys_kexec_load() prototype to syscalls.h
    x86/sigreturn: use SYSCALL_DEFINE0
    x86: fix sys_sigreturn() return type to be long, not unsigned long
    x86/ioport: add ksys_ioperm() helper; remove in-kernel calls to sys_ioperm()
    mm: add ksys_readahead() helper; remove in-kernel calls to sys_readahead()
    mm: add ksys_mmap_pgoff() helper; remove in-kernel calls to sys_mmap_pgoff()
    mm: add ksys_fadvise64_64() helper; remove in-kernel call to sys_fadvise64_64()
    fs: add ksys_fallocate() wrapper; remove in-kernel calls to sys_fallocate()
    fs: add ksys_p{read,write}64() helpers; remove in-kernel calls to syscalls
    fs: add ksys_truncate() wrapper; remove in-kernel calls to sys_truncate()
    fs: add ksys_sync_file_range helper(); remove in-kernel calls to syscall
    kernel: add ksys_setsid() helper; remove in-kernel call to sys_setsid()
    kernel: add ksys_unshare() helper; remove in-kernel calls to sys_unshare()
    ...

    Linus Torvalds
     
  • Pul removal of obsolete architecture ports from Arnd Bergmann:
    "This removes the entire architecture code for blackfin, cris, frv,
    m32r, metag, mn10300, score, and tile, including the associated device
    drivers.

    I have been working with the (former) maintainers for each one to
    ensure that my interpretation was right and the code is definitely
    unused in mainline kernels. Many had fond memories of working on the
    respective ports to start with and getting them included in upstream,
    but also saw no point in keeping the port alive without any users.

    In the end, it seems that while the eight architectures are extremely
    different, they all suffered the same fate: There was one company in
    charge of an SoC line, a CPU microarchitecture and a software
    ecosystem, which was more costly than licensing newer off-the-shelf
    CPU cores from a third party (typically ARM, MIPS, or RISC-V). It
    seems that all the SoC product lines are still around, but have not
    used the custom CPU architectures for several years at this point. In
    contrast, CPU instruction sets that remain popular and have actively
    maintained kernel ports tend to all be used across multiple licensees.

    [ See the new nds32 port merged in the previous commit for the next
    generation of "one company in charge of an SoC line, a CPU
    microarchitecture and a software ecosystem" - Linus ]

    The removal came out of a discussion that is now documented at
    https://lwn.net/Articles/748074/. Unlike the original plans, I'm not
    marking any ports as deprecated but remove them all at once after I
    made sure that they are all unused. Some architectures (notably tile,
    mn10300, and blackfin) are still being shipped in products with old
    kernels, but those products will never be updated to newer kernel
    releases.

    After this series, we still have a few architectures without mainline
    gcc support:

    - unicore32 and hexagon both have very outdated gcc releases, but the
    maintainers promised to work on providing something newer. At least
    in case of hexagon, this will only be llvm, not gcc.

    - openrisc, risc-v and nds32 are still in the process of finishing
    their support or getting it added to mainline gcc in the first
    place. They all have patched gcc-7.3 ports that work to some
    degree, but complete upstream support won't happen before gcc-8.1.
    Csky posted their first kernel patch set last week, their situation
    will be similar

    [ Palmer Dabbelt points out that RISC-V support is in mainline gcc
    since gcc-7, although gcc-7.3.0 is the recommended minimum - Linus ]"

    This really says it all:

    2498 files changed, 95 insertions(+), 467668 deletions(-)

    * tag 'arch-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (74 commits)
    MAINTAINERS: UNICORE32: Change email account
    staging: iio: remove iio-trig-bfin-timer driver
    tty: hvc: remove tile driver
    tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers
    serial: remove tile uart driver
    serial: remove m32r_sio driver
    serial: remove blackfin drivers
    serial: remove cris/etrax uart drivers
    usb: Remove Blackfin references in USB support
    usb: isp1362: remove blackfin arch glue
    usb: musb: remove blackfin port
    usb: host: remove tilegx platform glue
    pwm: remove pwm-bfin driver
    i2c: remove bfin-twi driver
    spi: remove blackfin related host drivers
    watchdog: remove bfin_wdt driver
    can: remove bfin_can driver
    mmc: remove bfin_sdh driver
    input: misc: remove blackfin rotary driver
    input: keyboard: remove bf54x driver
    ...

    Linus Torvalds
     
  • Pull wait_var_event updates from Ingo Molnar:
    "This introduces the new wait_var_event() API, which is a more flexible
    waiting primitive than wait_on_atomic_t().

    All wait_on_atomic_t() users are migrated over to the new API and
    wait_on_atomic_t() is removed. The migration fixes one bug and should
    result in no functional changes for the other usecases"

    * 'sched-wait-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched/wait: Improve __var_waitqueue() code generation
    sched/wait: Remove the wait_on_atomic_t() API
    sched/wait, arch/mips: Fix and convert wait_on_atomic_t() usage to the new wait_var_event() API
    sched/wait, fs/ocfs2: Convert wait_on_atomic_t() usage to the new wait_var_event() API
    sched/wait, fs/nfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API
    sched/wait, fs/fscache: Convert wait_on_atomic_t() usage to the new wait_var_event() API
    sched/wait, fs/btrfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API
    sched/wait, fs/afs: Convert wait_on_atomic_t() usage to the new wait_var_event() API
    sched/wait, drivers/media: Convert wait_on_atomic_t() usage to the new wait_var_event() API
    sched/wait, drivers/drm: Convert wait_on_atomic_t() usage to the new wait_var_event() API
    sched/wait: Introduce wait_var_event()

    Linus Torvalds
     
  • Using the ksys_fallocate() wrapper allows us to get rid of in-kernel
    calls to the sys_fallocate() syscall. The ksys_ prefix denotes that this
    function is meant as a drop-in replacement for the syscall. In
    particular, it uses the same calling convention as sys_fallocate().

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Al Viro
    Cc: Andrew Morton
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Using the ksys_p{read,write}64() wrappers allows us to get rid of
    in-kernel calls to the sys_pread64() and sys_pwrite64() syscalls.
    The ksys_ prefix denotes that this function is meant as a drop-in
    replacement for the syscall. In particular, it uses the same calling
    convention as sys_p{read,write}64().

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Al Viro
    Cc: Andrew Morton
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Using the ksys_truncate() wrapper allows us to get rid of in-kernel
    calls to the sys_truncate() syscall. The ksys_ prefix denotes that this
    function is meant as a drop-in replacement for the syscall. In
    particular, it uses the same calling convention as sys_truncate().

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Al Viro
    Cc: Andrew Morton
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Using this helper allows us to avoid the in-kernel calls to the
    sys_sync_file_range() syscall. The ksys_ prefix denotes that this function
    is meant as a drop-in replacement for the syscall. In particular, it uses
    the same calling convention as sys_sync_file_range().

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Al Viro
    Cc: Andrew Morton
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Using this helper allows us to avoid the in-kernel calls to the
    sys_sync() syscall. The ksys_ prefix denotes that this function
    is meant as a drop-in replacement for the syscall. In particular, it
    uses the same calling convention as sys_sync().

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Alexander Viro
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Using this helper allows us to avoid the in-kernel calls to the
    sys_read() syscall. The ksys_ prefix denotes that this function
    is meant as a drop-in replacement for the syscall. In particular, it
    uses the same calling convention as sys_read().

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Alexander Viro
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Using this helper allows us to avoid the in-kernel calls to the
    sys_lseek() syscall. The ksys_ prefix denotes that this function
    is meant as a drop-in replacement for the syscall. In particular, it
    uses the same calling convention as sys_lseek().

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Alexander Viro
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Using this helper allows us to avoid the in-kernel calls to the
    sys_ioctl() syscall. The ksys_ prefix denotes that this function
    is meant as a drop-in replacement for the syscall. In particular, it
    uses the same calling convention as sys_ioctl().

    After careful review, at least some of these calls could be converted
    to do_vfs_ioctl() in future.

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Alexander Viro
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Using this helper allows us to avoid the in-kernel calls to the
    sys_getdents64() syscall. The ksys_ prefix denotes that this function
    is meant as a drop-in replacement for the syscall. In particular, it
    uses the same calling convention as sys_getdents64().

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Alexander Viro
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Using this wrapper allows us to avoid the in-kernel calls to the
    sys_open() syscall. The ksys_ prefix denotes that this function is meant
    as a drop-in replacement for the syscall. In particular, it uses the
    same calling convention as sys_open().

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Al Viro
    Cc: Andrew Morton
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Using the ksys_close() wrapper allows us to get rid of in-kernel calls
    to the sys_close() syscall. The ksys_ prefix denotes that this function
    is meant as a drop-in replacement for the syscall. In particular, it
    uses the same calling convention as sys_close(), with one subtle
    difference:

    The few places which checked the return value did not care about the return
    value re-writing in sys_close(), so simply use a wrapper around
    __close_fd().

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Al Viro
    Cc: Andrew Morton
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Using the ksys_ftruncate() wrapper allows us to get rid of in-kernel
    calls to the sys_ftruncate() syscall. The ksys_ prefix denotes that this
    function is meant as a drop-in replacement for the syscall. In
    particular, it uses the same calling convention as sys_ftruncate().

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Al Viro
    Cc: Andrew Morton
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Using the fs-interal do_fchownat() wrapper allows us to get rid of
    fs-internal calls to the sys_fchownat() syscall.

    Introducing the ksys_fchown() helper and the ksys_{,}chown() wrappers
    allows us to avoid the in-kernel calls to the sys_{,l,f}chown() syscalls.
    The ksys_ prefix denotes that these functions are meant as a drop-in
    replacement for the syscalls. In particular, they use the same calling
    convention as sys_{,l,f}chown().

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Al Viro
    Cc: Andrew Morton
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Using the fs-internal do_faccessat() helper allows us to get rid of
    fs-internal calls to the sys_faccessat() syscall.

    Introducing the ksys_access() wrapper allows us to avoid the in-kernel
    calls to the sys_access() syscall. The ksys_ prefix denotes that this
    function is meant as a drop-in replacement for the syscall. In
    particular, it uses the same calling convention as sys_access().

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Al Viro
    Cc: Andrew Morton
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • … in-kernel calls to syscall

    Using the fs-internal do_fchmodat() helper allows us to get rid of
    fs-internal calls to the sys_fchmodat() syscall.

    Introducing the ksys_fchmod() helper and the ksys_chmod() wrapper allows
    us to avoid the in-kernel calls to the sys_fchmod() and sys_chmod()
    syscalls. The ksys_ prefix denotes that these functions are meant as a
    drop-in replacement for the syscalls. In particular, they use the same
    calling convention as sys_fchmod() and sys_chmod().

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>

    Dominik Brodowski
     
  • Using the fs-internal do_linkat() helper allows us to get rid of
    fs-internal calls to the sys_linkat() syscall.

    Introducing the ksys_link() wrapper allows us to avoid the in-kernel
    calls to sys_link() syscall. The ksys_ prefix denotes that this function
    is meant as a drop-in replacement for the syscall. In particular, it uses
    the same calling convention as sys_link().

    In the near future, the only fs-external user of ksys_link() should be
    converted to use vfs_link() instead.

    This patch is part of a series which removes in-kernel calls to syscalls.
    On this basis, the syscall entry path can be streamlined. For details, see
    http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

    Cc: Al Viro
    Cc: Andrew Morton
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski