1. 23 May, 2019 23 commits
  2. 22 May, 2019 6 commits
    • Felipe Gasper's avatar
      net: Add UNIX_DIAG_UID to Netlink UNIX socket diagnostics. · cae9910e
      Felipe Gasper authored
      This adds the ability for Netlink to report a socket's UID along with the
      other UNIX diagnostic information that is already available. This will
      allow diagnostic tools greater insight into which users control which
      socket.
      
      To test this, do the following as a non-root user:
      
          unshare -U -r bash
          nc -l -U user.socket.$$ &
      
      .. and verify from within that same session that Netlink UNIX socket
      diagnostics report the socket's UID as 0. Also verify that Netlink UNIX
      socket diagnostics report the socket's UID as the user's UID from an
      unprivileged process in a different session. Verify the same from
      a root process.
      Signed-off-by: default avatarFelipe Gasper <felipe@felipegasper.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cae9910e
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 54dee406
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
      
       - Fix SPE probe failure when backing auxbuf with high-order pages
      
       - Fix handling of DMA allocations from outside of the vmalloc area
      
       - Fix generation of build-id ELF section for vDSO object
      
       - Disable huge I/O mappings if kernel page table dumping is enabled
      
       - A few other minor fixes (comments, kconfig etc)
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: vdso: Explicitly add build-id option
        arm64/mm: Inhibit huge-vmap with ptdump
        arm64: Print physical address of page table base in show_pte()
        arm64: don't trash config with compat symbol if COMPAT is disabled
        arm64: assembler: Update comment above cond_yield_neon() macro
        drivers/perf: arm_spe: Don't error on high-order pages for aux buf
        arm64/iommu: handle non-remapped addresses in ->mmap and ->get_sgtable
      54dee406
    • Linus Torvalds's avatar
      Merge tag 'gfs2-5.1.fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 651bae98
      Linus Torvalds authored
      Pull gfs2 fix from Andreas Gruenbacher:
       "Fix a gfs2 sign extension bug introduced in v4.3"
      
      * tag 'gfs2-5.1.fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: Fix sign extension bug in gfs2_update_stats
      651bae98
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · f75b6f30
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Clear up some recent tipc regressions because of registration
          ordering. Fix from Junwei Hu.
      
       2) tipc's TLV_SET() can read past the end of the supplied buffer during
          the copy. From Chris Packham.
      
       3) ptp example program doesn't match the kernel, from Richard Cochran.
      
       4) Outgoing message type fix in qrtr, from Bjorn Andersson.
      
       5) Flow control regression in stmmac, from Tan Tee Min.
      
       6) Fix inband autonegotiation in phylink, from Russell King.
      
       7) Fix sk_bound_dev_if handling in rawv6_bind(), from Mike Manning.
      
       8) Fix usbnet crash after disconnect, from Kloetzke Jan.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (21 commits)
        usbnet: fix kernel crash after disconnect
        selftests: fib_rule_tests: use pre-defined DEV_ADDR
        net-next: net: Fix typos in ip-sysctl.txt
        ipv6: Consider sk_bound_dev_if when binding a raw socket to an address
        net: phylink: ensure inband AN works correctly
        usbnet: ipheth: fix racing condition
        net: stmmac: dma channel control register need to be init first
        net: stmmac: fix ethtool flow control not able to get/set
        net: qrtr: Fix message type of outgoing packets
        networking: : fix typos in code comments
        ptp: Fix example program to match kernel.
        fddi: fix typos in code comments
        selftests: fib_rule_tests: enable forwarding before ipv4 from/iif test
        selftests: fib_rule_tests: fix local IPv4 address typo
        tipc: Avoid copying bytes beyond the supplied data
        2/2] net: xilinx_emaclite: use readx_poll_timeout() in mdio wait function
        1/2] net: axienet: use readx_poll_timeout() in mdio wait function
        vlan: Mark expected switch fall-through
        macvlan: Mark expected switch fall-through
        net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages query
        ...
      f75b6f30
    • Linus Torvalds's avatar
      Merge tag 'for-5.2/dm-fix-1' of... · 86f9e56d
      Linus Torvalds authored
      Merge tag 'for-5.2/dm-fix-1' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fix from Mike Snitzer:
       "Fix a particularly glaring oversight in a DM core commit from 5.1 that
        doesn't properly trim special IOs (e.g. discards) relative to
        corresponding target's max_io_len_target_boundary()"
      
      * tag 'for-5.2/dm-fix-1' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm: make sure to obey max_io_len_target_boundary
      86f9e56d
    • Andreas Gruenbacher's avatar
      gfs2: Fix sign extension bug in gfs2_update_stats · 5a5ec83d
      Andreas Gruenbacher authored
      Commit 4d207133 changed the types of the statistic values in struct
      gfs2_lkstats from s64 to u64.  Because of that, what should be a signed
      value in gfs2_update_stats turned into an unsigned value.  When shifted
      right, we end up with a large positive value instead of a small negative
      value, which results in an incorrect variance estimate.
      
      Fixes: 4d207133 ("gfs2: Make statistics unsigned, suitable for use with do_div()")
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      Cc: stable@vger.kernel.org # v4.4+
      5a5ec83d
  3. 21 May, 2019 11 commits
    • Michael Lass's avatar
      dm: make sure to obey max_io_len_target_boundary · 51b86f9a
      Michael Lass authored
      Commit 61697a6a ("dm: eliminate 'split_discard_bios' flag from DM
      target interface") incorrectly removed code from
      __send_changing_extent_only() that is required to impose a per-target IO
      boundary on IO that exceeds max_io_len_target_boundary().  Otherwise
      "special" IO (e.g. DISCARD, WRITE SAME, WRITE ZEROES) can write beyond
      where allowed.
      
      Fix this by restoring the max_io_len_target_boundary() limit in
      __send_changing_extent_only()
      
      Fixes: 61697a6a ("dm: eliminate 'split_discard_bios' flag from DM target interface")
      Cc: stable@vger.kernel.org # 5.1+
      Signed-off-by: default avatarMichael Lass <bevan@bi-co.net>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      51b86f9a
    • Kloetzke Jan's avatar
      usbnet: fix kernel crash after disconnect · ad70411a
      Kloetzke Jan authored
      When disconnecting cdc_ncm the kernel sporadically crashes shortly
      after the disconnect:
      
        [   57.868812] Unable to handle kernel NULL pointer dereference at virtual address 00000000
        ...
        [   58.006653] PC is at 0x0
        [   58.009202] LR is at call_timer_fn+0xec/0x1b4
        [   58.013567] pc : [<0000000000000000>] lr : [<ffffff80080f5130>] pstate: 00000145
        [   58.020976] sp : ffffff8008003da0
        [   58.024295] x29: ffffff8008003da0 x28: 0000000000000001
        [   58.029618] x27: 000000000000000a x26: 0000000000000100
        [   58.034941] x25: 0000000000000000 x24: ffffff8008003e68
        [   58.040263] x23: 0000000000000000 x22: 0000000000000000
        [   58.045587] x21: 0000000000000000 x20: ffffffc68fac1808
        [   58.050910] x19: 0000000000000100 x18: 0000000000000000
        [   58.056232] x17: 0000007f885aff8c x16: 0000007f883a9f10
        [   58.061556] x15: 0000000000000001 x14: 000000000000006e
        [   58.066878] x13: 0000000000000000 x12: 00000000000000ba
        [   58.072201] x11: ffffffc69ff1db30 x10: 0000000000000020
        [   58.077524] x9 : 8000100008001000 x8 : 0000000000000001
        [   58.082847] x7 : 0000000000000800 x6 : ffffff8008003e70
        [   58.088169] x5 : ffffffc69ff17a28 x4 : 00000000ffff138b
        [   58.093492] x3 : 0000000000000000 x2 : 0000000000000000
        [   58.098814] x1 : 0000000000000000 x0 : 0000000000000000
        ...
        [   58.205800] [<          (null)>]           (null)
        [   58.210521] [<ffffff80080f5298>] expire_timers+0xa0/0x14c
        [   58.215937] [<ffffff80080f542c>] run_timer_softirq+0xe8/0x128
        [   58.221702] [<ffffff8008081120>] __do_softirq+0x298/0x348
        [   58.227118] [<ffffff80080a6304>] irq_exit+0x74/0xbc
        [   58.232009] [<ffffff80080e17dc>] __handle_domain_irq+0x78/0xac
        [   58.237857] [<ffffff8008080cf4>] gic_handle_irq+0x80/0xac
        ...
      
      The crash happens roughly 125..130ms after the disconnect. This
      correlates with the 'delay' timer that is started on certain USB tx/rx
      errors in the URB completion handler.
      
      The problem is a race of usbnet_stop() with usbnet_start_xmit(). In
      usbnet_stop() we call usbnet_terminate_urbs() to cancel all URBs in
      flight. This only makes sense if no new URBs are submitted
      concurrently, though. But the usbnet_start_xmit() can run at the same
      time on another CPU which almost unconditionally submits an URB. The
      error callback of the new URB will then schedule the timer after it was
      already stopped.
      
      The fix adds a check if the tx queue is stopped after the tx list lock
      has been taken. This should reliably prevent the submission of new URBs
      while usbnet_terminate_urbs() does its job. The same thing is done on
      the rx side even though it might be safe due to other flags that are
      checked there.
      Signed-off-by: default avatarJan Klötzke <Jan.Kloetzke@preh.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ad70411a
    • Hangbin Liu's avatar
      selftests: fib_rule_tests: use pre-defined DEV_ADDR · 34632975
      Hangbin Liu authored
      DEV_ADDR is defined but not used. Use it in address setting.
      Do the same with IPv6 for consistency.
      Reported-by: default avatarDavid Ahern <dsahern@gmail.com>
      Fixes: fc82d93e ("selftests: fib_rule_tests: fix local IPv4 address typo")
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      34632975
    • Masanari Iida's avatar
      net-next: net: Fix typos in ip-sysctl.txt · 2bcd9d84
      Masanari Iida authored
      This patch fixes some spelling typos found in ip-sysctl.txt
      Signed-off-by: default avatarMasanari Iida <standby24x7@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2bcd9d84
    • Mike Manning's avatar
      ipv6: Consider sk_bound_dev_if when binding a raw socket to an address · 72f7cfab
      Mike Manning authored
      IPv6 does not consider if the socket is bound to a device when binding
      to an address. The result is that a socket can be bound to eth0 and
      then bound to the address of eth1. If the device is a VRF, the result
      is that a socket can only be bound to an address in the default VRF.
      
      Resolve by considering the device if sk_bound_dev_if is set.
      Signed-off-by: default avatarMike Manning <mmanning@vyatta.att-mail.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
      Tested-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      72f7cfab
    • Russell King's avatar
      net: phylink: ensure inband AN works correctly · 406cb0c4
      Russell King authored
      Do not update the link interface mode while the link is down to avoid
      spurious link interface changes.
      
      Always call mac_config if we have a PHY to propagate the pause mode
      settings to the MAC.
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      406cb0c4
    • Bernd Eckstein's avatar
      usbnet: ipheth: fix racing condition · 94d250fa
      Bernd Eckstein authored
      Fix a racing condition in ipheth.c that can lead to slow performance.
      
      Bug: In ipheth_tx(), netif_wake_queue() may be called on the callback
      ipheth_sndbulk_callback(), _before_ netif_stop_queue() is called.
      When this happens, the queue is stopped longer than it needs to be,
      thus reducing network performance.
      
      Fix: Move netif_stop_queue() in front of usb_submit_urb(). Now the order
      is always correct. In case, usb_submit_urb() fails, the queue is woken up
      again as callback will not fire.
      
      Testing: This racing condition is usually not noticeable, as it has to
      occur very frequently to slowdown the network. The callback from the USB
      is usually triggered slow enough, so the situation does not appear.
      However, on a Ubuntu Linux on VMWare Workstation, running on Windows 10,
      the we loose the race quite often and the following speedup can be noticed:
      
      Without this patch: Download:  4.10 Mbit/s, Upload:  4.01 Mbit/s
      With this patch:    Download: 36.23 Mbit/s, Upload: 17.61 Mbit/s
      Signed-off-by: default avatarOliver Zweigle <Oliver.Zweigle@faro.com>
      Signed-off-by: default avatarBernd Eckstein <3ernd.Eckstein@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      94d250fa
    • Linus Torvalds's avatar
      Merge tag 'selinux-pr-20190521' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux · 9c7db500
      Linus Torvalds authored
      Pull SELinux fix from Paul Moore:
       "One small SELinux patch to fix a problem when disconnecting a SCTP
        socket with connect(AF_UNSPEC)"
      
      * tag 'selinux-pr-20190521' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
        selinux: do not report error on connect(AF_UNSPEC)
      9c7db500
    • Linus Torvalds's avatar
      Merge tag 'spdx-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core · 2c1212de
      Linus Torvalds authored
      Pull SPDX update from Greg KH:
       "Here is a series of patches that add SPDX tags to different kernel
        files, based on two different things:
      
         - SPDX entries are added to a bunch of files that we missed a year
           ago that do not have any license information at all.
      
           These were either missed because the tool saw the MODULE_LICENSE()
           tag, or some EXPORT_SYMBOL tags, and got confused and thought the
           file had a real license, or the files have been added since the
           last big sweep, or they were Makefile/Kconfig files, which we
           didn't touch last time.
      
         - Add GPL-2.0-only or GPL-2.0-or-later tags to files where our scan
           tools can determine the license text in the file itself. Where this
           happens, the license text is removed, in order to cut down on the
           700+ different ways we have in the kernel today, in a quest to get
           rid of all of these.
      
        These patches have been out for review on the linux-spdx@vger mailing
        list, and while they were created by automatic tools, they were
        hand-verified by a bunch of different people, all whom names are on
        the patches are reviewers.
      
        The reason for these "large" patches is if we were to continue to
        progress at the current rate of change in the kernel, adding license
        tags to individual files in different subsystems, we would be finished
        in about 10 years at the earliest.
      
        There will be more series of these types of patches coming over the
        next few weeks as the tools and reviewers crunch through the more
        "odd" variants of how to say "GPLv2" that developers have come up with
        over the years, combined with other fun oddities (GPL + a BSD
        disclaimer?) that are being unearthed, with the goal for the whole
        kernel to be cleaned up.
      
        These diffstats are not small, 3840 files are touched, over 10k lines
        removed in just 24 patches"
      
      * tag 'spdx-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (24 commits)
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 25
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 24
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 23
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 22
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 21
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 19
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 18
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 17
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 15
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 14
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 12
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 11
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 10
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 9
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 7
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 5
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 4
        treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 3
        ...
      2c1212de
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · d53e860f
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
      
       - Two long-standing bugs in the powerpc assembly of vmx
      
       - Stack overrun caused by HASH_MAX_DESCSIZE being too small
      
       - Regression in caam
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: vmx - ghash: do nosimd fallback manually
        crypto: vmx - CTR: always increment IV as quadword
        crypto: hash - fix incorrect HASH_MAX_DESCSIZE
        crypto: caam - fix typo in i.MX6 devices list for errata
      d53e860f
    • Thomas Gleixner's avatar
      treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 25 · 7170066e
      Thomas Gleixner authored
      Based on 1 normalized pattern(s):
      
        this program is free software you can redistribute it and or modify
        it under the terms of the gnu general public license as published by
        the free software foundation either version 2 of the license or at
        your option any later version this program is distributed in the
        hope that it would be useful but without any warranty without even
        the implied warranty of merchantability or fitness for a particular
        purpose see the gnu general public license for more details
      
      extracted by the scancode license scanner the SPDX license identifier
      
        GPL-2.0-or-later
      
      has been chosen to replace the boilerplate/reference in 6 file(s).
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarSteve Winslow <swinslow@gmail.com>
      Reviewed-by: default avatarKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: default avatarJilayne Lovejoy <opensource@jilayne.com>
      Reviewed-by: default avatarAllison Randal <allison@lohutok.net>
      Cc: linux-spdx@vger.kernel.org
      Link: https://lkml.kernel.org/r/20190519154043.007767574@linutronix.deSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7170066e