1. 03 Apr, 2020 3 commits
    • Hangbin Liu's avatar
      neigh: support smaller retrans_time settting · 19e16d22
      Hangbin Liu authored
      Currently, we limited the retrans_time to be greater than HZ/2. i.e.
      setting retrans_time less than 500ms will not work. This makes the user
      unable to achieve a more accurate control for bonding arp fast failover.
      
      Update the sanity check to HZ/100, which is 10ms, to let users have more
      ability on the retrans_time control.
      
      v3: sync the behavior with IPv6 and update all the timer handler
      v2: use HZ instead of hard code number
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      19e16d22
    • Tonghao Zhang's avatar
      net: openvswitch: use hlist_for_each_entry_rcu instead of hlist_for_each_entry · 64948427
      Tonghao Zhang authored
      The struct sw_flow is protected by RCU, when traversing them,
      use hlist_for_each_entry_rcu.
      Signed-off-by: default avatarTonghao Zhang <xiangxia.m.yue@gmail.com>
      Tested-by: default avatarGreg Rose <gvrose8192@gmail.com>
      Reviewed-by: default avatarGreg Rose <gvrose8192@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      64948427
    • Vincent Bernat's avatar
      net: core: enable SO_BINDTODEVICE for non-root users · c427bfec
      Vincent Bernat authored
      Currently, SO_BINDTODEVICE requires CAP_NET_RAW. This change allows a
      non-root user to bind a socket to an interface if it is not already
      bound. This is useful to allow an application to bind itself to a
      specific VRF for outgoing or incoming connections. Currently, an
      application wanting to manage connections through several VRF need to
      be privileged.
      
      Previously, IP_UNICAST_IF and IPV6_UNICAST_IF were added for
      Wine (76e21053 and c4062dfc) specifically for use by
      non-root processes. However, they are restricted to sendmsg() and not
      usable with TCP. Allowing SO_BINDTODEVICE would allow TCP clients to
      get the same privilege. As for TCP servers, outside the VRF use case,
      SO_BINDTODEVICE would only further restrict connections a server could
      accept.
      
      When an application is restricted to a VRF (with `ip vrf exec`), the
      socket is bound to an interface at creation and therefore, a
      non-privileged call to SO_BINDTODEVICE to escape the VRF fails.
      
      When an application bound a socket to SO_BINDTODEVICE and transmit it
      to a non-privileged process through a Unix socket, a tentative to
      change the bound device also fails.
      
      Before:
      
          >>> import socket
          >>> s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
          >>> s.setsockopt(socket.SOL_SOCKET, socket.SO_BINDTODEVICE, b"dummy0")
          Traceback (most recent call last):
            File "<stdin>", line 1, in <module>
          PermissionError: [Errno 1] Operation not permitted
      
      After:
      
          >>> import socket
          >>> s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
          >>> s.setsockopt(socket.SOL_SOCKET, socket.SO_BINDTODEVICE, b"dummy0")
          >>> s.setsockopt(socket.SOL_SOCKET, socket.SO_BINDTODEVICE, b"dummy0")
          Traceback (most recent call last):
            File "<stdin>", line 1, in <module>
          PermissionError: [Errno 1] Operation not permitted
      Signed-off-by: default avatarVincent Bernat <vincent@bernat.ch>
      Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c427bfec
  2. 02 Apr, 2020 12 commits
  3. 01 Apr, 2020 13 commits
    • Rob Herring's avatar
      dt-bindings: net: mvusb: Fix example errors · d61f4d61
      Rob Herring authored
      The example for Marvell USB to MDIO Controller doesn't build:
      
      Error: Documentation/devicetree/bindings/net/marvell,mvusb.example.dts:18.9-14 syntax error
      FATAL ERROR: Unable to parse input tree
      
      This is due to label refs being used which can't be resolved.
      
      Fixes: 61e0150c ("dt-bindings: net: add marvell usb to mdio bindings")
      Cc: Tobias Waldekranz <tobias@waldekranz.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d61f4d61
    • Jose Abreu's avatar
      net: stmmac: Fix VLAN filtering when HW does not support it · dd6a4998
      Jose Abreu authored
      If we don't have any filters available we can't rely upon the return
      code of stmmac_add_hw_vlan_rx_fltr() / stmmac_del_hw_vlan_rx_fltr(). Add
      a check for this.
      
      Fixes: ed64639b ("net: stmmac: Add support for VLAN Rx filtering")
      Signed-off-by: default avatarJose Abreu <Jose.Abreu@synopsys.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dd6a4998
    • Hu Haowen's avatar
      bnx2x: correct a comment mistake in grammar · cc213f8c
      Hu Haowen authored
      It is not right in grammar to spell "Its not". The right one is "It's
      not".
      
      And this line is also over 80 characters. So I broke it into two lines
      as well in order to make that line not be more than 80 characters.
      Signed-off-by: default avatarHu Haowen <xianfengting221@163.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cc213f8c
    • Hu Haowen's avatar
      net/faraday: fix grammar in function ftgmac100_setup_clk() in ftgmac100.c · e6b45ee7
      Hu Haowen authored
      "its not" is wrong. The words should be "it's not".
      Signed-off-by: default avatarHu Haowen <xianfengting221@163.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6b45ee7
    • Richard Palethorpe's avatar
      slcan: Don't transmit uninitialized stack data in padding · b9258a2c
      Richard Palethorpe authored
      struct can_frame contains some padding which is not explicitly zeroed in
      slc_bump. This uninitialized data will then be transmitted if the stack
      initialization hardening feature is not enabled (CONFIG_INIT_STACK_ALL).
      
      This commit just zeroes the whole struct including the padding.
      Signed-off-by: default avatarRichard Palethorpe <rpalethorpe@suse.com>
      Fixes: a1044e36 ("can: add slcan driver for serial/USB-serial CAN adapters")
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Cc: linux-can@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Cc: security@kernel.org
      Cc: wg@grandegger.com
      Cc: mkl@pengutronix.de
      Cc: davem@davemloft.net
      Acked-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b9258a2c
    • Oleksij Rempel's avatar
      net: phy: at803x: fix clock sink configuration on ATH8030 and ATH8035 · b1f4c209
      Oleksij Rempel authored
      The masks in priv->clk_25m_reg and priv->clk_25m_mask are one-bits-set
      for the values that comprise the fields, not zero-bits-set.
      
      This patch fixes the clock frequency configuration for ATH8030 and
      ATH8035 Atheros PHYs by removing the erroneous "~".
      
      To reproduce this bug, configure the PHY  with the device tree binding
      "qca,clk-out-frequency" and remove the machine specific PHY fixups.
      
      Fixes: 2f664823 ("net: phy: at803x: add device tree binding")
      Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
      Reported-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Reviewed-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Tested-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b1f4c209
    • Rahul Lakkireddy's avatar
      cxgb4: free MQPRIO resources in shutdown path · cef8dac9
      Rahul Lakkireddy authored
      Perform missing MQPRIO resource cleanup in PCI shutdown path. Also,
      fix MQPRIO MSIX bitmap leak in resource cleanup.
      
      Fixes: b1396c2b ("cxgb4: parse and configure TC-MQPRIO offload")
      Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cef8dac9
    • Herat Ramani's avatar
      cxgb4: fix MPS index overwrite when setting MAC address · 41aa8561
      Herat Ramani authored
      cxgb4_update_mac_filt() earlier requests firmware to add a new MAC
      address into MPS TCAM. The MPS TCAM index returned by firmware is
      stored in pi->xact_addr_filt. However, the saved MPS TCAM index gets
      overwritten again with the return value of cxgb4_update_mac_filt(),
      which is wrong.
      
      When trying to update to another MAC address later, the wrong MPS TCAM
      index is sent to firmware, which causes firmware to return error,
      because it's not the same MPS TCAM index that firmware had sent
      earlier to driver.
      
      So, fix by removing the wrong overwrite being done after call to
      cxgb4_update_mac_filt().
      
      Fixes: 3f8cfd0d ("cxgb4/cxgb4vf: Program hash region for {t4/t4vf}_change_mac()")
      Signed-off-by: default avatarHerat Ramani <herat@chelsio.com>
      Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      41aa8561
    • Jarod Wilson's avatar
      ipv6: don't auto-add link-local address to lag ports · 744fdc82
      Jarod Wilson authored
      Bonding slave and team port devices should not have link-local addresses
      automatically added to them, as it can interfere with openvswitch being
      able to properly add tc ingress.
      
      Basic reproducer, courtesy of Marcelo:
      
      $ ip link add name bond0 type bond
      $ ip link set dev ens2f0np0 master bond0
      $ ip link set dev ens2f1np2 master bond0
      $ ip link set dev bond0 up
      $ ip a s
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
      group default qlen 1000
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
          inet 127.0.0.1/8 scope host lo
             valid_lft forever preferred_lft forever
          inet6 ::1/128 scope host
             valid_lft forever preferred_lft forever
      2: ens2f0np0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc
      mq master bond0 state UP group default qlen 1000
          link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff
      5: ens2f1np2: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc
      mq master bond0 state DOWN group default qlen 1000
          link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff
      11: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc
      noqueue state UP group default qlen 1000
          link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff
          inet6 fe80::20f:53ff:fe2f:ea40/64 scope link
             valid_lft forever preferred_lft forever
      
      (above trimmed to relevant entries, obviously)
      
      $ sysctl net.ipv6.conf.ens2f0np0.addr_gen_mode=0
      net.ipv6.conf.ens2f0np0.addr_gen_mode = 0
      $ sysctl net.ipv6.conf.ens2f1np2.addr_gen_mode=0
      net.ipv6.conf.ens2f1np2.addr_gen_mode = 0
      
      $ ip a l ens2f0np0
      2: ens2f0np0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc
      mq master bond0 state UP group default qlen 1000
          link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff
          inet6 fe80::20f:53ff:fe2f:ea40/64 scope link tentative
             valid_lft forever preferred_lft forever
      $ ip a l ens2f1np2
      5: ens2f1np2: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc
      mq master bond0 state DOWN group default qlen 1000
          link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff
          inet6 fe80::20f:53ff:fe2f:ea40/64 scope link tentative
             valid_lft forever preferred_lft forever
      
      Looks like addrconf_sysctl_addr_gen_mode() bypasses the original "is
      this a slave interface?" check added by commit c2edacf8, and
      results in an address getting added, while w/the proposed patch added,
      no address gets added. This simply adds the same gating check to another
      code path, and thus should prevent the same devices from erroneously
      obtaining an ipv6 link-local address.
      
      Fixes: d35a00b8 ("net/ipv6: allow sysctl to change link-local address generation mode")
      Reported-by: default avatarMoshe Levi <moshele@mellanox.com>
      CC: Stephen Hemminger <stephen@networkplumber.org>
      CC: Marcelo Ricardo Leitner <mleitner@redhat.com>
      CC: netdev@vger.kernel.org
      Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      744fdc82
    • Cong Wang's avatar
      net_sched: add a temporary refcnt for struct tcindex_data · 304e0242
      Cong Wang authored
      Although we intentionally use an ordered workqueue for all tc
      filter works, the ordering is not guaranteed by RCU work,
      given that tcf_queue_work() is esstenially a call_rcu().
      
      This problem is demostrated by Thomas:
      
        CPU 0:
          tcf_queue_work()
            tcf_queue_work(&r->rwork, tcindex_destroy_rexts_work);
      
        -> Migration to CPU 1
      
        CPU 1:
           tcf_queue_work(&p->rwork, tcindex_destroy_work);
      
      so the 2nd work could be queued before the 1st one, which leads
      to a free-after-free.
      
      Enforcing this order in RCU work is hard as it requires to change
      RCU code too. Fortunately we can workaround this problem in tcindex
      filter by taking a temporary refcnt, we only refcnt it right before
      we begin to destroy it. This simplifies the code a lot as a full
      refcnt requires much more changes in tcindex_set_parms().
      
      Reported-by: syzbot+46f513c3033d592409d2@syzkaller.appspotmail.com
      Fixes: 3d210534 ("net_sched: fix a race condition in tcindex_destroy()")
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Paul E. McKenney <paulmck@kernel.org>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Reviewed-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      304e0242
    • Linus Torvalds's avatar
      x86: get rid of 'errret' argument to __get_user_xyz() macross · 1a323ea5
      Linus Torvalds authored
      Every remaining user just has the error case returning -EFAULT.
      
      In fact, the exception was __get_user_asm_nozero(), which was removed in
      commit 4b842e4e ("x86: get rid of small constant size cases in
      raw_copy_{to,from}_user()"), and the other __get_user_xyz() macros just
      followed suit for consistency.
      
      Fix up some macro whitespace while at it.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1a323ea5
    • Linus Torvalds's avatar
      x86: remove __put_user_asm() infrastructure · ab33eb49
      Linus Torvalds authored
      The last user was removed by commit 4b842e4e ("x86: get rid of small
      constant size cases in raw_copy_{to,from}_user()").  Get rid of the
      left-overs before somebody tries to use it again.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ab33eb49
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next · 29d9f30d
      Linus Torvalds authored
      Pull networking updates from David Miller:
       "Highlights:
      
         1) Fix the iwlwifi regression, from Johannes Berg.
      
         2) Support BSS coloring and 802.11 encapsulation offloading in
            hardware, from John Crispin.
      
         3) Fix some potential Spectre issues in qtnfmac, from Sergey
            Matyukevich.
      
         4) Add TTL decrement action to openvswitch, from Matteo Croce.
      
         5) Allow paralleization through flow_action setup by not taking the
            RTNL mutex, from Vlad Buslov.
      
         6) A lot of zero-length array to flexible-array conversions, from
            Gustavo A. R. Silva.
      
         7) Align XDP statistics names across several drivers for consistency,
            from Lorenzo Bianconi.
      
         8) Add various pieces of infrastructure for offloading conntrack, and
            make use of it in mlx5 driver, from Paul Blakey.
      
         9) Allow using listening sockets in BPF sockmap, from Jakub Sitnicki.
      
        10) Lots of parallelization improvements during configuration changes
            in mlxsw driver, from Ido Schimmel.
      
        11) Add support to devlink for generic packet traps, which report
            packets dropped during ACL processing. And use them in mlxsw
            driver. From Jiri Pirko.
      
        12) Support bcmgenet on ACPI, from Jeremy Linton.
      
        13) Make BPF compatible with RT, from Thomas Gleixnet, Alexei
            Starovoitov, and your's truly.
      
        14) Support XDP meta-data in virtio_net, from Yuya Kusakabe.
      
        15) Fix sysfs permissions when network devices change namespaces, from
            Christian Brauner.
      
        16) Add a flags element to ethtool_ops so that drivers can more simply
            indicate which coalescing parameters they actually support, and
            therefore the generic layer can validate the user's ethtool
            request. Use this in all drivers, from Jakub Kicinski.
      
        17) Offload FIFO qdisc in mlxsw, from Petr Machata.
      
        18) Support UDP sockets in sockmap, from Lorenz Bauer.
      
        19) Fix stretch ACK bugs in several TCP congestion control modules,
            from Pengcheng Yang.
      
        20) Support virtual functiosn in octeontx2 driver, from Tomasz
            Duszynski.
      
        21) Add region operations for devlink and use it in ice driver to dump
            NVM contents, from Jacob Keller.
      
        22) Add support for hw offload of MACSEC, from Antoine Tenart.
      
        23) Add support for BPF programs that can be attached to LSM hooks,
            from KP Singh.
      
        24) Support for multiple paths, path managers, and counters in MPTCP.
            From Peter Krystad, Paolo Abeni, Florian Westphal, Davide Caratti,
            and others.
      
        25) More progress on adding the netlink interface to ethtool, from
            Michal Kubecek"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2121 commits)
        net: ipv6: rpl_iptunnel: Fix potential memory leak in rpl_do_srh_inline
        cxgb4/chcr: nic-tls stats in ethtool
        net: dsa: fix oops while probing Marvell DSA switches
        net/bpfilter: remove superfluous testing message
        net: macb: Fix handling of fixed-link node
        net: dsa: ksz: Select KSZ protocol tag
        netdevsim: dev: Fix memory leak in nsim_dev_take_snapshot_write
        net: stmmac: add EHL 2.5Gbps PCI info and PCI ID
        net: stmmac: add EHL PSE0 & PSE1 1Gbps PCI info and PCI ID
        net: stmmac: create dwmac-intel.c to contain all Intel platform
        net: dsa: bcm_sf2: Support specifying VLAN tag egress rule
        net: dsa: bcm_sf2: Add support for matching VLAN TCI
        net: dsa: bcm_sf2: Move writing of CFP_DATA(5) into slicing functions
        net: dsa: bcm_sf2: Check earlier for FLOW_EXT and FLOW_MAC_EXT
        net: dsa: bcm_sf2: Disable learning for ASP port
        net: dsa: b53: Deny enslaving port 7 for 7278 into a bridge
        net: dsa: b53: Prevent tagged VLAN on port 7 for 7278
        net: dsa: b53: Restore VLAN entries upon (re)configuration
        net: dsa: bcm_sf2: Fix overflow checks
        hv_netvsc: Remove unnecessary round_up for recv_completion_cnt
        ...
      29d9f30d
  4. 31 Mar, 2020 12 commits
    • Linus Torvalds's avatar
      Merge tag 'ntb-5.7' of git://github.com/jonmason/ntb · 56a451b7
      Linus Torvalds authored
      Pull NTB updates from Jon Mason:
       "Bug fixes for a few printing issues, link status detection bug on AMD
        hardware, and a DMA address issue with ntb_perf.
      
        Also, large series of AMD NTB patches"
      
      * tag 'ntb-5.7' of git://github.com/jonmason/ntb: (21 commits)
        NTB: add pci shutdown handler for AMD NTB
        NTB: send DB event when driver is loaded or un-loaded
        NTB: remove redundant setting of DB valid mask
        NTB: return link up status correctly for PRI and SEC
        NTB: add helper functions to set and clear sideinfo
        NTB: move ntb_ctrl handling to init and deinit
        NTB: handle link up, D0 and D3 events correctly
        NTB: handle link down event correctly
        NTB: remove handling of peer_sta from amd_link_is_up
        NTB: set peer_sta within event handler itself
        NTB: return the side info status from amd_poll_link
        NTB: define a new function to get link status
        NTB: Enable link up and down event notification
        NTB: clear interrupt status register
        NTB: Fix access to link status and control register
        MAINTAINERS: update maintainer list for AMD NTB driver
        NTB: ntb_transport: Use scnprintf() for avoiding potential buffer overflow
        ntb_hw_switchtec: Fix ntb_mw_clear_trans error if size == 0
        ntb_tool: Fix printk format
        NTB: ntb_perf: Fix address err in perf_copy_chunk
        ...
      56a451b7
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v5.7-1' of git://git.infradead.org/linux-platform-drivers-x86 · dba43fc4
      Linus Torvalds authored
      Pull x86 platform driver updates from Andy Shevchenko:
      
       - Fix for improper handling of fan_boost_mode in sysfs for ASUS
         laptops.
      
       - On newer ASUS laptops the 1st battery is named differently, here is a
         fix.
      
       - Fix Lex 2I385SW to allow both network cards to be used.
      
       - The power integrated circuit driver for Surface 3 has been added.
      
       - Refactor and clean up of Intel PMC driver and enable it on Intel
         Jasper Lake.
      
       - Clean up of Dell RBU driver.
      
       - Big update for Intel Speed Select technology support tool and driver.
      
      * tag 'platform-drivers-x86-v5.7-1' of git://git.infradead.org/linux-platform-drivers-x86: (75 commits)
        platform/x86: surface3_power: Fix always true condition in mshw0011_space_handler()
        platform/x86: surface3_power: Fix Kconfig section ordering
        platform/x86: surface3_power: Add missed headers
        platform/x86: surface3_power: Reformat GUID assignment
        platform/x86: surface3_power: Drop useless macro ACPI_PTR()
        platform/x86: surface3_power: Prefix POLL_INTERVAL with SURFACE_3
        platform/x86: surface3_power: Simplify mshw0011_adp_psr() to one liner
        platform/x86: surface3_power: Use dev_err() instead of pr_err()
        platform/x86: surface3_power: Drop unused structure definition
        platform/x86: surface3_power: MSHW0011 rev-eng implementation
        platform/x86: intel_pmc_core: Make pmc_core_substate_res_show() generic
        platform/x86: intel_pmc_core: Make pmc_core_lpm_display() generic for platforms that support sub-states
        tools/power/x86/intel-speed-select: Fix a typo in error message
        tools/power/x86/intel-speed-select: Update version
        tools/power/x86/intel-speed-select: Avoid duplicate Package strings for json
        tools/power/x86/intel-speed-select: Add display for enabled cpus count
        tools/power/x86/intel-speed-select: Print friendly warning for bad command line
        tools/power/x86/intel-speed-select: Fix avx options for turbo-freq feature
        tools/power/x86/intel-speed-select: Improve CLX commands
        tools/power/x86/intel-speed-select: Show error for invalid CPUs in the options
        ...
      dba43fc4
    • Linus Torvalds's avatar
      Merge tag 'tty-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 1f944f97
      Linus Torvalds authored
      Pull tty/serial updates from Greg KH:
       "Here is the big set of TTY / Serial patches for 5.7-rc1
      
        Lots of console fixups and reworking in here, serial core tweaks
        (doesn't that ever get old, why are we still creating new serial
        devices?), serial driver updates, line-protocol driver updates, and
        some vt cleanups and fixes included in here as well.
      
        All have been in linux-next with no reported issues"
      
      * tag 'tty-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (161 commits)
        serial: 8250: Optimize irq enable after console write
        serial: 8250: Fix rs485 delay after console write
        vt: vt_ioctl: fix use-after-free in vt_in_use()
        vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
        tty: serial: make SERIAL_SPRD depend on COMMON_CLK
        tty: serial: fsl_lpuart: fix return value checking
        tty: serial: fsl_lpuart: move dma_request_chan()
        ARM: dts: tango4: Make /serial compatible with ns16550a
        ARM: dts: mmp*: Make the serial ports compatible with xscale-uart
        ARM: dts: mmp*: Fix serial port names
        ARM: dts: mmp2-brownstone: Don't redeclare phandle references
        ARM: dts: pxa*: Make the serial ports compatible with xscale-uart
        ARM: dts: pxa*: Fix serial port names
        ARM: dts: pxa*: Don't redeclare phandle references
        serial: omap: drop unused dt-bindings header
        serial: 8250: 8250_omap: Add DMA support for UARTs on K3 SoCs
        serial: 8250: 8250_omap: Work around errata causing spurious IRQs with DMA
        serial: 8250: 8250_omap: Extend driver data to pass FIFO trigger info
        serial: 8250: 8250_omap: Move locking out from __dma_rx_do_complete()
        serial: 8250: 8250_omap: Account for data in flight during DMA teardown
        ...
      1f944f97
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · dfabb077
      Linus Torvalds authored
      Pull MMC updates from Ulf Hansson:
       "MMC core:
         - Add support for host software queue for (e)MMC/SD
         - Throttle polling rate for CMD6
         - Update CMD13 busy condition check for CMD6 commands
         - Improve busy detect polling for erase/trim/discard/HPI
         - Fixup support for HW busy detection for HPI commands
         - Re-work and improve support for eMMC sanitize commands
      
        MMC host:
         - mmci:
             * Add support for sdmmc variant revision 2.0
         - mmci_sdmmc:
             * Improve support for busyend detection
             * Fixup support for signal voltage switch
             * Add support for tuning with delay block
         - mtk-sd:
             * Fix another SDIO irq issue
         - sdhci:
             * Disable native card detect when GPIO based type exist
         - sdhci:
             * Add option to defer request completion
         - sdhci_am654:
             * Add support to set a tap value per speed mode
         - sdhci-esdhc-imx:
             * Add support for i.MX8MM based variant
             * Fixup support for standard tuning on i.MX8 usdhc
             * Optimize for strobe/clock dll settings
             * Fixup support for system and runtime suspend/resume
         - sdhci-iproc:
             * Update regulator/bus-voltage management for bcm2711
         - sdhci-msm:
             * Prevent clock gating with PWRSAVE_DLL on broken variants
             * Fix management of CQE during SDHCI reset
         - sdhci-of-arasan:
             * Add support for auto tuning on ZynqMP based platforms
         - sdhci-omap:
             * Add support for system suspend/resume
         - sdhci-sprd:
             * Add support for HW busy detection
             * Enable support host software queue
         - sdhci-tegra:
             * Add support for HW busy detection
         - tmio/renesas_sdhi:
             * Enforce retune after runtime suspend
         - renesas_sdhi:
             * Use manual tap correction for HS400 on some variants
             * Add support for manual correction of tap values for tunings"
      
      * tag 'mmc-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (86 commits)
        mmc: cavium-octeon: remove nonsense variable coercion
        mmc: mediatek: fix SDIO irq issue
        mmc: mmci_sdmmc: Fix clear busyd0end irq flag
        dt-bindings: mmc: Fix node name in an example
        mmc: core: Re-work the code for eMMC sanitize
        mmc: sdhci: use FIELD_GET for preset value bit masks
        mmc: sdhci-of-at91: Display clock changes for debug purpose only
        mmc: sdhci: iproc: Add custom set_power() callback for bcm2711
        mmc: sdhci: am654: Use sdhci_set_power_and_voltage()
        mmc: sdhci: at91: Use sdhci_set_power_and_voltage()
        mmc: sdhci: milbeaut: Use sdhci_set_power_and_voltage()
        mmc: sdhci: arasan: Use sdhci_set_power_and_voltage()
        mmc: sdhci: Introduce sdhci_set_power_and_bus_voltage()
        mmc: vub300: Use scnprintf() for avoiding potential buffer overflow
        dt-bindings: mmc: synopsys-dw-mshc: fix clock-freq-min-max in example
        sdhci: tegra: Enable MMC_CAP_WAIT_WHILE_BUSY host capability
        sdhci: tegra: Implement Tegra specific set_timeout callback
        mmc: sdhci-omap: Add Support for Suspend/Resume
        mmc: renesas_sdhi: simplify execute_tuning
        mmc: renesas_sdhi: Use BITS_PER_LONG helper
        ...
      dfabb077
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 5b67fbfc
      Linus Torvalds authored
      Pull Kbuild updates from Masahiro Yamada:
       "Build system:
      
         - add CONFIG_UNUSED_KSYMS_WHITELIST, which will be useful to define a
           fixed set of export symbols for Generic Kernel Image (GKI)
      
         - allow to run 'make dt_binding_check' without .config
      
         - use full schema for checking DT examples in *.yaml files
      
         - make modpost fail for missing MODULE_IMPORT_NS(), which makes more
           sense because we know the produced modules are never loadable
      
         - Remove unused 'AS' variable
      
        Kconfig:
      
         - sanitize DEFCONFIG_LIST, and remove ARCH_DEFCONFIG from Kconfig
           files
      
         - relax the 'imply' behavior so that symbols implied by 'y' can
           become 'm'
      
         - make 'imply' obey 'depends on' in order to make 'imply' really weak
      
        Misc:
      
         - add documentation on building the kernel with Clang/LLVM
      
         - revive __HAVE_ARCH_STRLEN for 32bit sparc to use optimized strlen()
      
         - fix warning from deb-pkg builds when CONFIG_DEBUG_INFO=n
      
         - various script and Makefile cleanups"
      
      * tag 'kbuild-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (34 commits)
        Makefile: Update kselftest help information
        kbuild: deb-pkg: fix warning when CONFIG_DEBUG_INFO is unset
        kbuild: add outputmakefile to no-dot-config-targets
        kbuild: remove AS variable
        net: wan: wanxl: refactor the firmware rebuild rule
        net: wan: wanxl: use $(M68KCC) instead of $(M68KAS) for rebuilding firmware
        net: wan: wanxl: use allow to pass CROSS_COMPILE_M68k for rebuilding firmware
        kbuild: add comment about grouped target
        kbuild: add -Wall to KBUILD_HOSTCXXFLAGS
        kconfig: remove unused variable in qconf.cc
        sparc: revive __HAVE_ARCH_STRLEN for 32bit sparc
        kbuild: refactor Makefile.dtbinst more
        kbuild: compute the dtbs_install destination more simply
        Makefile: disallow data races on gcc-10 as well
        kconfig: make 'imply' obey the direct dependency
        kconfig: allow symbols implied by y to become m
        net: drop_monitor: use IS_REACHABLE() to guard net_dm_hw_report()
        modpost: return error if module is missing ns imports and MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=n
        modpost: rework and consolidate logging interface
        kbuild: allow to run dt_binding_check without kernel configuration
        ...
      5b67fbfc
    • Linus Torvalds's avatar
      Merge branch 'next-general' of... · a1629843
      Linus Torvalds authored
      Merge branch 'next-general' of git://git.kernel.org:/pub/scm/linux/kernel/git/jmorris/linux-security
      
      Pull security subsystem updates from James Morris:
       "Two minor updates for the core security subsystem:
      
         - kernel-doc warning fixes from Randy Dunlap
      
         - header cleanup from YueHaibing"
      
      * 'next-general' of git://git.kernel.org:/pub/scm/linux/kernel/git/jmorris/linux-security:
        security: remove duplicated include from security.h
        security: <linux/lsm_hooks.h>: fix all kernel-doc warnings
      a1629843
    • Linus Torvalds's avatar
      Merge tag 'selinux-pr-20200330' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux · b3aa112d
      Linus Torvalds authored
      Pull SELinux updates from Paul Moore:
       "We've got twenty SELinux patches for the v5.7 merge window, the
        highlights are below:
      
         - Deprecate setting /sys/fs/selinux/checkreqprot to 1.
      
           This flag was originally created to deal with legacy userspace and
           the READ_IMPLIES_EXEC personality flag. We changed the default from
           1 to 0 back in Linux v4.4 and now we are taking the next step of
           deprecating it, at some point in the future we will take the final
           step of rejecting 1.
      
         - Allow kernfs symlinks to inherit the SELinux label of the parent
           directory. In order to preserve backwards compatibility this is
           protected by the genfs_seclabel_symlinks SELinux policy capability.
      
         - Optimize how we store filename transitions in the kernel, resulting
           in some significant improvements to policy load times.
      
         - Do a better job calculating our internal hash table sizes which
           resulted in additional policy load improvements and likely general
           SELinux performance improvements as well.
      
         - Remove the unused initial SIDs (labels) and improve how we handle
           initial SIDs.
      
         - Enable per-file labeling for the bpf filesystem.
      
         - Ensure that we properly label NFS v4.2 filesystems to avoid a
           temporary unlabeled condition.
      
         - Add some missing XFS quota command types to the SELinux quota
           access controls.
      
         - Fix a problem where we were not updating the seq_file position
           index correctly in selinuxfs.
      
         - We consolidate some duplicated code into helper functions.
      
         - A number of list to array conversions.
      
         - Update Stephen Smalley's email address in MAINTAINERS"
      
      * tag 'selinux-pr-20200330' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
        selinux: clean up indentation issue with assignment statement
        NFS: Ensure security label is set for root inode
        MAINTAINERS: Update my email address
        selinux: avtab_init() and cond_policydb_init() return void
        selinux: clean up error path in policydb_init()
        selinux: remove unused initial SIDs and improve handling
        selinux: reduce the use of hard-coded hash sizes
        selinux: Add xfs quota command types
        selinux: optimize storage of filename transitions
        selinux: factor out loop body from filename_trans_read()
        security: selinux: allow per-file labeling for bpffs
        selinux: generalize evaluate_cond_node()
        selinux: convert cond_expr to array
        selinux: convert cond_av_list to array
        selinux: convert cond_list to array
        selinux: sel_avc_get_stat_idx should increase position index
        selinux: allow kernfs symlinks to inherit parent directory context
        selinux: simplify evaluate_cond_node()
        Documentation,selinux: deprecate setting checkreqprot to 1
        selinux: move status variables out of selinux_ss
      b3aa112d
    • Linus Torvalds's avatar
      Merge tag 'audit-pr-20200330' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit · 674d85eb
      Linus Torvalds authored
      Pull audit updates from Paul Moore:
       "We've got two audit patches for the v5.7 merge window with a stellar
        14 lines changed between the two patches. The patch descriptions are
        far more lengthy than the patches themselves, which is a very good
        thing for patches this size IMHO. The patches pass our test suites and
        a quick summary is below:
      
         - Stop logging inode information when updating an audit file watch.
      
           Since we are not changing the inode, or the fact that we are
           watching the associated file, the inode information is just noise
           that we can do without.
      
         - Fix a problem where mandatory audit records were missing their
           accompanying audit records (e.g. SYSCALL records were missing).
      
           The missing records often meant that we didn't have the necessary
           context to understand what was going on when the event occurred"
      
      * tag 'audit-pr-20200330' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
        audit: trigger accompanying records when no rules present
        audit: CONFIG_CHANGE don't log internal bookkeeping as an event
      674d85eb
    • Linus Torvalds's avatar
      Merge tag '5.7-rc-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6 · 645c248d
      Linus Torvalds authored
      Pull cifs updates from Steve French:
       "First part of cifs/smb3 changes for merge window (others are still
        being tested). Various RDMA (smbdirect) fixes, addition of SMB3.1.1
        POSIX support in readdir, 3 fixes for stable, and a fix for flock.
      
        Summary:
      
        New feature:
         - SMB3.1.1 POSIX support in readdir
      
        Fixes:
         - various RDMA (smbdirect) fixes
         - fix for flock
         - fallocate fix
         - some improved mount warnings
         - two timestamp related fixes
         - reconnect fix
         - three fixes for stable"
      
      * tag '5.7-rc-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6: (28 commits)
        cifs: update internal module version number
        cifs: Allocate encryption header through kmalloc
        cifs: smbd: Check and extend sender credits in interrupt context
        cifs: smbd: Calculate the correct maximum packet size for segmented SMBDirect send/receive
        smb3: use SMB2_SIGNATURE_SIZE define
        CIFS: Fix bug which the return value by asynchronous read is error
        CIFS: check new file size when extending file by fallocate
        SMB3: Minor cleanup of protocol definitions
        SMB3: Additional compression structures
        SMB3: Add new compression flags
        cifs: smb2pdu.h: Replace zero-length array with flexible-array member
        cifs: clear PF_MEMALLOC before exiting demultiplex thread
        cifs: cifspdu.h: Replace zero-length array with flexible-array member
        CIFS: Warn less noisily on default mount
        fs/cifs: fix gcc warning in sid_to_id
        cifs: allow unlock flock and OFD lock across fork
        cifs: do d_move in rename
        cifs: add SMB2_open() arg to return POSIX data
        cifs: plumb smb2 POSIX dir enumeration
        cifs: add smb2 POSIX info level
        ...
      645c248d
    • Linus Torvalds's avatar
      Merge tag 'gfs2-for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 018d21f5
      Linus Torvalds authored
      Pull gfs2 updates from Bob Peterson:
       "We've got a lot of patches (39) for this merge window. Most of these
        patches are related to corruption that occurs when journals are
        replayed. For example:
      
         1. A node fails while writing to the file system.
         2. Other nodes use the metadata that was once used by the failed
            node.
         3. When the node returns to the cluster, its journal is replayed, but
            the older metadata blocks overwrite the changes from step 2.
      
        Summary:
      
         - Fixed the recovery sequence to prevent corruption during journal
           replay.
      
         - Many bug fixes found during recovery testing.
      
         - New improved file system withdraw sequence.
      
         - Fixed how resource group buffers are managed.
      
         - Fixed how metadata revokes are tracked and written.
      
         - Improve processing of IO errors hit by daemons like logd and
           quotad.
      
         - Improved error checking in metadata writes.
      
         - Fixed how qadata quota data structures are managed"
      
      * tag 'gfs2-for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: (39 commits)
        gfs2: Fix oversight in gfs2_ail1_flush
        gfs2: change from write to read lock for sd_log_flush_lock in journal replay
        gfs2: instrumentation wrt ail1 stuck
        gfs2: don't lock sd_log_flush_lock in try_rgrp_unlink
        gfs2: Remove unnecessary gfs2_qa_{get,put} pairs
        gfs2: Split gfs2_rsqa_delete into gfs2_rs_delete and gfs2_qa_put
        gfs2: Change inode qa_data to allow multiple users
        gfs2: eliminate gfs2_rsqa_alloc in favor of gfs2_qa_alloc
        gfs2: Switch to list_{first,last}_entry
        gfs2: Clean up inode initialization and teardown
        gfs2: Additional information when gfs2_ail1_flush withdraws
        gfs2: leaf_dealloc needs to allocate one more revoke
        gfs2: allow journal replay to hold sd_log_flush_lock
        gfs2: don't allow releasepage to free bd still used for revokes
        gfs2: flesh out delayed withdraw for gfs2_log_flush
        gfs2: Do proper error checking for go_sync family of glops functions
        gfs2: Don't demote a glock until its revokes are written
        gfs2: drain the ail2 list after io errors
        gfs2: Withdraw in gfs2_ail1_flush if write_cache_pages fails
        gfs2: Do log_flush in gfs2_ail_empty_gl even if ail list is empty
        ...
      018d21f5
    • Linus Torvalds's avatar
      Merge tag 'for-5.7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 15c981d1
      Linus Torvalds authored
      Pull btrfs updates from David Sterba:
       "A number of core changes that make things work better in general, code
        is simpler and cleaner.
      
        Core changes:
      
         - per-inode file extent tree, for in memory tracking of contiguous
           extent ranges to make sure i_size adjustments are accurate
      
         - tree root structures are protected by reference counts, replacing
           SRCU that did not cover some cases
      
         - leak detector for tree root structures
      
         - per-transaction pinned extent tracking
      
         - buffer heads are replaced by bios for super block access
      
         - speedup of extent back reference resolution, on an example test
           scenario the runtime of send went down from a hour to minutes
      
         - factor out locking scheme used for subvolume writer and NOCOW
           exclusion, abstracted as DREW lock, double reader-writer exclusion
           (allow either readers or writers)
      
         - cleanup and abstract extent allocation policies, preparation for
           zoned device support
      
         - make reflink/clone_range work on inline extents
      
         - add more cancellation point for relocation, improves long response
           from 'balance cancel'
      
         - add page migration callback for data pages
      
         - switch to guid for uuids, with additional cleanups of the interface
      
         - make ranged full fsyncs more efficient
      
         - removal of obsolete ioctl flag BTRFS_SUBVOL_CREATE_ASYNC
      
         - remove b-tree readahead from delayed refs paths, avoiding seek and
           read unnecessary blocks
      
        Features:
      
         - v2 of ioctl to delete subvolumes, allowing to delete by id and more
           future extensions
      
        Fixes:
      
         - fix qgroup rescan worker that could block umount
      
         - fix crash during unmount due to race with delayed inode workers
      
         - fix dellaloc flushing logic that could create unnecessary chunks
           under heavy load
      
         - fix missing file extent item for hole after ranged fsync
      
         - several fixes in relocation error handling
      
        Other:
      
         - more documentation of relocation, device replace, space
           reservations
      
         - many random cleanups"
      
      * tag 'for-5.7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (210 commits)
        btrfs: fix missing semaphore unlock in btrfs_sync_file
        btrfs: use nofs allocations for running delayed items
        btrfs: sysfs: Use scnprintf() instead of snprintf()
        btrfs: do not resolve backrefs for roots that are being deleted
        btrfs: track reloc roots based on their commit root bytenr
        btrfs: restart relocate_tree_blocks properly
        btrfs: reloc: reorder reservation before root selection
        btrfs: do not readahead in build_backref_tree
        btrfs: do not use readahead for running delayed refs
        btrfs: Remove async_transid from btrfs_mksubvol/create_subvol/create_snapshot
        btrfs: Remove transid argument from btrfs_ioctl_snap_create_transid
        btrfs: Remove BTRFS_SUBVOL_CREATE_ASYNC support
        btrfs: kill the subvol_srcu
        btrfs: make btrfs_cleanup_fs_roots use the radix tree lock
        btrfs: don't take an extra root ref at allocation time
        btrfs: hold a ref on the root on the dead roots list
        btrfs: make inodes hold a ref on their roots
        btrfs: move the root freeing stuff into btrfs_put_root
        btrfs: move ino_cache_inode dropping out of btrfs_free_fs_root
        btrfs: make the extent buffer leak check per fs info
        ...
      15c981d1
    • Linus Torvalds's avatar
      Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt · 1455c699
      Linus Torvalds authored
      Pull fscrypt updates from Eric Biggers:
       "Add an ioctl FS_IOC_GET_ENCRYPTION_NONCE which retrieves a file's
        encryption nonce.
      
        This makes it easier to write automated tests which verify that
        fscrypt is doing the encryption correctly"
      
      * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt:
        ubifs: wire up FS_IOC_GET_ENCRYPTION_NONCE
        f2fs: wire up FS_IOC_GET_ENCRYPTION_NONCE
        ext4: wire up FS_IOC_GET_ENCRYPTION_NONCE
        fscrypt: add FS_IOC_GET_ENCRYPTION_NONCE ioctl
      1455c699