Skip to content
  1. Dec 06, 2019
    • Roi Dayan's avatar
      net/mlx5e: Fix freeing flow with kfree() and not kvfree() · a23dae79
      Roi Dayan authored
      Flows are allocated with kzalloc() so free with kfree().
      
      Fixes: 04de7dda
      
       ("net/mlx5e: Infrastructure for duplicated offloading of TC flows")
      Signed-off-by: default avatarRoi Dayan <roid@mellanox.com>
      Reviewed-by: default avatarEli Britstein <elibr@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      a23dae79
    • Eran Ben Elisha's avatar
      net/mlx5e: Fix SFF 8472 eeprom length · c431f859
      Eran Ben Elisha authored
      SFF 8472 eeprom length is 512 bytes. Fix module info return value to
      support 512 bytes read.
      
      Fixes: ace329f4
      
       ("net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query")
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Reviewed-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      c431f859
    • Huy Nguyen's avatar
      net/mlx5e: Query global pause state before setting prio2buffer · 73e65516
      Huy Nguyen authored
      When the user changes prio2buffer mapping while global pause is
      enabled, mlx5 driver incorrectly sets all active buffers
      (buffer that has at least one priority mapped) to lossy.
      
      Solution:
      If global pause is enabled, set all the active buffers to lossless
      in prio2buffer command.
      Also, add error message when buffer size is not enough to meet
      xoff threshold.
      
      Fixes: 0696d608
      
       ("net/mlx5e: Receive buffer configuration")
      Signed-off-by: default avatarHuy Nguyen <huyn@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      73e65516
    • Eran Ben Elisha's avatar
      net/mlx5e: Fix TXQ indices to be sequential · c55d8b10
      Eran Ben Elisha authored
      Cited patch changed (channel index, tc) => (TXQ index) mapping to be a
      static one, in order to keep indices consistent when changing number of
      channels or TCs.
      
      For 32 channels (OOB) and 8 TCs, real num of TXQs is 256.
      When reducing the amount of channels to 8, the real num of TXQs will be
      changed to 64.
      This indices method is buggy:
      - Channel #0, TC 3, the TXQ index is 96.
      - Index 8 is not valid, as there is no such TXQ from driver perspective
        (As it represents channel #8, TC 0, which is not valid with the above
        configuration).
      
      As part of driver's select queue, it calls netdev_pick_tx which returns an
      index in the range of real number of TXQs. Depends on the return value,
      with the examples above, driver could have returned index larger than the
      real number of tx queues, or crash the kernel as it tries to read invalid
      address of SQ which was not allocated.
      
      Fix that by allocating sequential TXQ indices, and hold a new mapping
      between (channel index, tc) => (real TXQ index). This mapping will be
      updated as part of priv channels activation, and is used in
      mlx5e_select_queue to find the selected queue index.
      
      The existing indices mapping (channel_tc2txq) is no longer needed, as it
      is used only for statistics structures and can be calculated on run time.
      Delete its definintion and updates.
      
      Fixes: 8bfaf07f
      
       ("net/mlx5e: Present SW stats when state is not opened")
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      c55d8b10
    • Mian Yousaf Kaukab's avatar
      net: thunderx: start phy before starting autonegotiation · a350d2e7
      Mian Yousaf Kaukab authored
      Since commit 2b3e88ea ("net: phy: improve phy state checking")
      phy_start_aneg() expects phy state to be >= PHY_UP. Call phy_start()
      before calling phy_start_aneg() during probe so that autonegotiation
      is initiated.
      
      As phy_start() takes care of calling phy_start_aneg(), drop the explicit
      call to phy_start_aneg().
      
      Network fails without this patch on Octeon TX.
      
      Fixes: 2b3e88ea
      
       ("net: phy: improve phy state checking")
      Signed-off-by: default avatarMian Yousaf Kaukab <ykaukab@suse.de>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a350d2e7
    • Taehee Yoo's avatar
      hsr: fix a NULL pointer dereference in hsr_dev_xmit() · df95467b
      Taehee Yoo authored
      hsr_dev_xmit() calls hsr_port_get_hsr() to find master node and that would
      return NULL if master node is not existing in the list.
      But hsr_dev_xmit() doesn't check return pointer so a NULL dereference
      could occur.
      
      Test commands:
          ip netns add nst
          ip link add veth0 type veth peer name veth1
          ip link add veth2 type veth peer name veth3
          ip link set veth1 netns nst
          ip link set veth3 netns nst
          ip link set veth0 up
          ip link set veth2 up
          ip link add hsr0 type hsr slave1 veth0 slave2 veth2
          ip a a 192.168.100.1/24 dev hsr0
          ip link set hsr0 up
          ip netns exec nst ip link set veth1 up
          ip netns exec nst ip link set veth3 up
          ip netns exec nst ip link add hsr1 type hsr slave1 veth1 slave2 veth3
          ip netns exec nst ip a a 192.168.100.2/24 dev hsr1
          ip netns exec nst ip link set hsr1 up
          hping3 192.168.100.2 -2 --flood &
          modprobe -rv hsr
      
      Splat looks like:
      [  217.351122][ T1635] kasan: CONFIG_KASAN_INLINE enabled
      [  217.352969][ T1635] kasan: GPF could be caused by NULL-ptr deref or user memory access
      [  217.354297][ T1635] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI
      [  217.355507][ T1635] CPU: 1 PID: 1635 Comm: hping3 Not tainted 5.4.0+ #192
      [  217.356472][ T1635] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
      [  217.357804][ T1635] RIP: 0010:hsr_dev_xmit+0x34/0x90 [hsr]
      [  217.373010][ T1635] Code: 48 8d be 00 0c 00 00 be 04 00 00 00 48 83 ec 08 e8 21 be ff ff 48 8d 78 10 48 ba 00 b
      [  217.376919][ T1635] RSP: 0018:ffff8880cd8af058 EFLAGS: 00010202
      [  217.377571][ T1635] RAX: 0000000000000000 RBX: ffff8880acde6840 RCX: 0000000000000002
      [  217.379465][ T1635] RDX: dffffc0000000000 RSI: 0000000000000004 RDI: 0000000000000010
      [  217.380274][ T1635] RBP: ffff8880acde6840 R08: ffffed101b440d5d R09: 0000000000000001
      [  217.381078][ T1635] R10: 0000000000000001 R11: ffffed101b440d5c R12: ffff8880bffcc000
      [  217.382023][ T1635] R13: ffff8880bffcc088 R14: 0000000000000000 R15: ffff8880ca675c00
      [  217.383094][ T1635] FS:  00007f060d9d1740(0000) GS:ffff8880da000000(0000) knlGS:0000000000000000
      [  217.384289][ T1635] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  217.385009][ T1635] CR2: 00007faf15381dd0 CR3: 00000000d523c001 CR4: 00000000000606e0
      [  217.385940][ T1635] Call Trace:
      [  217.386544][ T1635]  dev_hard_start_xmit+0x160/0x740
      [  217.387114][ T1635]  __dev_queue_xmit+0x1961/0x2e10
      [  217.388118][ T1635]  ? check_object+0xaf/0x260
      [  217.391466][ T1635]  ? __alloc_skb+0xb9/0x500
      [  217.392017][ T1635]  ? init_object+0x6b/0x80
      [  217.392629][ T1635]  ? netdev_core_pick_tx+0x2e0/0x2e0
      [  217.393175][ T1635]  ? __alloc_skb+0xb9/0x500
      [  217.393727][ T1635]  ? rcu_read_lock_sched_held+0x90/0xc0
      [  217.394331][ T1635]  ? rcu_read_lock_bh_held+0xa0/0xa0
      [  217.395013][ T1635]  ? kasan_unpoison_shadow+0x30/0x40
      [  217.395668][ T1635]  ? __kasan_kmalloc.constprop.4+0xa0/0xd0
      [  217.396280][ T1635]  ? __kmalloc_node_track_caller+0x3a8/0x3f0
      [  217.399007][ T1635]  ? __kasan_kmalloc.constprop.4+0xa0/0xd0
      [  217.400093][ T1635]  ? __kmalloc_reserve.isra.46+0x2e/0xb0
      [  217.401118][ T1635]  ? memset+0x1f/0x40
      [  217.402529][ T1635]  ? __alloc_skb+0x317/0x500
      [  217.404915][ T1635]  ? arp_xmit+0xca/0x2c0
      [ ... ]
      
      Fixes: 311633b6
      
       ("hsr: switch ->dellink() to ->ndo_uninit()")
      Acked-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      df95467b
  2. Dec 05, 2019
  3. Dec 04, 2019
    • Yoshiki Komachi's avatar
      cls_flower: Fix the behavior using port ranges with hw-offload · 8ffb055b
      Yoshiki Komachi authored
      The recent commit 5c72299f ("net: sched: cls_flower: Classify
      packets using port ranges") had added filtering based on port ranges
      to tc flower. However the commit missed necessary changes in hw-offload
      code, so the feature gave rise to generating incorrect offloaded flow
      keys in NIC.
      
      One more detailed example is below:
      
      $ tc qdisc add dev eth0 ingress
      $ tc filter add dev eth0 ingress protocol ip flower ip_proto tcp \
        dst_port 100-200 action drop
      
      With the setup above, an exact match filter with dst_port == 0 will be
      installed in NIC by hw-offload. IOW, the NIC will have a rule which is
      equivalent to the following one.
      
      $ tc qdisc add dev eth0 ingress
      $ tc filter add dev eth0 ingress protocol ip flower ip_proto tcp \
        dst_port 0 action drop
      
      The behavior was caused by the flow dissector which extracts packet
      data into the flow key in the tc flower. More specifically, regardless
      of exact match or specified port ranges, fl_init_dissector() set the
      FLOW_DISSECTOR_KEY_PORTS flag in struct flow_dissector to extract port
      numbers from skb in skb_flow_dissect() called by fl_classify(). Note
      that device drivers received the same struct flow_dissector object as
      used in skb_flow_dissect(). Thus, offloaded drivers could not identify
      which of these is used because the FLOW_DISSECTOR_KEY_PORTS flag was
      set to struct flow_dissector in either case.
      
      This patch adds the new FLOW_DISSECTOR_KEY_PORTS_RANGE flag and the new
      tp_range field in struct fl_flow_key to recognize which filters are applied
      to offloaded drivers. At this point, when filters based on port ranges
      passed to drivers, drivers return the EOPNOTSUPP error because they do
      not support the feature (the newly created FLOW_DISSECTOR_KEY_PORTS_RANGE
      flag).
      
      Fixes: 5c72299f
      
       ("net: sched: cls_flower: Classify packets using port ranges")
      Signed-off-by: default avatarYoshiki Komachi <komachi.yoshiki@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8ffb055b
    • Dust Li's avatar
      net: sched: fix dump qlen for sch_mq/sch_mqprio with NOLOCK subqueues · 2f23cd42
      Dust Li authored
      sch->q.len hasn't been set if the subqueue is a NOLOCK qdisc
       in mq_dump() and mqprio_dump().
      
      Fixes: ce679e8d
      
       ("net: sched: add support for TCQ_F_NOLOCK subqueues to sch_mqprio")
      Signed-off-by: default avatarDust Li <dust.li@linux.alibaba.com>
      Signed-off-by: default avatarTony Lu <tonylu@linux.alibaba.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2f23cd42
    • Eric Dumazet's avatar
      tcp: refactor tcp_retransmit_timer() · 0d580fbd
      Eric Dumazet authored
      It appears linux-4.14 stable needs a backport of commit
      88f8598d
      
       ("tcp: exit if nothing to retransmit on RTO timeout")
      
      Since tcp_rtx_queue_empty() is not in pre 4.15 kernels,
      let's refactor tcp_retransmit_timer() to only use tcp_rtx_queue_head()
      
      I will provide to stable teams the squashed patches.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Willem de Bruijn <willemb@google.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0d580fbd
    • Vladimir Oltean's avatar
      net: mscc: ocelot: unregister the PTP clock on deinit · 9385973f
      Vladimir Oltean authored
      Currently a switch driver deinit frees the regmaps, but the PTP clock is
      still out there, available to user space via /dev/ptpN. Any PTP
      operation is a ticking time bomb, since it will attempt to use the freed
      regmaps and thus trigger kernel panics:
      
      [    4.291746] fsl_enetc 0000:00:00.2 eth1: error -22 setting up slave phy
      [    4.291871] mscc_felix 0000:00:00.5: Failed to register DSA switch: -22
      [    4.308666] mscc_felix: probe of 0000:00:00.5 failed with error -22
      [    6.358270] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000088
      [    6.367090] Mem abort info:
      [    6.369888]   ESR = 0x96000046
      [    6.369891]   EC = 0x25: DABT (current EL), IL = 32 bits
      [    6.369892]   SET = 0, FnV = 0
      [    6.369894]   EA = 0, S1PTW = 0
      [    6.369895] Data abort info:
      [    6.369897]   ISV = 0, ISS = 0x00000046
      [    6.369899]   CM = 0, WnR = 1
      [    6.369902] user pgtable: 4k pages, 48-bit VAs, pgdp=00000020d58c7000
      [    6.369904] [0000000000000088] pgd=00000020d5912003, pud=00000020d5915003, pmd=0000000000000000
      [    6.369914] Internal error: Oops: 96000046 [#1] PREEMPT SMP
      [    6.420443] Modules linked in:
      [    6.423506] CPU: 1 PID: 262 Comm: phc_ctl Not tainted 5.4.0-03625-gb7b2a5dadd7f #204
      [    6.431273] Hardware name: LS1028A RDB Board (DT)
      [    6.435989] pstate: 40000085 (nZcv daIf -PAN -UAO)
      [    6.440802] pc : css_release+0x24/0x58
      [    6.444561] lr : regmap_read+0x40/0x78
      [    6.448316] sp : ffff800010513cc0
      [    6.451636] x29: ffff800010513cc0 x28: ffff002055873040
      [    6.456963] x27: 0000000000000000 x26: 0000000000000000
      [    6.462289] x25: 0000000000000000 x24: 0000000000000000
      [    6.467617] x23: 0000000000000000 x22: 0000000000000080
      [    6.472944] x21: ffff800010513d44 x20: 0000000000000080
      [    6.478270] x19: 0000000000000000 x18: 0000000000000000
      [    6.483596] x17: 0000000000000000 x16: 0000000000000000
      [    6.488921] x15: 0000000000000000 x14: 0000000000000000
      [    6.494247] x13: 0000000000000000 x12: 0000000000000000
      [    6.499573] x11: 0000000000000000 x10: 0000000000000000
      [    6.504899] x9 : 0000000000000000 x8 : 0000000000000000
      [    6.510225] x7 : 0000000000000000 x6 : ffff800010513cf0
      [    6.515550] x5 : 0000000000000000 x4 : 0000000fffffffe0
      [    6.520876] x3 : 0000000000000088 x2 : ffff800010513d44
      [    6.526202] x1 : ffffcada668ea000 x0 : ffffcada64d8b0c0
      [    6.531528] Call trace:
      [    6.533977]  css_release+0x24/0x58
      [    6.537385]  regmap_read+0x40/0x78
      [    6.540795]  __ocelot_read_ix+0x6c/0xa0
      [    6.544641]  ocelot_ptp_gettime64+0x4c/0x110
      [    6.548921]  ptp_clock_gettime+0x4c/0x58
      [    6.552853]  pc_clock_gettime+0x5c/0xa8
      [    6.556699]  __arm64_sys_clock_gettime+0x68/0xc8
      [    6.561331]  el0_svc_common.constprop.2+0x7c/0x178
      [    6.566133]  el0_svc_handler+0x34/0xa0
      [    6.569891]  el0_sync_handler+0x114/0x1d0
      [    6.573908]  el0_sync+0x140/0x180
      [    6.577232] Code: d503201f b00119a1 91022263 b27b7be4 (f9004663)
      [    6.583349] ---[ end trace d196b9b14cdae2da ]---
      [    6.587977] Kernel panic - not syncing: Fatal exception
      [    6.593216] SMP: stopping secondary CPUs
      [    6.597151] Kernel Offset: 0x4ada54400000 from 0xffff800010000000
      [    6.603261] PHYS_OFFSET: 0xffffd0a7c0000000
      [    6.607454] CPU features: 0x10002,21806008
      [    6.611558] Memory Limit: none
      
      And now that ocelot->ptp_clock is checked at exit, prevent a potential
      error where ptp_clock_register returned a pointer-encoded error, which
      we are keeping in the ocelot private data structure. So now,
      ocelot->ptp_clock is now either NULL or a valid pointer.
      
      Fixes: 4e3b0468
      
       ("net: mscc: PTP Hardware Clock (PHC) support")
      Cc: Antoine Tenart <antoine.tenart@bootlin.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9385973f
    • Danit Goldberg's avatar
      net/core: Populate VF index in struct ifla_vf_guid · 9aed6ae0
      Danit Goldberg authored
      In addition to filling the node_guid and port_guid attributes,
      there is a need to populate VF index too, otherwise users of netlink
      interface will see same VF index for all VFs.
      
      Fixes: 30aad417
      
       ("net/core: Add support for getting VF GUIDs")
      Signed-off-by: default avatarDanit Goldberg <danitg@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9aed6ae0
    • Nikolay Aleksandrov's avatar
      net: bridge: deny dev_set_mac_address() when unregistering · c4b4c421
      Nikolay Aleksandrov authored
      We have an interesting memory leak in the bridge when it is being
      unregistered and is a slave to a master device which would change the
      mac of its slaves on unregister (e.g. bond, team). This is a very
      unusual setup but we do end up leaking 1 fdb entry because
      dev_set_mac_address() would cause the bridge to insert the new mac address
      into its table after all fdbs are flushed, i.e. after dellink() on the
      bridge has finished and we call NETDEV_UNREGISTER the bond/team would
      release it and will call dev_set_mac_address() to restore its original
      address and that in turn will add an fdb in the bridge.
      One fix is to check for the bridge dev's reg_state in its
      ndo_set_mac_address callback and return an error if the bridge is not in
      NETREG_REGISTERED.
      
      Easy steps to reproduce:
       1. add bond in mode != A/B
       2. add any slave to the bond
       3. add bridge dev as a slave to the bond
       4. destroy the bridge device
      
      Trace:
       unreferenced object 0xffff888035c4d080 (size 128):
         comm "ip", pid 4068, jiffies 4296209429 (age 1413.753s)
         hex dump (first 32 bytes):
           41 1d c9 36 80 88 ff ff 00 00 00 00 00 00 00 00  A..6............
           d2 19 c9 5e 3f d7 00 00 00 00 00 00 00 00 00 00  ...^?...........
         backtrace:
           [<00000000ddb525dc>] kmem_cache_alloc+0x155/0x26f
           [<00000000633ff1e0>] fdb_create+0x21/0x486 [bridge]
           [<0000000092b17e9c>] fdb_insert+0x91/0xdc [bridge]
           [<00000000f2a0f0ff>] br_fdb_change_mac_address+0xb3/0x175 [bridge]
           [<000000001de02dbd>] br_stp_change_bridge_id+0xf/0xff [bridge]
           [<00000000ac0e32b1>] br_set_mac_address+0x76/0x99 [bridge]
           [<000000006846a77f>] dev_set_mac_address+0x63/0x9b
           [<00000000d30738fc>] __bond_release_one+0x3f6/0x455 [bonding]
           [<00000000fc7ec01d>] bond_netdev_event+0x2f2/0x400 [bonding]
           [<00000000305d7795>] notifier_call_chain+0x38/0x56
           [<0000000028885d4a>] call_netdevice_notifiers+0x1e/0x23
           [<000000008279477b>] rollback_registered_many+0x353/0x6a4
           [<0000000018ef753a>] unregister_netdevice_many+0x17/0x6f
           [<00000000ba854b7a>] rtnl_delete_link+0x3c/0x43
           [<00000000adf8618d>] rtnl_dellink+0x1dc/0x20a
           [<000000009b6395fd>] rtnetlink_rcv_msg+0x23d/0x268
      
      Fixes: 43598813
      
       ("bridge: add local MAC address to forwarding table (v2)")
      Reported-by: default avatar <syzbot+2add91c08eb181fea1bf@syzkaller.appspotmail.com>
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c4b4c421
    • Dan Carpenter's avatar
      net: fix a leak in register_netdevice() · 42c17fa6
      Dan Carpenter authored
      We have to free "dev->name_node" on this error path.
      
      Fixes: ff927412
      
       ("net: introduce name_node struct to be used in hashlist")
      Reported-by: default avatar <syzbot+6e13e65ffbaa33757bcb@syzkaller.appspotmail.com>
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      42c17fa6
    • David S. Miller's avatar
      Merge tag 'linux-can-fixes-for-5.5-20191203' of... · 56e7a2f8
      David S. Miller authored
      
      Merge tag 'linux-can-fixes-for-5.5-20191203' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can 2019-12-03
      
      this is a pull request of 6 patches for net/master.
      
      The first two patches are against the MAINTAINERS file and adds Appana
      Durga Kedareswara rao as maintainer for the xilinx-can driver and Sriram
      Dash for the m_can (mmio) driver.
      
      The next patch is by Jouni Hogander and fixes a use-after-free in the
      slcan driver.
      
      Johan Hovold's patch for the ucan driver fixes the non-atomic allocation
      in the completion handler.
      
      The last two patches target the xilinx-can driver. The first one is by
      Venkatesh Yadav Abbarapu and skips the error message on deferred probe,
      the second one is by Srinivas Neeli and fixes the usage of the skb after
      can_put_echo_skb().
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      56e7a2f8
  4. Dec 03, 2019
  5. Dec 02, 2019
    • Aurelien Jarno's avatar
      libbpf: Fix readelf output parsing on powerpc with recent binutils · 3464afdf
      Aurelien Jarno authored
      
      
      On powerpc with recent versions of binutils, readelf outputs an extra
      field when dumping the symbols of an object file. For example:
      
          35: 0000000000000838    96 FUNC    LOCAL  DEFAULT [<localentry>: 8]     1 btf_is_struct
      
      The extra "[<localentry>: 8]" prevents the GLOBAL_SYM_COUNT variable to
      be computed correctly and causes the check_abi target to fail.
      
      Fix that by looking for the symbol name in the last field instead of the
      8th one. This way it should also cope with future extra fields.
      
      Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Tested-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/bpf/20191201195728.4161537-1-aurelien@aurel32.net
      3464afdf
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 596cf45c
      Linus Torvalds authored
      Merge updates from Andrew Morton:
       "Incoming:
      
         - a small number of updates to scripts/, ocfs2 and fs/buffer.c
      
         - most of MM
      
        I still have quite a lot of material (mostly not MM) staged after
        linux-next due to -next dependencies. I'll send those across next week
        as the preprequisites get merged up"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (135 commits)
        mm/page_io.c: annotate refault stalls from swap_readpage
        mm/Kconfig: fix trivial help text punctuation
        mm/Kconfig: fix indentation
        mm/memory_hotplug.c: remove __online_page_set_limits()
        mm: fix typos in comments when calling __SetPageUptodate()
        mm: fix struct member name in function comments
        mm/shmem.c: cast the type of unmap_start to u64
        mm: shmem: use proper gfp flags for shmem_writepage()
        mm/shmem.c: make array 'values' static const, makes object smaller
        userfaultfd: require CAP_SYS_PTRACE for UFFD_FEATURE_EVENT_FORK
        fs/userfaultfd.c: wp: clear VM_UFFD_MISSING or VM_UFFD_WP during userfaultfd_register()
        userfaultfd: wrap the common dst_vma check into an inlined function
        userfaultfd: remove unnecessary WARN_ON() in __mcopy_atomic_hugetlb()
        userfaultfd: use vma_pagesize for all huge page size calculation
        mm/madvise.c: use PAGE_ALIGN[ED] for range checking
        mm/madvise.c: replace with page_size() in madvise_inject_error()
        mm/mmap.c: make vma_merge() comment more easy to understand
        mm/hwpoison-inject: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops
        autonuma: reduce cache footprint when scanning page tables
        autonuma: fix watermark checking in migrate_balanced_pgdat()
        ...
      596cf45c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · c3bfc5dd
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix several scatter gather list issues in kTLS code, from Jakub
          Kicinski.
      
       2) macb driver device remove has to kill the hresp_err_tasklet. From
          Chuhong Yuan.
      
       3) Several memory leak and reference count bug fixes in tipc, from Tung
          Nguyen.
      
       4) Fix mlx5 build error w/o ipv6, from Yue Haibing.
      
       5) Fix jumbo frame and other regressions in r8169, from Heiner
          Kallweit.
      
       6) Undo some BUG_ON()'s and replace them with WARN_ON_ONCE and proper
          error propagation/handling. From Paolo Abeni.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (24 commits)
        openvswitch: remove another BUG_ON()
        openvswitch: drop unneeded BUG_ON() in ovs_flow_cmd_build_info()
        net: phy: realtek: fix using paged operations with RTL8105e / RTL8208
        r8169: fix resume on cable plug-in
        r8169: fix jumbo configuration for RTL8168evl
        net: emulex: benet: indent a Kconfig depends continuation line
        selftests: forwarding: fix race between packet receive and tc check
        net: sched: fix `tc -s class show` no bstats on class with nolock subqueues
        net: ethernet: ti: ale: ensure vlan/mdb deleted when no members
        net/mlx5e: Fix build error without IPV6
        selftests: pmtu: use -oneline for ip route list cache
        tipc: fix duplicate SYN messages under link congestion
        tipc: fix wrong timeout input for tipc_wait_for_cond()
        tipc: fix wrong socket reference counter after tipc_sk_timeout() returns
        tipc: fix potential memory leak in __tipc_sendmsg()
        net: macb: add missed tasklet_kill
        selftests: bpf: correct perror strings
        selftests: bpf: test_sockmap: handle file creation failures gracefully
        net/tls: use sg_next() to walk sg entries
        net/tls: remove the dead inplace_crypto code
        ...
      c3bfc5dd
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e5b3fc12
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Various fixes:
      
         - Fix the PAT performance regression that downgraded write-combining
           device memory regions to uncached.
      
         - There's been a number of bugs in 32-bit double fault handling -
           hopefully all fixed now.
      
         - Fix an LDT crash
      
         - Fix an FPU over-optimization that broke with GCC9 code
           optimizations.
      
         - Misc cleanups"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm/pat: Fix off-by-one bugs in interval tree search
        x86/ioperm: Save an indentation level in tss_update_io_bitmap()
        x86/fpu: Don't cache access to fpu_fpregs_owner_ctx
        x86/entry/32: Remove unused 'restore_all_notrace' local label
        x86/ptrace: Document FSBASE and GSBASE ABI oddities
        x86/ptrace: Remove set_segment_reg() implementations for current
        x86/traps: die() instead of panicking on a double fault
        x86/doublefault/32: Rewrite the x86_32 #DF handler and unify with 64-bit
        x86/doublefault/32: Move #DF stack and TSS to cpu_entry_area
        x86/doublefault/32: Rename doublefault.c to doublefault_32.c
        x86/traps: Disentangle the 32-bit and 64-bit doublefault code
        lkdtm: Add a DOUBLE_FAULT crash type on x86
        selftests/x86/single_step_syscall: Check SYSENTER directly
        x86/mm/32: Sync only to VMALLOC_END in vmalloc_sync_all()
      e5b3fc12
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b7fcf31f
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
      
       - Make /sys/devices/cpu/rdpmc based RDPMC enforcement more
         instantaneous
      
       - decoder: Update the Intel opcode map
      
       - Various tooling fixes, including a few late optimizations and
         cleanups.
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits)
        perf script: Fix invalid LBR/binary mismatch error
        perf script: Fix brstackinsn for AUXTRACE
        perf affinity: Add infrastructure to save/restore affinity
        perf pmu: Use file system cache to optimize sysfs access
        perf regs: Make perf_reg_name() return "unknown" instead of NULL
        perf diff: Use llabs() with 64-bit values
        perf diff: Use llabs() with 64-bit values
        perf/x86: Implement immediate enforcement of /sys/devices/cpu/rdpmc value of 0
        perf tools: Allow to link with libbpf dynamicaly
        perf tests: Rename tests/map_groups.c to tests/maps.c
        perf tests: Rename thread-mg-share to thread-maps-share
        perf maps: Rename map_groups.h to maps.h
        perf maps: Rename 'mg' variables to 'maps'
        perf map_symbol: Rename ms->mg to ms->maps
        perf addr_location: Rename al->mg to al->maps
        perf thread: Rename thread->mg to thread->maps
        perf maps: Merge 'struct maps' with 'struct map_groups'
        x86/insn: perf tools: Add some more instructions to the new instructions test
        x86/insn: Add some more Intel instructions to the opcode map
        perf map: Remove unused functions
        ...
      b7fcf31f
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 72c0870e
      Linus Torvalds authored
      Pull input updates from Dmitry Torokhov:
      
       - updates to Ilitech driver to support ILI2117
      
       - face lift of st1232 driver to support MT-B protocol
      
       - a new driver for i.MX system controller keys
      
       - mpr121 driver now supports polling mode
      
       - various input drivers have been switched away from input_polled_dev
         to use polled mode of regular input devices
      
       - other assorted cleanups and fixes
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (70 commits)
        Input: synaptics-rmi4 - fix various V4L2 compliance problems in F54
        Input: synaptics - switch another X1 Carbon 6 to RMI/SMbus
        Input: fix Kconfig indentation
        Input: imx_sc_key - correct SCU message structure to avoid stack corruption
        Input: ili210x - optionally show calibrate sysfs attribute
        Input: ili210x - add resolution to chip operations structure
        Input: ili210x - do not retrieve/print chip firmware version
        Input: mms114 - use device_get_match_data
        Input: ili210x - remove unneeded suspend and resume handlers
        Input: ili210x - do not unconditionally mark touchscreen as wakeup source
        Input: ili210x - define and use chip operations structure
        Input: ili210x - do not set parent device explicitly
        Input: ili210x - handle errors from input_mt_init_slots()
        Input: ili210x - switch to using threaded IRQ
        Input: ili210x - add ILI2117 support
        dt-bindings: input: touchscreen: ad7879: generic node names in example
        Input: ar1021 - fix typo in preprocessor macro name
        Input: synaptics-rmi4 - simplify data read in rmi_f54_work
        Input: kxtj9 - switch to using polled mode of input devices
        Input: kxtj9 - switch to using managed resources
        ...
      72c0870e