1. 07 11月, 2018 4 次提交
  2. 06 11月, 2018 11 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · a13511df
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Handle errors mid-stream of an all dump, from Alexey Kodanev.
      
       2) Fix build of openvswitch with certain combinations of netfilter
          options, from Arnd Bergmann.
      
       3) Fix interactions between GSO and BQL, from Eric Dumazet.
      
       4) Don't put a '/' in RTL8201F's sysfs file name, from Holger
          Hoffstätte.
      
       5) S390 qeth driver fixes from Julian Wiedmann.
      
       6) Allow ipv6 link local addresses for netconsole when both source and
          destination are link local, from Matwey V. Kornilov.
      
       7) Fix the BPF program address seen in /proc/kallsyms, from Song Liu.
      
       8) Initialize mutex before use in dsa microchip driver, from Tristram
          Ha.
      
       9) Out-of-bounds access in hns3, from Yunsheng Lin.
      
      10) Various netfilter fixes from Stefano Brivio, Jozsef Kadlecsik, Jiri
          Slaby, Florian Westphal, Eric Westbrook, Andrey Ryabinin, and Pablo
          Neira Ayuso.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (50 commits)
        net: alx: make alx_drv_name static
        net: bpfilter: fix iptables failure if bpfilter_umh is disabled
        sock_diag: fix autoloading of the raw_diag module
        net: core: netpoll: Enable netconsole IPv6 link local address
        ipv6: properly check return value in inet6_dump_all()
        rtnetlink: restore handling of dumpit return value in rtnl_dump_all()
        net/ipv6: Move anycast init/cleanup functions out of CONFIG_PROC_FS
        bonding/802.3ad: fix link_failure_count tracking
        net: phy: realtek: fix RTL8201F sysfs name
        sctp: define SCTP_SS_DEFAULT for Stream schedulers
        sctp: fix strchange_flags name for Stream Change Event
        mlxsw: spectrum: Fix IP2ME CPU policer configuration
        openvswitch: fix linking without CONFIG_NF_CONNTRACK_LABELS
        qed: fix link config error handling
        net: hns3: Fix for out-of-bounds access when setting pfc back pressure
        net/mlx4_en: use __netdev_tx_sent_queue()
        net: do not abort bulk send on BQL status
        net: bql: add __netdev_tx_sent_queue()
        s390/qeth: report 25Gbit link speed
        s390/qeth: sanitize ARP requests
        ...
      a13511df
    • A
      ARM: 8809/1: proc-v7: fix Thumb annotation of cpu_v7_hvc_switch_mm · 6282e916
      Ard Biesheuvel 提交于
      Due to what appears to be a copy/paste error, the opening ENTRY()
      of cpu_v7_hvc_switch_mm() lacks a matching ENDPROC(), and instead,
      the one for cpu_v7_smc_switch_mm() is duplicated.
      
      Given that it is ENDPROC() that emits the Thumb annotation, the
      cpu_v7_hvc_switch_mm() routine will be called in ARM mode on a
      Thumb2 kernel, resulting in the following splat:
      
        Internal error: Oops - undefined instruction: 0 [#1] SMP THUMB2
        Modules linked in:
        CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.18.0-rc1-00030-g4d28ad89189d-dirty #488
        Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
        PC is at cpu_v7_hvc_switch_mm+0x12/0x18
        LR is at flush_old_exec+0x31b/0x570
        pc : [<c0316efe>]    lr : [<c04117c7>]    psr: 00000013
        sp : ee899e50  ip : 00000000  fp : 00000001
        r10: eda28f34  r9 : eda31800  r8 : c12470e0
        r7 : eda1fc00  r6 : eda53000  r5 : 00000000  r4 : ee88c000
        r3 : c0316eec  r2 : 00000001  r1 : eda53000  r0 : 6da6c000
        Flags: nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
      
      Note the 'ISA ARM' in the last line.
      
      Fix this by using the correct name in ENDPROC().
      
      Cc: <stable@vger.kernel.org>
      Fixes: 10115105 ("ARM: spectre-v2: add firmware based hardening")
      Reviewed-by: NDave Martin <Dave.Martin@arm.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      6282e916
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · a422757e
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains the first batch of Netfilter fixes for
      your net tree:
      
      1) Fix splat with IPv6 defragmenting locally generated fragments,
         from Florian Westphal.
      
      2) Fix Incorrect check for missing attribute in nft_osf.
      
      3) Missing INT_MIN & INT_MAX definition for netfilter bridge uapi
         header, from Jiri Slaby.
      
      4) Revert map lookup in nft_numgen, this is already possible with
         the existing infrastructure without this extension.
      
      5) Fix wrong listing of set reference counter, make counter
         synchronous again, from Stefano Brivio.
      
      6) Fix CIDR 0 in hash:net,port,net, from Eric Westbrook.
      
      7) Fix allocation failure with large set, use kvcalloc().
         From Andrey Ryabinin.
      
      8) No need to disable BH when fetch ip set comment, patch from
         Jozsef Kadlecsik.
      
      9) Sanity check for valid sysfs entry in xt_IDLETIMER, from
         Taehee Yoo.
      
      10) Fix suspicious rcu usage via ip_set() macro at netlink dump,
          from Jozsef Kadlecsik.
      
      11) Fix setting default timeout via nfnetlink_cttimeout, this
          comes with preparation patch to add nf_{tcp,udp,...}_pernet()
          helper.
      
      12) Allow ebtables table nat to be of filter type via nft_compat.
          From Florian Westphal.
      
      13) Incorrect calculation of next bucket in early_drop, do no bump
          hash value, update bucket counter instead. From Vasily Khoruzhick.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a422757e
    • R
      net: alx: make alx_drv_name static · 71311931
      Rasmus Villemoes 提交于
      alx_drv_name is not used outside main.c, so there's no reason for it to
      have external linkage.
      Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      71311931
    • T
      net: bpfilter: fix iptables failure if bpfilter_umh is disabled · 97adadda
      Taehee Yoo 提交于
      When iptables command is executed, ip_{set/get}sockopt() try to upload
      bpfilter.ko if bpfilter is enabled. if it couldn't find bpfilter.ko,
      command is failed.
      bpfilter.ko is generated if CONFIG_BPFILTER_UMH is enabled.
      ip_{set/get}sockopt() only checks CONFIG_BPFILTER.
      So that if CONFIG_BPFILTER is enabled and CONFIG_BPFILTER_UMH is disabled,
      iptables command is always failed.
      
      test config:
         CONFIG_BPFILTER=y
         # CONFIG_BPFILTER_UMH is not set
      
      test command:
         %iptables -L
         iptables: No chain/target/match by that name.
      
      Fixes: d2ba09c1 ("net: add skeleton of bpfilter kernel module")
      Signed-off-by: NTaehee Yoo <ap420073@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      97adadda
    • A
      sock_diag: fix autoloading of the raw_diag module · c34c1287
      Andrei Vagin 提交于
      IPPROTO_RAW isn't registred as an inet protocol, so
      inet_protos[protocol] is always NULL for it.
      
      Cc: Cyrill Gorcunov <gorcunov@gmail.com>
      Cc: Xin Long <lucien.xin@gmail.com>
      Fixes: bf2ae2e4 ("sock_diag: request _diag module only when the family or proto has been registered")
      Signed-off-by: NAndrei Vagin <avagin@gmail.com>
      Reviewed-by: NCyrill Gorcunov <gorcunov@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c34c1287
    • M
      net: core: netpoll: Enable netconsole IPv6 link local address · d016b4a3
      Matwey V. Kornilov 提交于
      There is no reason to discard using source link local address when
      remote netconsole IPv6 address is set to be link local one.
      
      The patch allows administrators to use IPv6 netconsole without
      explicitly configuring source address:
      
          netconsole=@/,@fe80::5054:ff:fe2f:6012/
      Signed-off-by: NMatwey V. Kornilov <matwey@sai.msu.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d016b4a3
    • A
      ipv6: properly check return value in inet6_dump_all() · e22d0bfa
      Alexey Kodanev 提交于
      Make sure we call fib6_dump_end() if it happens that skb->len
      is zero. rtnl_dump_all() can reset cb->args on the next loop
      iteration there.
      
      Fixes: 08e814c9 ("net/ipv6: Bail early if user only wants cloned entries")
      Fixes: ae677bbb ("net: Don't return invalid table id error when dumping all families")
      Signed-off-by: NAlexey Kodanev <alexey.kodanev@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e22d0bfa
    • A
      rtnetlink: restore handling of dumpit return value in rtnl_dump_all() · 5e1acb4a
      Alexey Kodanev 提交于
      For non-zero return from dumpit() we should break the loop
      in rtnl_dump_all() and return the result. Otherwise, e.g.,
      we could get the memory leak in inet6_dump_fib() [1]. The
      pointer to the allocated struct fib6_walker there (saved
      in cb->args) can be lost, reset on the next iteration.
      
      Fix it by partially restoring the previous behavior before
      commit c63586dc ("net: rtnl_dump_all needs to propagate
      error from dumpit function"). The returned error from
      dumpit() is still passed further.
      
      [1]:
      unreferenced object 0xffff88001322a200 (size 96):
        comm "sshd", pid 1484, jiffies 4296032768 (age 1432.542s)
        hex dump (first 32 bytes):
          00 01 00 00 00 00 ad de 00 02 00 00 00 00 ad de  ................
          18 09 41 36 00 88 ff ff 18 09 41 36 00 88 ff ff  ..A6......A6....
        backtrace:
          [<0000000095846b39>] kmem_cache_alloc_trace+0x151/0x220
          [<000000007d12709f>] inet6_dump_fib+0x68d/0x940
          [<000000002775a316>] rtnl_dump_all+0x1d9/0x2d0
          [<00000000d7cd302b>] netlink_dump+0x945/0x11a0
          [<000000002f43485f>] __netlink_dump_start+0x55d/0x800
          [<00000000f76bbeec>] rtnetlink_rcv_msg+0x4fa/0xa00
          [<000000009b5761f3>] netlink_rcv_skb+0x29c/0x420
          [<0000000087a1dae1>] rtnetlink_rcv+0x15/0x20
          [<00000000691b703b>] netlink_unicast+0x4e3/0x6c0
          [<00000000b5be0204>] netlink_sendmsg+0x7f2/0xba0
          [<0000000096d2aa60>] sock_sendmsg+0xba/0xf0
          [<000000008c1b786f>] __sys_sendto+0x1e4/0x330
          [<0000000019587b3f>] __x64_sys_sendto+0xe1/0x1a0
          [<00000000071f4d56>] do_syscall_64+0x9f/0x300
          [<000000002737577f>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
          [<0000000057587684>] 0xffffffffffffffff
      
      Fixes: c63586dc ("net: rtnl_dump_all needs to propagate error from dumpit function")
      Signed-off-by: NAlexey Kodanev <alexey.kodanev@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5e1acb4a
    • J
      net/ipv6: Move anycast init/cleanup functions out of CONFIG_PROC_FS · 6915ed86
      Jeff Barnhill 提交于
      Move the anycast.c init and cleanup functions which were inadvertently
      added inside the CONFIG_PROC_FS definition.
      
      Fixes: 2384d025 ("net/ipv6: Add anycast addresses to a global hashtable")
      Signed-off-by: NJeff Barnhill <0xeffeff@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6915ed86
    • M
      compiler: remove __no_sanitize_address_or_inline again · 163c8d54
      Martin Schwidefsky 提交于
      The __no_sanitize_address_or_inline and __no_kasan_or_inline defines
      are almost identical. The only difference is that __no_kasan_or_inline
      does not have the 'notrace' attribute.
      
      To be able to replace __no_sanitize_address_or_inline with the older
      definition, add 'notrace' to __no_kasan_or_inline and change to two
      users of __no_sanitize_address_or_inline in the s390 code.
      
      The 'notrace' option is necessary for e.g. the __load_psw_mask function
      in arch/s390/include/asm/processor.h. Without the option it is possible
      to trace __load_psw_mask which leads to kernel stack overflow.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Pointed-out-by: NAndrey Ryabinin <aryabinin@virtuozzo.com>
      Acked-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      163c8d54
  3. 05 11月, 2018 8 次提交
    • M
      tracing/kprobes: Fix strpbrk() argument order · ee474b81
      Masami Hiramatsu 提交于
      Fix strpbrk()'s argument order, it must pass acceptable string
      in 2nd argument. Note that this can cause a kernel panic where
      it recovers backup character to code->data.
      
      Link: http://lkml.kernel.org/r/154108256792.2604.1816052586385217811.stgit@devbox
      
      Fixes: a6682814 ("tracing/kprobes: Allow kprobe-events to record module symbol")
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      ee474b81
    • J
      bonding/802.3ad: fix link_failure_count tracking · ea53abfa
      Jarod Wilson 提交于
      Commit 4d2c0cda set slave->link to
      BOND_LINK_DOWN for 802.3ad bonds whenever invalid speed/duplex values
      were read, to fix a problem with slaves getting into weird states, but
      in the process, broke tracking of link failures, as going straight to
      BOND_LINK_DOWN when a link is indeed down (cable pulled, switch rebooted)
      means we broke out of bond_miimon_inspect()'s BOND_LINK_DOWN case because
      !link_state was already true, we never incremented commit, and never got
      a chance to call bond_miimon_commit(), where slave->link_failure_count
      would be incremented. I believe the simple fix here is to mark the slave
      as BOND_LINK_FAIL, and let bond_miimon_inspect() transition the link from
      _FAIL to either _UP or _DOWN, and in the latter case, we now get proper
      incrementing of link_failure_count again.
      
      Fixes: 4d2c0cda ("bonding: speed/duplex update at NETDEV_UP event")
      CC: Mahesh Bandewar <maheshb@google.com>
      CC: David S. Miller <davem@davemloft.net>
      CC: netdev@vger.kernel.org
      CC: stable@vger.kernel.org
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ea53abfa
    • H
      net: phy: realtek: fix RTL8201F sysfs name · 0432e833
      Holger Hoffstätte 提交于
      Since 4.19 the following error in sysfs has appeared when using the
      r8169 NIC driver:
      
      $cd /sys/module/realtek/drivers
      $ls -l
      ls: cannot access 'mdio_bus:RTL8201F 10/100Mbps Ethernet': No such file or directory
      [..garbled dir entries follow..]
      
      Apparently the forward slash in "10/100Mbps Ethernet" is interpreted
      as directory separator that leads nowhere, and was introduced in commit
      513588dd ("net: phy: realtek: add RTL8201F phy-id and functions").
      
      Fix this by removing the offending slash in the driver name.
      
      Other drivers in net/phy seem to have the same problem, but I cannot
      test/verify them.
      
      Fixes: 513588dd ("net: phy: realtek: add RTL8201F phy-id and functions")
      Signed-off-by: NHolger Hoffstätte <holger@applied-asynchrony.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0432e833
    • L
      Linux 4.20-rc1 · 65102238
      Linus Torvalds 提交于
      65102238
    • L
      Merge tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs · 42bd06e9
      Linus Torvalds 提交于
      Pull UBIFS updates from Richard Weinberger:
      
       - Full filesystem authentication feature, UBIFS is now able to have the
         whole filesystem structure authenticated plus user data encrypted and
         authenticated.
      
       - Minor cleanups
      
      * tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs: (26 commits)
        ubifs: Remove unneeded semicolon
        Documentation: ubifs: Add authentication whitepaper
        ubifs: Enable authentication support
        ubifs: Do not update inode size in-place in authenticated mode
        ubifs: Add hashes and HMACs to default filesystem
        ubifs: authentication: Authenticate super block node
        ubifs: Create hash for default LPT
        ubfis: authentication: Authenticate master node
        ubifs: authentication: Authenticate LPT
        ubifs: Authenticate replayed journal
        ubifs: Add auth nodes to garbage collector journal head
        ubifs: Add authentication nodes to journal
        ubifs: authentication: Add hashes to index nodes
        ubifs: Add hashes to the tree node cache
        ubifs: Create functions to embed a HMAC in a node
        ubifs: Add helper functions for authentication support
        ubifs: Add separate functions to init/crc a node
        ubifs: Format changes for authentication support
        ubifs: Store read superblock node
        ubifs: Drop write_node
        ...
      42bd06e9
    • L
      Merge tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 4710e789
      Linus Torvalds 提交于
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Bugfix:
         - Fix build issues on architectures that don't provide 64-bit cmpxchg
      
        Cleanups:
         - Fix a spelling mistake"
      
      * tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: fix spelling mistake, EACCESS -> EACCES
        SUNRPC: Use atomic(64)_t for seq_send(64)
      4710e789
    • L
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 35e74524
      Linus Torvalds 提交于
      Pull more timer updates from Thomas Gleixner:
       "A set of commits for the new C-SKY architecture timers"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        dt-bindings: timer: gx6605s SOC timer
        clocksource/drivers/c-sky: Add gx6605s SOC system timer
        dt-bindings: timer: C-SKY Multi-processor timer
        clocksource/drivers/c-sky: Add C-SKY SMP timer
      35e74524
    • L
      Merge tag 'ntb-4.20' of git://github.com/jonmason/ntb · 04578e84
      Linus Torvalds 提交于
      Pull NTB updates from Jon Mason:
       "Fairly minor changes and bug fixes:
      
        NTB IDT thermal changes and hook into hwmon, ntb_netdev clean-up of
        private struct, and a few bug fixes"
      
      * tag 'ntb-4.20' of git://github.com/jonmason/ntb:
        ntb: idt: Alter the driver info comments
        ntb: idt: Discard temperature sensor IRQ handler
        ntb: idt: Add basic hwmon sysfs interface
        ntb: idt: Alter temperature read method
        ntb_netdev: Simplify remove with client device drvdata
        NTB: transport: Try harder to alloc an aligned MW buffer
        ntb: ntb_transport: Mark expected switch fall-throughs
        ntb: idt: Set PCIe bus address to BARLIMITx
        NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks
        ntb: intel: fix return value for ndev_vec_mask()
        ntb_netdev: fix sleep time mismatch
      04578e84
  4. 04 11月, 2018 17 次提交
    • X
      sctp: define SCTP_SS_DEFAULT for Stream schedulers · 12480e3b
      Xin Long 提交于
      According to rfc8260#section-4.3.2, SCTP_SS_DEFAULT is required to
      defined as SCTP_SS_FCFS or SCTP_SS_RR.
      
      SCTP_SS_FCFS is used for SCTP_SS_DEFAULT's value in this patch.
      
      Fixes: 5bbbbe32 ("sctp: introduce stream scheduler foundations")
      Reported-by: NJianwen Ji <jiji@redhat.com>
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12480e3b
    • X
      sctp: fix strchange_flags name for Stream Change Event · fd82d61b
      Xin Long 提交于
      As defined in rfc6525#section-6.1.3, SCTP_STREAM_CHANGE_DENIED
      and SCTP_STREAM_CHANGE_FAILED should be used instead of
      SCTP_ASSOC_CHANGE_DENIED and SCTP_ASSOC_CHANGE_FAILED.
      
      To keep the compatibility, fix it by adding two macros.
      
      Fixes: b444153f ("sctp: add support for generating add stream change event notification")
      Reported-by: NJianwen Ji <jiji@redhat.com>
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd82d61b
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 1e2d3c49
      David S. Miller 提交于
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf 2018-11-03
      
      The following pull-request contains BPF updates for your *net* tree.
      
      The main changes are:
      
      1) Fix BPF prog kallsyms and bpf_prog_get_info_by_fd() jited address export
         to not use page start but actual start instead to work correctly with
         profiling e.g. finding hot instructions from stack traces. Also fix latter
         with regards to dumping address and jited len for !multi prog, from Song.
      
      2) Fix bpf_prog_get_info_by_fd() for !root to zero info.nr_jited_func_lens
         instead of leaving the user provided length, from Daniel.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1e2d3c49
    • S
      mlxsw: spectrum: Fix IP2ME CPU policer configuration · 96801552
      Shalom Toledo 提交于
      The CPU policer used to police packets being trapped via a local route
      (IP2ME) was incorrectly configured to police based on bytes per second
      instead of packets per second.
      
      Change the policer to police based on packets per second and avoid
      packet loss under certain circumstances.
      
      Fixes: 9148e7cf ("mlxsw: spectrum: Add policers for trap groups")
      Signed-off-by: NShalom Toledo <shalomt@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      96801552
    • A
      openvswitch: fix linking without CONFIG_NF_CONNTRACK_LABELS · a277d516
      Arnd Bergmann 提交于
      When CONFIG_CC_OPTIMIZE_FOR_DEBUGGING is enabled, the compiler
      fails to optimize out a dead code path, which leads to a link failure:
      
      net/openvswitch/conntrack.o: In function `ovs_ct_set_labels':
      conntrack.c:(.text+0x2e60): undefined reference to `nf_connlabels_replace'
      
      In this configuration, we can take a shortcut, and completely
      remove the contrack label code. This may also help the regular
      optimization.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a277d516
    • A
      qed: fix link config error handling · 92619210
      Arnd Bergmann 提交于
      gcc-8 notices that qed_mcp_get_transceiver_data() may fail to
      return a result to the caller:
      
      drivers/net/ethernet/qlogic/qed/qed_mcp.c: In function 'qed_mcp_trans_speed_mask':
      drivers/net/ethernet/qlogic/qed/qed_mcp.c:1955:2: error: 'transceiver_type' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      When an error is returned by qed_mcp_get_transceiver_data(), we
      should propagate that to the caller of qed_mcp_trans_speed_mask()
      rather than continuing with uninitialized data.
      
      Fixes: c56a8be7 ("qed: Add supported link and advertise link to display in ethtool.")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      92619210
    • L
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 71e56028
      Linus Torvalds 提交于
      Pull scheduler fixes from Ingo Molnar:
       "A memory (under-)allocation fix and a comment fix"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/topology: Fix off by one bug
        sched/rt: Update comment in pick_next_task_rt()
      71e56028
    • L
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 601a8807
      Linus Torvalds 提交于
      Pull x86 fixes from Ingo Molnar:
       "A number of fixes and some late updates:
      
         - make in_compat_syscall() behavior on x86-32 similar to other
           platforms, this touches a number of generic files but is not
           intended to impact non-x86 platforms.
      
         - objtool fixes
      
         - PAT preemption fix
      
         - paravirt fixes/cleanups
      
         - cpufeatures updates for new instructions
      
         - earlyprintk quirk
      
         - make microcode version in sysfs world-readable (it is already
           world-readable in procfs)
      
         - minor cleanups and fixes"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        compat: Cleanup in_compat_syscall() callers
        x86/compat: Adjust in_compat_syscall() to generic code under !COMPAT
        objtool: Support GCC 9 cold subfunction naming scheme
        x86/numa_emulation: Fix uniform-split numa emulation
        x86/paravirt: Remove unused _paravirt_ident_32
        x86/mm/pat: Disable preemption around __flush_tlb_all()
        x86/paravirt: Remove GPL from pv_ops export
        x86/traps: Use format string with panic() call
        x86: Clean up 'sizeof x' => 'sizeof(x)'
        x86/cpufeatures: Enumerate MOVDIR64B instruction
        x86/cpufeatures: Enumerate MOVDIRI instruction
        x86/earlyprintk: Add a force option for pciserial device
        objtool: Support per-function rodata sections
        x86/microcode: Make revision and processor flags world-readable
      601a8807
    • L
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 01897f3e
      Linus Torvalds 提交于
      Pull perf updates and fixes from Ingo Molnar:
       "These are almost all tooling updates: 'perf top', 'perf trace' and
        'perf script' fixes and updates, an UAPI header sync with the merge
        window versions, license marker updates, much improved Sparc support
        from David Miller, and a number of fixes"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (66 commits)
        perf intel-pt/bts: Calculate cpumode for synthesized samples
        perf intel-pt: Insert callchain context into synthesized callchains
        perf tools: Don't clone maps from parent when synthesizing forks
        perf top: Start display thread earlier
        tools headers uapi: Update linux/if_link.h header copy
        tools headers uapi: Update linux/netlink.h header copy
        tools headers: Sync the various kvm.h header copies
        tools include uapi: Update linux/mmap.h copy
        perf trace beauty: Use the mmap flags table generated from headers
        perf beauty: Wire up the mmap flags table generator to the Makefile
        perf beauty: Add a generator for MAP_ mmap's flag constants
        tools include uapi: Update asound.h copy
        tools arch uapi: Update asm-generic/unistd.h and arm64 unistd.h copies
        tools include uapi: Update linux/fs.h copy
        perf callchain: Honour the ordering of PERF_CONTEXT_{USER,KERNEL,etc}
        perf cs-etm: Correct CPU mode for samples
        perf unwind: Take pgoff into account when reporting elf to libdwfl
        perf top: Do not use overwrite mode by default
        perf top: Allow disabling the overwrite mode
        perf trace: Beautify mount's first pathname arg
        ...
      01897f3e
    • L
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e9ebc215
      Linus Torvalds 提交于
      Pull irq fixes from Ingo Molnar:
       "An irqchip driver fix and a memory (over-)allocation fix"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe function
        irq/matrix: Fix memory overallocation
      e9ebc215
    • P
      sched/topology: Fix off by one bug · 993f0b05
      Peter Zijlstra 提交于
      With the addition of the NUMA identity level, we increased @level by
      one and will run off the end of the array in the distance sort loop.
      
      Fixed: 051f3ca0 ("sched/topology: Introduce NUMA identity node sched domain")
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      993f0b05
    • I
      23a12dde
    • Y
      net: hns3: Fix for out-of-bounds access when setting pfc back pressure · e8ccbb7d
      Yunsheng Lin 提交于
      The vport should be initialized to hdev->vport for each bp group,
      otherwise it will cause out-of-bounds access and bp setting not
      correct problem.
      
      [   35.254124] BUG: KASAN: slab-out-of-bounds in hclge_pause_setup_hw+0x2a0/0x3f8 [hclge]
      [   35.254126] Read of size 2 at addr ffff803b6651581a by task kworker/0:1/14
      
      [   35.254132] CPU: 0 PID: 14 Comm: kworker/0:1 Not tainted 4.19.0-rc7-hulk+ #85
      [   35.254133] Hardware name: Huawei D06/D06, BIOS Hisilicon D06 UEFI RC0 - B052 (V0.52) 09/14/2018
      [   35.254141] Workqueue: events work_for_cpu_fn
      [   35.254144] Call trace:
      [   35.254147]  dump_backtrace+0x0/0x2f0
      [   35.254149]  show_stack+0x24/0x30
      [   35.254154]  dump_stack+0x110/0x184
      [   35.254157]  print_address_description+0x168/0x2b0
      [   35.254160]  kasan_report+0x184/0x310
      [   35.254162]  __asan_load2+0x7c/0xa0
      [   35.254170]  hclge_pause_setup_hw+0x2a0/0x3f8 [hclge]
      [   35.254177]  hclge_tm_init_hw+0x794/0x9f0 [hclge]
      [   35.254184]  hclge_tm_schd_init+0x48/0x58 [hclge]
      [   35.254191]  hclge_init_ae_dev+0x778/0x1168 [hclge]
      [   35.254196]  hnae3_register_ae_dev+0x14c/0x298 [hnae3]
      [   35.254206]  hns3_probe+0x88/0xa8 [hns3]
      [   35.254210]  local_pci_probe+0x7c/0xf0
      [   35.254212]  work_for_cpu_fn+0x34/0x50
      [   35.254214]  process_one_work+0x4d4/0xa38
      [   35.254216]  worker_thread+0x55c/0x8d8
      [   35.254219]  kthread+0x1b0/0x1b8
      [   35.254222]  ret_from_fork+0x10/0x1c
      
      [   35.254224] The buggy address belongs to the page:
      [   35.254228] page:ffff7e00ed994400 count:1 mapcount:0 mapping:0000000000000000 index:0x0 compound_mapcount: 0
      [   35.273835] flags: 0xfffff8000008000(head)
      [   35.282007] raw: 0fffff8000008000 dead000000000100 dead000000000200 0000000000000000
      [   35.282010] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
      [   35.282012] page dumped because: kasan: bad access detected
      
      [   35.282014] Memory state around the buggy address:
      [   35.282017]  ffff803b66515700: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
      [   35.282019]  ffff803b66515780: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
      [   35.282021] >ffff803b66515800: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
      [   35.282022]                             ^
      [   35.282024]  ffff803b66515880: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
      [   35.282026]  ffff803b66515900: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
      [   35.282028] ==================================================================
      [   35.282029] Disabling lock debugging due to kernel taint
      [   35.282747] hclge driver initialization finished.
      
      Fixes: 67bf2541 ("net: hns3: Fixes the back pressure setting when sriov is enabled")
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e8ccbb7d
    • D
      Merge branch 'net-bql-better-deal-with-GSO' · cb53fd54
      David S. Miller 提交于
      Eric Dumazet says:
      
      ====================
      net: bql: better deal with GSO
      
      While BQL bulk dequeue works well for TSO packets, it is
      not very efficient as soon as GSO is involved.
      
      On a GSO only workload (UDP or TCP), this patch series
      can save about 8 % of cpu cycles on a 40Gbit mlx4 NIC,
      by keeping optimal batching, and avoiding expensive
      doorbells, qdisc requeues and reschedules.
      
      This patch series :
      
      - Add __netdev_tx_sent_queue() so that drivers
        can implement efficient BQL and xmit_more support.
      
      - Implement a work around in dev_hard_start_xmit()
        for drivers not using __netdev_tx_sent_queue()
      
      - changes mlx4 to use __netdev_tx_sent_queue()
      
      v2: Tariq and Willem feedback addressed.
          added __netdev_tx_sent_queue() (Willem suggestion)
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cb53fd54
    • E
      net/mlx4_en: use __netdev_tx_sent_queue() · c2973444
      Eric Dumazet 提交于
      doorbell only depends on xmit_more and netif_tx_queue_stopped()
      
      Using __netdev_tx_sent_queue() avoids messing with BQL stop flag,
      and is more generic.
      
      This patch increases performance on GSO workload by keeping
      doorbells to the minimum required.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Tariq Toukan <tariqt@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c2973444
    • E
      net: do not abort bulk send on BQL status · fe60faa5
      Eric Dumazet 提交于
      Before calling dev_hard_start_xmit(), upper layers tried
      to cook optimal skb list based on BQL budget.
      
      Problem is that GSO packets can end up comsuming more than
      the BQL budget.
      
      Breaking the loop is not useful, since requeued packets
      are ahead of any packets still in the qdisc.
      
      It is also more expensive, since next TX completion will
      push these packets later, while skbs are not in cpu caches.
      
      It is also a behavior difference with TSO packets, that can
      break the BQL limit by a large amount.
      
      Note that drivers should use __netdev_tx_sent_queue()
      in order to have optimal xmit_more support, and avoid
      useless atomic operations as shown in the following patch.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe60faa5
    • E
      net: bql: add __netdev_tx_sent_queue() · 3e59020a
      Eric Dumazet 提交于
      When qdisc_run() tries to use BQL budget to bulk-dequeue a batch
      of packets, GSO can later transform this list in another list
      of skbs, and each skb is sent to device ndo_start_xmit(),
      one at a time, with skb->xmit_more being set to one but
      for last skb.
      
      Problem is that very often, BQL limit is hit in the middle of
      the packet train, forcing dev_hard_start_xmit() to stop the
      bulk send and requeue the end of the list.
      
      BQL role is to avoid head of line blocking, making sure
      a qdisc can deliver high priority packets before low priority ones.
      
      But there is no way requeued packets can be bypassed by fresh
      packets in the qdisc.
      
      Aborting the bulk send increases TX softirqs, and hot cache
      lines (after skb_segment()) are wasted.
      
      Note that for TSO packets, we never split a packet in the middle
      because of BQL limit being hit.
      
      Drivers should be able to update BQL counters without
      flipping/caring about BQL status, if the current skb
      has xmit_more set.
      
      Upper layers are ultimately responsible to stop sending another
      packet train when BQL limit is hit.
      
      Code template in a driver might look like the following :
      
      	send_doorbell = __netdev_tx_sent_queue(tx_queue, nr_bytes, skb->xmit_more);
      
      Note that __netdev_tx_sent_queue() use is not mandatory,
      since following patch will change dev_hard_start_xmit()
      to not care about BQL status.
      
      But it is highly recommended so that xmit_more full benefits
      can be reached (less doorbells sent, and less atomic operations as well)
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3e59020a