24 Mar, 2017

8 commits

  • Commit:

    aa1f1a639621 ("lib/syscall: Pin the task stack in collect_syscall()")

    ... added logic to handle a process stack not existing, but left sp and pc
    uninitialized, which can be later reported via /proc/$pid/syscall for zombie
    processes, potentially exposing kernel memory to userspace.

    Zombie /proc/$pid/syscall before:
    -1 0xffffffff9a060100 0xffff92f42d6ad900

    Zombie /proc/$pid/syscall after:
    -1 0x0 0x0

    Reported-by: Robert Święcki
    Signed-off-by: Kees Cook
    Reviewed-by: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: stable@vger.kernel.org # v4.9+
    Fixes: aa1f1a639621 ("lib/syscall: Pin the task stack in collect_syscall()")
    Link: http://lkml.kernel.org/r/20170323224616.GA92694@beast
    Signed-off-by: Ingo Molnar

    Kees Cook
     
  • Pull power management fixes from Rafael Wysocki:
    "One of these is an intel_pstate regression fix and it is not a small
    change, but it mostly removes code that shouldn't be there. That code
    was acquired by mistake and has been a source of constant pain since
    then, so the time has come to get rid of it finally. We have not seen
    problems with this change in the lab, so fingers crossed.

    The rest is more usual: one more intel_pstate commit removing useless
    code, a cpufreq core fix to make it restore policy limits on CPU
    online (which prevents the limits from being reset over system
    suspend/resume), a schedutil cpufreq governor initialization fix to
    make it actually work as advertised on all systems and an extra sanity
    check in the cpuidle core to prevent crashes from happening if the
    arch code messes things up.

    Specifics:

    - Make intel_pstate use one set of global P-state limits in the
    active mode regardless of the scaling_governor settings for
    individual CPUs instead of switching back and forth between two of
    them in a way that is hard to control (Rafael Wysocki).

    - Drop a useless function from intel_pstate to prevent it from
    modifying the maximum supported frequency value unexpectedly which
    may confuse the cpufreq core (Rafael Wysocki).

    - Fix the cpufreq core to restore policy limits on CPU online so that
    the limits are not reset over system suspend/resume, among other
    things (Viresh Kumar).

    - Fix the initialization of the schedutil cpufreq governor to make
    the IO-wait boosting mechanism in it actually work on systems with
    one CPU per cpufreq policy (Rafael Wysocki).

    - Add a sanity check to the cpuidle core to prevent crashes from
    happening if the architecture code initialization fails to set up
    things as expected (Vaidyanathan Srinivasan)"

    * tag 'pm-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    cpufreq: Restore policy min/max limits on CPU online
    cpuidle: Validate cpu_dev in cpuidle_add_sysfs()
    cpufreq: intel_pstate: Fix policy data management in passive mode
    cpufreq: schedutil: Fix per-CPU structure initialization in sugov_start()
    cpufreq: intel_pstate: One set of global limits in active mode

    Linus Torvalds
     
  • Pull input fixes from Dmitry Torokhov:
    "Fixes to various USB drivers to validate existence of endpoints before
    trying to use them, fixes to APLS v8 protocol, and a couple of i8042
    quirks"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: ALPS - fix trackstick button handling on V8 devices
    Input: ALPS - fix V8+ protocol handling (73 03 28)
    Input: sur40 - validate number of endpoints before using them
    Input: kbtab - validate number of endpoints before using them
    Input: hanwang - validate number of endpoints before using them
    Input: yealink - validate number of endpoints before using them
    Input: ims-pcu - validate number of endpoints before using them
    Input: cm109 - validate number of endpoints before using them
    Input: iforce - validate number of endpoints before using them
    Input: elan_i2c - add ASUS EeeBook X205TA special touchpad fw
    Input: i8042 - add TUXEDO BU1406 (N24_25BU) to the nomux list
    Input: synaptics-rmi4 - prevent null pointer dereference in f30
    Input: i8042 - add noloop quirk for Dell Embedded Box PC 3000

    Linus Torvalds
     
  • * pm-cpuidle-fixes:
    cpuidle: Validate cpu_dev in cpuidle_add_sysfs()

    Rafael J. Wysocki
     
  • * pm-cpufreq-fixes:
    cpufreq: Restore policy min/max limits on CPU online

    * pm-cpufreq-sched-fixes:
    cpufreq: schedutil: Fix per-CPU structure initialization in sugov_start()

    * intel_pstate-fixes:
    cpufreq: intel_pstate: Fix policy data management in passive mode
    cpufreq: intel_pstate: One set of global limits in active mode

    Rafael J. Wysocki
     
  • Pull sound fixes from Takashi Iwai:
    "This contains the collection of small fixes for 4.11 that were pending
    during my vacation:

    - a few HD-audio quirks (more Dell headset support, docking station
    support on HP laptops)

    - a regression fix for the previous ctxfi DMA mask fix

    - a correction of the new CONFIG_SND_X86 menu entry

    - a fix for the races in ALSA sequencer core spotted by syzkaller"

    * tag 'sound-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda - Adding a group of pin definition to fix headset problem
    ALSA: seq: Fix racy cell insertions during snd_seq_pool_done()
    ALSA: x86: Make CONFIG_SND_X86 bool
    ALSA: hda - add support for docking station for HP 840 G3
    ALSA: hda - add support for docking station for HP 820 G2
    ALSA: ctxfi: Fix the incorrect check of dma_set_mask() call

    Linus Torvalds
     
  • Pull btrfs fixes from Chris Mason:
    "Zygo tracked down a very old bug with inline compressed extents.

    I didn't tag this one for stable because I want to do individual
    tested backports. It's a little tricky and I'd rather do some extra
    testing on it along the way"

    * 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    btrfs: add missing memset while reading compressed inline extents
    Btrfs: fix regression in lock_delalloc_pages
    btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h

    Linus Torvalds
     
  • Pull networking fixes from David Miller:

    1) Several netfilter fixes from Pablo and the crew:
    - Handle fragmented packets properly in netfilter conntrack, from
    Florian Westphal.
    - Fix SCTP ICMP packet handling, from Ying Xue.
    - Fix big-endian bug in nftables, from Liping Zhang.
    - Fix alignment of fake conntrack entry, from Steven Rostedt.

    2) Fix feature flags setting in fjes driver, from Taku Izumi.

    3) Openvswitch ipv6 tunnel source address not set properly, from Or
    Gerlitz.

    4) Fix jumbo MTU handling in amd-xgbe driver, from Thomas Lendacky.

    5) sk->sk_frag.page not released properly in some cases, from Eric
    Dumazet.

    6) Fix RTNL deadlocks in nl80211, from Johannes Berg.

    7) Fix erroneous RTNL lockdep splat in crypto, from Herbert Xu.

    8) Cure improper inflight handling during AF_UNIX GC, from Andrey
    Ulanov.

    9) sch_dsmark doesn't write to packet headers properly, from Eric
    Dumazet.

    10) Fix SCM_TIMESTAMPING_OPT_STATS handling in TCP, from Soheil Hassas
    Yeganeh.

    11) Add some IDs for Motorola qmi_wwan chips, from Tony Lindgren.

    12) Fix nametbl deadlock in tipc, from Ying Xue.

    13) GRO and LRO packets not counted correctly in mlx5 driver, from Gal
    Pressman.

    14) Fix reset of internal PHYs in bcmgenet, from Doug Berger.

    15) Fix hashmap allocation handling, from Alexei Starovoitov.

    16) nl_fib_input() needs stronger netlink message length checking, from
    Eric Dumazet.

    17) Fix double-free of sk->sk_filter during sock clone, from Daniel
    Borkmann.

    18) Fix RX checksum offloading in aquantia driver, from Pavel Belous.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (85 commits)
    net:ethernet:aquantia: Fix for RX checksum offload.
    amd-xgbe: Fix the ECC-related bit position definitions
    sfc: cleanup a condition in efx_udp_tunnel_del()
    Bluetooth: btqcomsmd: fix compile-test dependency
    inet: frag: release spinlock before calling icmp_send()
    tcp: initialize icsk_ack.lrcvtime at session start time
    genetlink: fix counting regression on ctrl_dumpfamily()
    socket, bpf: fix sk_filter use after free in sk_clone_lock
    ipv4: provide stronger user input validation in nl_fib_input()
    bpf: fix hashmap extra_elems logic
    enic: update enic maintainers
    net: bcmgenet: remove bcmgenet_internal_phy_setup()
    ipv6: make sure to initialize sockc.tsflags before first use
    fjes: Do not load fjes driver if extended socket device is not power on.
    fjes: Do not load fjes driver if system does not have extended socket device.
    net/mlx5e: Count LRO packets correctly
    net/mlx5e: Count GSO packets correctly
    net/mlx5: Increase number of max QPs in default profile
    net/mlx5e: Avoid supporting udp tunnel port ndo for VF reps
    net/mlx5e: Use the proper UAPI values when offloading TC vlan actions
    ...

    Linus Torvalds
     

23 Mar, 2017

32 commits

  • A new Dell laptop needs to apply ALC269_FIXUP_DELL1_MIC_NO_PRESENCE to
    fix the headset problem, and the pin definiton of this machine is not
    in the pin quirk table yet, now adding it to the table.

    Signed-off-by: Hui Wang
    Cc:
    Signed-off-by: Takashi Iwai

    Hui Wang
     
  • Since AQC-100/107/108 chips supports hardware checksums for RX we should indicate this
    via NETIF_F_RXCSUM flag.

    v1->v2: 'Signed-off-by' tag added.

    Signed-off-by: Pavel Belous
    Signed-off-by: David S. Miller

    Pavel Belous
     
  • The ECC bit positions that describe whether the ECC interrupt is for
    Tx, Rx or descriptor memory and whether the it is a single correctable
    or double detected error were defined in incorrectly (reversed order).
    Fix the bit position definitions for these settings so that the proper
    ECC handling is performed.

    Signed-off-by: Tom Lendacky
    Signed-off-by: David S. Miller

    Lendacky, Thomas
     
  • Presumably if there is an "add" function, there is also a "del"
    function. But it causes a static checker warning because it looks like
    a common cut and paste bug.

    Signed-off-by: Dan Carpenter
    Acked-by: Jarod Wilson
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • compile-testing fails when QCOM_SMD is a loadable module:

    drivers/bluetooth/built-in.o: In function `btqcomsmd_send':
    btqca.c:(.text+0xa8): undefined reference to `qcom_smd_send'
    drivers/bluetooth/built-in.o: In function `btqcomsmd_probe':
    btqca.c:(.text+0x3ec): undefined reference to `qcom_wcnss_open_channel'
    btqca.c:(.text+0x46c): undefined reference to `qcom_smd_set_drvdata'

    This clarifies the dependency to allow compile-testing only when
    SMD is completely disabled, otherwise the dependency on QCOM_SMD
    will make sure we can link against it.

    Fixes: e27ee2b16bad ("Bluetooth: btqcomsmd: Allow driver to build if COMPILE_TEST is enabled")
    Signed-off-by: Arnd Bergmann
    [bjorn: Restructure and clarify dependency to QCOM_WCNSS_CTRL]
    Signed-off-by: Bjorn Andersson
    Acked-by: Marcel Holtmann
    Signed-off-by: David S. Miller

    Arnd Bergmann
     
  • Dmitry reported a lockdep splat [1] (false positive) that we can fix
    by releasing the spinlock before calling icmp_send() from ip_expire()

    This is a false positive because sending an ICMP message can not
    possibly re-enter the IP frag engine.

    [1]
    [ INFO: possible circular locking dependency detected ]
    4.10.0+ #29 Not tainted
    -------------------------------------------------------
    modprobe/12392 is trying to acquire lock:
    (_xmit_ETHER#2){+.-...}, at: [] spin_lock
    include/linux/spinlock.h:299 [inline]
    (_xmit_ETHER#2){+.-...}, at: [] __netif_tx_lock
    include/linux/netdevice.h:3486 [inline]
    (_xmit_ETHER#2){+.-...}, at: []
    sch_direct_xmit+0x282/0x6d0 net/sched/sch_generic.c:180

    but task is already holding lock:
    (&(&q->lock)->rlock){+.-...}, at: [] spin_lock
    include/linux/spinlock.h:299 [inline]
    (&(&q->lock)->rlock){+.-...}, at: []
    ip_expire+0x51/0x6c0 net/ipv4/ip_fragment.c:201

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -> #1 (&(&q->lock)->rlock){+.-...}:
    validate_chain kernel/locking/lockdep.c:2267 [inline]
    __lock_acquire+0x2149/0x3430 kernel/locking/lockdep.c:3340
    lock_acquire+0x2a1/0x630 kernel/locking/lockdep.c:3755
    __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
    _raw_spin_lock+0x33/0x50 kernel/locking/spinlock.c:151
    spin_lock include/linux/spinlock.h:299 [inline]
    ip_defrag+0x3a2/0x4130 net/ipv4/ip_fragment.c:669
    ip_check_defrag+0x4e3/0x8b0 net/ipv4/ip_fragment.c:713
    packet_rcv_fanout+0x282/0x800 net/packet/af_packet.c:1459
    deliver_skb net/core/dev.c:1834 [inline]
    dev_queue_xmit_nit+0x294/0xa90 net/core/dev.c:1890
    xmit_one net/core/dev.c:2903 [inline]
    dev_hard_start_xmit+0x16b/0xab0 net/core/dev.c:2923
    sch_direct_xmit+0x31f/0x6d0 net/sched/sch_generic.c:182
    __dev_xmit_skb net/core/dev.c:3092 [inline]
    __dev_queue_xmit+0x13e5/0x1e60 net/core/dev.c:3358
    dev_queue_xmit+0x17/0x20 net/core/dev.c:3423
    neigh_resolve_output+0x6b9/0xb10 net/core/neighbour.c:1308
    neigh_output include/net/neighbour.h:478 [inline]
    ip_finish_output2+0x8b8/0x15a0 net/ipv4/ip_output.c:228
    ip_do_fragment+0x1d93/0x2720 net/ipv4/ip_output.c:672
    ip_fragment.constprop.54+0x145/0x200 net/ipv4/ip_output.c:545
    ip_finish_output+0x82d/0xe10 net/ipv4/ip_output.c:314
    NF_HOOK_COND include/linux/netfilter.h:246 [inline]
    ip_output+0x1f0/0x7a0 net/ipv4/ip_output.c:404
    dst_output include/net/dst.h:486 [inline]
    ip_local_out+0x95/0x170 net/ipv4/ip_output.c:124
    ip_send_skb+0x3c/0xc0 net/ipv4/ip_output.c:1492
    ip_push_pending_frames+0x64/0x80 net/ipv4/ip_output.c:1512
    raw_sendmsg+0x26de/0x3a00 net/ipv4/raw.c:655
    inet_sendmsg+0x164/0x5b0 net/ipv4/af_inet.c:761
    sock_sendmsg_nosec net/socket.c:633 [inline]
    sock_sendmsg+0xca/0x110 net/socket.c:643
    ___sys_sendmsg+0x4a3/0x9f0 net/socket.c:1985
    __sys_sendmmsg+0x25c/0x750 net/socket.c:2075
    SYSC_sendmmsg net/socket.c:2106 [inline]
    SyS_sendmmsg+0x35/0x60 net/socket.c:2101
    do_syscall_64+0x2e8/0x930 arch/x86/entry/common.c:281
    return_from_SYSCALL_64+0x0/0x7a

    -> #0 (_xmit_ETHER#2){+.-...}:
    check_prev_add kernel/locking/lockdep.c:1830 [inline]
    check_prevs_add+0xa8f/0x19f0 kernel/locking/lockdep.c:1940
    validate_chain kernel/locking/lockdep.c:2267 [inline]
    __lock_acquire+0x2149/0x3430 kernel/locking/lockdep.c:3340
    lock_acquire+0x2a1/0x630 kernel/locking/lockdep.c:3755
    __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
    _raw_spin_lock+0x33/0x50 kernel/locking/spinlock.c:151
    spin_lock include/linux/spinlock.h:299 [inline]
    __netif_tx_lock include/linux/netdevice.h:3486 [inline]
    sch_direct_xmit+0x282/0x6d0 net/sched/sch_generic.c:180
    __dev_xmit_skb net/core/dev.c:3092 [inline]
    __dev_queue_xmit+0x13e5/0x1e60 net/core/dev.c:3358
    dev_queue_xmit+0x17/0x20 net/core/dev.c:3423
    neigh_hh_output include/net/neighbour.h:468 [inline]
    neigh_output include/net/neighbour.h:476 [inline]
    ip_finish_output2+0xf6c/0x15a0 net/ipv4/ip_output.c:228
    ip_finish_output+0xa29/0xe10 net/ipv4/ip_output.c:316
    NF_HOOK_COND include/linux/netfilter.h:246 [inline]
    ip_output+0x1f0/0x7a0 net/ipv4/ip_output.c:404
    dst_output include/net/dst.h:486 [inline]
    ip_local_out+0x95/0x170 net/ipv4/ip_output.c:124
    ip_send_skb+0x3c/0xc0 net/ipv4/ip_output.c:1492
    ip_push_pending_frames+0x64/0x80 net/ipv4/ip_output.c:1512
    icmp_push_reply+0x372/0x4d0 net/ipv4/icmp.c:394
    icmp_send+0x156c/0x1c80 net/ipv4/icmp.c:754
    ip_expire+0x40e/0x6c0 net/ipv4/ip_fragment.c:239
    call_timer_fn+0x241/0x820 kernel/time/timer.c:1268
    expire_timers kernel/time/timer.c:1307 [inline]
    __run_timers+0x960/0xcf0 kernel/time/timer.c:1601
    run_timer_softirq+0x21/0x80 kernel/time/timer.c:1614
    __do_softirq+0x31f/0xbe7 kernel/softirq.c:284
    invoke_softirq kernel/softirq.c:364 [inline]
    irq_exit+0x1cc/0x200 kernel/softirq.c:405
    exiting_irq arch/x86/include/asm/apic.h:657 [inline]
    smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:962
    apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:707
    __read_once_size include/linux/compiler.h:254 [inline]
    atomic_read arch/x86/include/asm/atomic.h:26 [inline]
    rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:350 [inline]
    __rcu_is_watching kernel/rcu/tree.c:1133 [inline]
    rcu_is_watching+0x83/0x110 kernel/rcu/tree.c:1147
    rcu_read_lock_held+0x87/0xc0 kernel/rcu/update.c:293
    radix_tree_deref_slot include/linux/radix-tree.h:238 [inline]
    filemap_map_pages+0x6d4/0x1570 mm/filemap.c:2335
    do_fault_around mm/memory.c:3231 [inline]
    do_read_fault mm/memory.c:3265 [inline]
    do_fault+0xbd5/0x2080 mm/memory.c:3370
    handle_pte_fault mm/memory.c:3600 [inline]
    __handle_mm_fault+0x1062/0x2cb0 mm/memory.c:3714
    handle_mm_fault+0x1e2/0x480 mm/memory.c:3751
    __do_page_fault+0x4f6/0xb60 arch/x86/mm/fault.c:1397
    do_page_fault+0x54/0x70 arch/x86/mm/fault.c:1460
    page_fault+0x28/0x30 arch/x86/entry/entry_64.S:1011

    other info that might help us debug this:

    Possible unsafe locking scenario:

    CPU0 CPU1
    ---- ----
    lock(&(&q->lock)->rlock);
    lock(_xmit_ETHER#2);
    lock(&(&q->lock)->rlock);
    lock(_xmit_ETHER#2);

    *** DEADLOCK ***

    10 locks held by modprobe/12392:
    #0: (&mm->mmap_sem){++++++}, at: []
    __do_page_fault+0x2b8/0xb60 arch/x86/mm/fault.c:1336
    #1: (rcu_read_lock){......}, at: []
    filemap_map_pages+0x1e6/0x1570 mm/filemap.c:2324
    #2: (&(ptlock_ptr(page))->rlock#2){+.+...}, at: []
    spin_lock include/linux/spinlock.h:299 [inline]
    #2: (&(ptlock_ptr(page))->rlock#2){+.+...}, at: []
    pte_alloc_one_map mm/memory.c:2944 [inline]
    #2: (&(ptlock_ptr(page))->rlock#2){+.+...}, at: []
    alloc_set_pte+0x13b8/0x1b90 mm/memory.c:3072
    #3: (((&q->timer))){+.-...}, at: []
    lockdep_copy_map include/linux/lockdep.h:175 [inline]
    #3: (((&q->timer))){+.-...}, at: []
    call_timer_fn+0x1c2/0x820 kernel/time/timer.c:1258
    #4: (&(&q->lock)->rlock){+.-...}, at: [] spin_lock
    include/linux/spinlock.h:299 [inline]
    #4: (&(&q->lock)->rlock){+.-...}, at: []
    ip_expire+0x51/0x6c0 net/ipv4/ip_fragment.c:201
    #5: (rcu_read_lock){......}, at: []
    ip_expire+0x1b3/0x6c0 net/ipv4/ip_fragment.c:216
    #6: (slock-AF_INET){+.-...}, at: [] spin_trylock
    include/linux/spinlock.h:309 [inline]
    #6: (slock-AF_INET){+.-...}, at: [] icmp_xmit_lock
    net/ipv4/icmp.c:219 [inline]
    #6: (slock-AF_INET){+.-...}, at: []
    icmp_send+0x803/0x1c80 net/ipv4/icmp.c:681
    #7: (rcu_read_lock_bh){......}, at: []
    ip_finish_output2+0x2c1/0x15a0 net/ipv4/ip_output.c:198
    #8: (rcu_read_lock_bh){......}, at: []
    __dev_queue_xmit+0x23e/0x1e60 net/core/dev.c:3324
    #9: (dev->qdisc_running_key ?: &qdisc_running_key){+.....}, at:
    [] dev_queue_xmit+0x17/0x20 net/core/dev.c:3423

    stack backtrace:
    CPU: 0 PID: 12392 Comm: modprobe Not tainted 4.10.0+ #29
    Hardware name: Google Google Compute Engine/Google Compute Engine,
    BIOS Google 01/01/2011
    Call Trace:

    __dump_stack lib/dump_stack.c:16 [inline]
    dump_stack+0x2ee/0x3ef lib/dump_stack.c:52
    print_circular_bug+0x307/0x3b0 kernel/locking/lockdep.c:1204
    check_prev_add kernel/locking/lockdep.c:1830 [inline]
    check_prevs_add+0xa8f/0x19f0 kernel/locking/lockdep.c:1940
    validate_chain kernel/locking/lockdep.c:2267 [inline]
    __lock_acquire+0x2149/0x3430 kernel/locking/lockdep.c:3340
    lock_acquire+0x2a1/0x630 kernel/locking/lockdep.c:3755
    __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
    _raw_spin_lock+0x33/0x50 kernel/locking/spinlock.c:151
    spin_lock include/linux/spinlock.h:299 [inline]
    __netif_tx_lock include/linux/netdevice.h:3486 [inline]
    sch_direct_xmit+0x282/0x6d0 net/sched/sch_generic.c:180
    __dev_xmit_skb net/core/dev.c:3092 [inline]
    __dev_queue_xmit+0x13e5/0x1e60 net/core/dev.c:3358
    dev_queue_xmit+0x17/0x20 net/core/dev.c:3423
    neigh_hh_output include/net/neighbour.h:468 [inline]
    neigh_output include/net/neighbour.h:476 [inline]
    ip_finish_output2+0xf6c/0x15a0 net/ipv4/ip_output.c:228
    ip_finish_output+0xa29/0xe10 net/ipv4/ip_output.c:316
    NF_HOOK_COND include/linux/netfilter.h:246 [inline]
    ip_output+0x1f0/0x7a0 net/ipv4/ip_output.c:404
    dst_output include/net/dst.h:486 [inline]
    ip_local_out+0x95/0x170 net/ipv4/ip_output.c:124
    ip_send_skb+0x3c/0xc0 net/ipv4/ip_output.c:1492
    ip_push_pending_frames+0x64/0x80 net/ipv4/ip_output.c:1512
    icmp_push_reply+0x372/0x4d0 net/ipv4/icmp.c:394
    icmp_send+0x156c/0x1c80 net/ipv4/icmp.c:754
    ip_expire+0x40e/0x6c0 net/ipv4/ip_fragment.c:239
    call_timer_fn+0x241/0x820 kernel/time/timer.c:1268
    expire_timers kernel/time/timer.c:1307 [inline]
    __run_timers+0x960/0xcf0 kernel/time/timer.c:1601
    run_timer_softirq+0x21/0x80 kernel/time/timer.c:1614
    __do_softirq+0x31f/0xbe7 kernel/softirq.c:284
    invoke_softirq kernel/softirq.c:364 [inline]
    irq_exit+0x1cc/0x200 kernel/softirq.c:405
    exiting_irq arch/x86/include/asm/apic.h:657 [inline]
    smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:962
    apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:707
    RIP: 0010:__read_once_size include/linux/compiler.h:254 [inline]
    RIP: 0010:atomic_read arch/x86/include/asm/atomic.h:26 [inline]
    RIP: 0010:rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:350 [inline]
    RIP: 0010:__rcu_is_watching kernel/rcu/tree.c:1133 [inline]
    RIP: 0010:rcu_is_watching+0x83/0x110 kernel/rcu/tree.c:1147
    RSP: 0000:ffff8801c391f120 EFLAGS: 00000a03 ORIG_RAX: ffffffffffffff10
    RAX: dffffc0000000000 RBX: ffff8801c391f148 RCX: 0000000000000000
    RDX: 0000000000000000 RSI: 000055edd4374000 RDI: ffff8801dbe1ae0c
    RBP: ffff8801c391f1a0 R08: 0000000000000002 R09: 0000000000000000
    R10: dffffc0000000000 R11: 0000000000000002 R12: 1ffff10038723e25
    R13: ffff8801dbe1ae00 R14: ffff8801c391f680 R15: dffffc0000000000

    rcu_read_lock_held+0x87/0xc0 kernel/rcu/update.c:293
    radix_tree_deref_slot include/linux/radix-tree.h:238 [inline]
    filemap_map_pages+0x6d4/0x1570 mm/filemap.c:2335
    do_fault_around mm/memory.c:3231 [inline]
    do_read_fault mm/memory.c:3265 [inline]
    do_fault+0xbd5/0x2080 mm/memory.c:3370
    handle_pte_fault mm/memory.c:3600 [inline]
    __handle_mm_fault+0x1062/0x2cb0 mm/memory.c:3714
    handle_mm_fault+0x1e2/0x480 mm/memory.c:3751
    __do_page_fault+0x4f6/0xb60 arch/x86/mm/fault.c:1397
    do_page_fault+0x54/0x70 arch/x86/mm/fault.c:1460
    page_fault+0x28/0x30 arch/x86/entry/entry_64.S:1011
    RIP: 0033:0x7f83172f2786
    RSP: 002b:00007fffe859ae80 EFLAGS: 00010293
    RAX: 000055edd4373040 RBX: 00007f83175111c8 RCX: 000055edd4373238
    RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007f8317510970
    RBP: 00007fffe859afd0 R08: 0000000000000009 R09: 0000000000000000
    R10: 0000000000000064 R11: 0000000000000000 R12: 000055edd4373040
    R13: 0000000000000000 R14: 00007fffe859afe8 R15: 0000000000000000

    Signed-off-by: Eric Dumazet
    Reported-by: Dmitry Vyukov
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • icsk_ack.lrcvtime has a 0 value at socket creation time.

    tcpi_last_data_recv can have bogus value if no payload is ever received.

    This patch initializes icsk_ack.lrcvtime for active sessions
    in tcp_finish_connect(), and for passive sessions in
    tcp_create_openreq_child()

    Signed-off-by: Eric Dumazet
    Acked-by: Neal Cardwell
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Commit 2ae0f17df1cd ("genetlink: use idr to track families") replaced

    if (++n < fams_to_skip)
    continue;
    into:

    if (n++ < fams_to_skip)
    continue;

    This subtle change cause that on retry ctrl_dumpfamily() call we omit
    one family that failed to do ctrl_fill_info() on previous call, because
    cb->args[0] = n number counts also family that failed to do
    ctrl_fill_info().

    Patch fixes the problem and avoid confusion in the future just decrease
    n counter when ctrl_fill_info() fail.

    User visible problem caused by this bug is failure to get access to
    some genetlink family i.e. nl80211. However problem is reproducible
    only if number of registered genetlink families is big enough to
    cause second call of ctrl_dumpfamily().

    Cc: Xose Vazquez Perez
    Cc: Larry Finger
    Cc: Johannes Berg
    Fixes: 2ae0f17df1cd ("genetlink: use idr to track families")
    Signed-off-by: Stanislaw Gruszka
    Acked-by: Johannes Berg
    Signed-off-by: David S. Miller

    Stanislaw Gruszka
     
  • In sk_clone_lock(), we create a new socket and inherit most of the
    parent's members via sock_copy() which memcpy()'s various sections.
    Now, in case the parent socket had a BPF socket filter attached,
    then newsk->sk_filter points to the same instance as the original
    sk->sk_filter.

    sk_filter_charge() is then called on the newsk->sk_filter to take a
    reference and should that fail due to hitting max optmem, we bail
    out and release the newsk instance.

    The issue is that commit 278571baca2a ("net: filter: simplify socket
    charging") wrongly combined the dismantle path with the failure path
    of xfrm_sk_clone_policy(). This means, even when charging failed, we
    call sk_free_unlock_clone() on the newsk, which then still points to
    the same sk_filter as the original sk.

    Thus, sk_free_unlock_clone() calls into __sk_destruct() eventually
    where it tests for present sk_filter and calls sk_filter_uncharge()
    on it, which potentially lets sk_omem_alloc wrap around and releases
    the eBPF prog and sk_filter structure from the (still intact) parent.

    Fix it by making sure that when sk_filter_charge() failed, we reset
    newsk->sk_filter back to NULL before passing to sk_free_unlock_clone(),
    so that we don't mess with the parents sk_filter.

    Only if xfrm_sk_clone_policy() fails, we did reach the point where
    either the parent's filter was NULL and as a result newsk's as well
    or where we previously had a successful sk_filter_charge(), thus for
    that case, we do need sk_filter_uncharge() to release the prior taken
    reference on sk_filter.

    Fixes: 278571baca2a ("net: filter: simplify socket charging")
    Signed-off-by: Daniel Borkmann
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Alexander reported a KMSAN splat caused by reads of uninitialized
    field (tb_id_in) from user provided struct fib_result_nl

    It turns out nl_fib_input() sanity tests on user input is a bit
    wrong :

    User can pretend nlh->nlmsg_len is big enough, but provide
    at sendmsg() time a too small buffer.

    Reported-by: Alexander Potapenko
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • In both kmalloc and prealloc mode the bpf_map_update_elem() is using
    per-cpu extra_elems to do atomic update when the map is full.
    There are two issues with it. The logic can be misused, since it allows
    max_entries+num_cpus elements to be present in the map. And alloc_extra_elems()
    at map creation time can fail percpu alloc for large map values with a warn:
    WARNING: CPU: 3 PID: 2752 at ../mm/percpu.c:892 pcpu_alloc+0x119/0xa60
    illegal size (32824) or align (8) for percpu allocation

    The fixes for both of these issues are different for kmalloc and prealloc modes.
    For prealloc mode allocate extra num_possible_cpus elements and store
    their pointers into extra_elems array instead of actual elements.
    Hence we can use these hidden(spare) elements not only when the map is full
    but during bpf_map_update_elem() that replaces existing element too.
    That also improves performance, since pcpu_freelist_pop/push is avoided.
    Unfortunately this approach cannot be used for kmalloc mode which needs
    to kfree elements after rcu grace period. Therefore switch it back to normal
    kmalloc even when full and old element exists like it was prior to
    commit 6c9059817432 ("bpf: pre-allocate hash map elements").

    Add tests to check for over max_entries and large map values.

    Reported-by: Dave Jones
    Fixes: 6c9059817432 ("bpf: pre-allocate hash map elements")
    Signed-off-by: Alexei Starovoitov
    Acked-by: Daniel Borkmann
    Acked-by: Martin KaFai Lau
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     
  • update enic maintainers

    Signed-off-by: Govindarajulu Varadarajan
    Signed-off-by: David S. Miller

    Govindarajulu Varadarajan
     
  • Commit 6ac3ce8295e6 ("net: bcmgenet: Remove excessive PHY reset")
    removed the bcmgenet_mii_reset() function from bcmgenet_power_up() and
    bcmgenet_internal_phy_setup() functions. In so doing it broke the reset
    of the internal PHY devices used by the GENETv1-GENETv3 which required
    this reset before the UniMAC was enabled. It also broke the internal
    GPHY devices used by the GENETv4 because the config_init that installed
    the AFE workaround was no longer occurring after the reset of the GPHY
    performed by bcmgenet_phy_power_set() in bcmgenet_internal_phy_setup().
    In addition the code in bcmgenet_internal_phy_setup() related to the
    "enable APD" comment goes with the bcmgenet_mii_reset() so it should
    have also been removed.

    Commit bd4060a6108b ("net: bcmgenet: Power on integrated GPHY in
    bcmgenet_power_up()") moved the bcmgenet_phy_power_set() call to the
    bcmgenet_power_up() function, but failed to remove it from the
    bcmgenet_internal_phy_setup() function. Had it done so, the
    bcmgenet_internal_phy_setup() function would have been empty and could
    have been removed at that time.

    Commit 5dbebbb44a6a ("net: bcmgenet: Software reset EPHY after power on")
    was submitted to correct the functional problems introduced by
    commit 6ac3ce8295e6 ("net: bcmgenet: Remove excessive PHY reset"). It
    was included in v4.4 and made available on 4.3-stable. Unfortunately,
    it didn't fully revert the commit because this bcmgenet_mii_reset()
    doesn't apply the soft reset to the internal GPHY used by GENETv4 like
    the previous one did. This prevents the restoration of the AFE work-
    arounds for internal GPHY devices after the bcmgenet_phy_power_set() in
    bcmgenet_internal_phy_setup().

    This commit takes the alternate approach of removing the unnecessary
    bcmgenet_internal_phy_setup() function which shouldn't have been in v4.3
    so that when bcmgenet_mii_reset() was restored it should have only gone
    into bcmgenet_power_up(). This will avoid the problems while also
    removing the redundancy (and hopefully some of the confusion).

    Fixes: 6ac3ce8295e6 ("net: bcmgenet: Remove excessive PHY reset")
    Signed-off-by: Doug Berger
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Doug Berger
     
  • In the case udp_sk(sk)->pending is AF_INET6, udpv6_sendmsg() would
    jump to do_append_data, skipping the initialization of sockc.tsflags.
    Fix the problem by moving sockc.tsflags initialization earlier.

    The bug was detected with KMSAN.

    Fixes: c14ac9451c34 ("sock: enable timestamping using control messages")
    Signed-off-by: Alexander Potapenko
    Acked-by: Soheil Hassas Yeganeh
    Signed-off-by: David S. Miller

    Alexander Potapenko
     
  • YASUAKI ISHIMATSU says:

    ====================
    fjes: Do not load fjes driver

    The fjes driver is used only by FUJITSU servers and almost of all
    servers in the world never use it. But currently if ACPI PNP0C02
    is defined in the ACPI table, the following message is always shown:

    "FUJITSU Extended Socket Network Device Driver - version 1.2
    - Copyright (c) 2015 FUJITSU LIMITED"

    The message makes users confused because there is no reason that
    the message is shown in other vendor servers.

    To avoid the confusion, the patch adds several checks.

    v3:
    - Rebase on latest net tree.
    - Add _STA method check to avoid loading fjes driver.

    v2:
    - Order local variable declarations from longest to shortest line
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • The extended device socket cannot turn on/off while system is running.
    So when system boots up and the device is not power on, the fjes driver
    does not need be loaded.

    To check the status of the device, the patch adds ACPI _STA method check.

    Signed-off-by: Yasuaki Ishimatsu
    CC: Taku Izumi
    Signed-off-by: David S. Miller

    Yasuaki Ishimatsu
     
  • The fjes driver is used only by FUJITSU servers and almost of all
    servers in the world never use it. But currently if ACPI PNP0C02
    is defined in the ACPI table, the following message is always shown:

    "FUJITSU Extended Socket Network Device Driver - version 1.2
    - Copyright (c) 2015 FUJITSU LIMITED"

    The message makes users confused because there is no reason that
    the message is shown in other vendor servers.

    To avoid the confusion, the patch adds a check that the server
    has a extended socket device or not.

    Signed-off-by: Yasuaki Ishimatsu
    CC: Taku Izumi
    Signed-off-by: David S. Miller

    Yasuaki Ishimatsu
     
  • Saeed Mahameed says:

    ====================
    Mellanox mlx5 fixes 2017-03-21

    This series contains some mlx5 core and ethernet driver fixes.

    For -stable:
    net/mlx5e: Count LRO packets correctly (for kernel >= 4.2)
    net/mlx5e: Count GSO packets correctly (for kernel >= 4.2)
    net/mlx5: Increase number of max QPs in default profile (for kernel >= 4.0)
    net/mlx5e: Avoid supporting udp tunnel port ndo for VF reps (for kernel >= 4.10)
    net/mlx5e: Use the proper UAPI values when offloading TC vlan actions (for kernel >= v4.9)
    net/mlx5: E-Switch, Don't allow changing inline mode when flows are configured (for kernel >= 4.10)
    net/mlx5e: Change the TC offload rule add/del code path to be per NIC or E-Switch (for kernel >= 4.10)
    net/mlx5: Add missing entries for set/query rate limit commands (for kernel >= 4.8)
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • RX packets statistics ('rx_packets' counter) used to count LRO packets
    as one, even though it contains multiple segments.
    This patch will increment the counter by the number of segments, and
    align the driver with the behavior of other drivers in the stack.

    Note that no information is lost in this patch due to 'rx_lro_packets'
    counter existence.

    Before, ethtool showed:
    $ ethtool -S ens6 | egrep "rx_packets|rx_lro_packets"
    rx_packets: 435277
    rx_lro_packets: 35847
    rx_packets_phy: 1935066

    Now, we will see the more logical statistics:
    $ ethtool -S ens6 | egrep "rx_packets|rx_lro_packets"
    rx_packets: 1935066
    rx_lro_packets: 35847
    rx_packets_phy: 1935066

    Fixes: e586b3b0baee ("net/mlx5: Ethernet Datapath files")
    Signed-off-by: Gal Pressman
    Cc: kernel-team@fb.com
    Signed-off-by: Saeed Mahameed
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Gal Pressman
     
  • TX packets statistics ('tx_packets' counter) used to count GSO packets
    as one, even though it contains multiple segments.
    This patch will increment the counter by the number of segments, and
    align the driver with the behavior of other drivers in the stack.

    Note that no information is lost in this patch due to 'tx_tso_packets'
    counter existence.

    Before, ethtool showed:
    $ ethtool -S ens6 | egrep "tx_packets|tx_tso_packets"
    tx_packets: 61340
    tx_tso_packets: 60954
    tx_packets_phy: 2451115

    Now, we will see the more logical statistics:
    $ ethtool -S ens6 | egrep "tx_packets|tx_tso_packets"
    tx_packets: 2451115
    tx_tso_packets: 60954
    tx_packets_phy: 2451115

    Fixes: e586b3b0baee ("net/mlx5: Ethernet Datapath files")
    Signed-off-by: Gal Pressman
    Cc: kernel-team@fb.com
    Signed-off-by: Saeed Mahameed
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Gal Pressman
     
  • With ConnectX-4 sharing SRQs from the same space as QPs, we hit a
    limit preventing some applications to allocate needed QPs amount.
    Double the size to 256K.

    Fixes: e126ba97dba9e ('mlx5: Add driver for Mellanox Connect-IB adapters')
    Signed-off-by: Maor Gottlieb
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Maor Gottlieb
     
  • This was added to allow the TC offloading code to identify offloading
    encap/decap vxlan rules.

    The VF reps are effectively related to the same mlx5 PCI device as the
    PF. Since the kernel invokes the (say) delete ndo for each netdev, the
    FW erred on multiple vxlan dst port deletes when the port was deleted
    from the system.

    We fix that by keeping the registration to be carried out only by the
    PF. Since the PF serves as the uplink device, the VF reps will look
    up a port there and realize if they are ok to offload that.

    Tested:


    ip link add vxlan1 type vxlan id 44 dev ens5f0 dstport 9999
    ip link set vxlan1 up
    ip link del dev vxlan1

    Fixes: 4a25730eb202 ('net/mlx5e: Add ndo_udp_tunnel_add to VF representors')
    Signed-off-by: Paul Blakey
    Reviewed-by: Or Gerlitz
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Paul Blakey
     
  • Currently we use the non UAPI values and we miss erring on
    the modify action which is not supported, fix that.

    Fixes: 8b32580df1cb ('net/mlx5e: Add TC vlan action for SRIOV offloads')
    Signed-off-by: Or Gerlitz
    Reported-by: Petr Machata
    Reviewed-by: Jiri Pirko
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • Changing the eswitch inline mode can potentially cause already configured
    flows not to match the policy. E.g. set policy L4, add some L4 rules,
    set policy to L2 --> bad! Hence we disallow it.

    Keep track of how many offloaded rules are now set and refuse
    inline mode changes if this isn't zero.

    Fixes: bffaa916588e ("net/mlx5: E-Switch, Add control for inline mode")
    Signed-off-by: Roi Dayan
    Reviewed-by: Or Gerlitz
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Roi Dayan
     
  • Refactor the code to deal with add/del TC rules to have handler per NIC/E-switch
    offloading use case, and push the latter into the e-switch code. This provides
    better separation and is to be used in down-stream patch for applying a fix.

    Fixes: bffaa916588e ("net/mlx5: E-Switch, Add control for inline mode")
    Signed-off-by: Or Gerlitz
    Reviewed-by: Roi Dayan
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • The switch cases for the rate limit set and query commands were
    missing, which could get us wrong under fw error or driver reset
    flow, fix that.

    Fixes: 1466cc5b23d1 ('net/mlx5: Rate limit tables support')
    Signed-off-by: Or Gerlitz
    Reviewed-by: Hadar Hen Zion
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • …m/linux/kernel/git/kvalo/wireless-drivers

    Kalle Valo says:

    ====================
    wireless-drivers fixes for 4.11

    iwlwifi

    * fix a user reported warning in DQA

    mwifiex

    * fix a potential double free
    * fix lost early debug logs
    * fix init wakeup warning message from device framework
    * add Ganapathi and Xinming as maintainers

    ath10k

    * fix regression with QCA6174 during resume and firmware crash
    ====================

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     
  • Until now, tipc_nametbl_unsubscribe() is called at subscriptions
    reference count cleanup. Usually the subscriptions cleanup is
    called at subscription timeout or at subscription cancel or at
    subscriber delete.

    We have ignored the possibility of this being called from other
    locations, which causes deadlock as we try to grab the
    tn->nametbl_lock while holding it already.

    CPU1: CPU2:
    ---------- ----------------
    tipc_nametbl_publish
    spin_lock_bh(&tn->nametbl_lock)
    tipc_nametbl_insert_publ
    tipc_nameseq_insert_publ
    tipc_subscrp_report_overlap
    tipc_subscrp_get
    tipc_subscrp_send_event
    tipc_close_conn
    tipc_subscrb_release_cb
    tipc_subscrb_delete
    tipc_subscrp_put
    tipc_subscrp_put
    tipc_subscrp_kref_release
    tipc_nametbl_unsubscribe
    spin_lock_bh(&tn->nametbl_lock)
    <>

    CPU1: CPU2:
    ---------- ----------------
    tipc_nametbl_stop
    spin_lock_bh(&tn->nametbl_lock)
    tipc_purge_publications
    tipc_nameseq_remove_publ
    tipc_subscrp_report_overlap
    tipc_subscrp_get
    tipc_subscrp_send_event
    tipc_close_conn
    tipc_subscrb_release_cb
    tipc_subscrb_delete
    tipc_subscrp_put
    tipc_subscrp_put
    tipc_subscrp_kref_release
    tipc_nametbl_unsubscribe
    spin_lock_bh(&tn->nametbl_lock)
    <>

    In this commit, we advance the calling of tipc_nametbl_unsubscribe()
    from the refcount cleanup to the intended callers.

    Fixes: d094c4d5f5c7 ("tipc: add subscription refcount to avoid invalid delete")
    Reported-by: John Thompson
    Acked-by: Jon Maloy
    Signed-off-by: Ying Xue
    Signed-off-by: Parthasarathy Bhuvaragan
    Signed-off-by: David S. Miller

    Ying Xue
     
  • This patch is to remove the unnecessary temporary variable 'err' from
    sctp_association_init.

    Signed-off-by: Xin Long
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    Xin Long
     
  • sctp_stream_free uses struct sctp_stream as a param, but struct sctp_stream
    is defined after it's declaration.

    This patch is to declare struct sctp_stream before sctp_stream_free.

    Fixes: a83863174a61 ("sctp: prepare asoc stream for stream reconf")
    Signed-off-by: Xin Long
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    Xin Long
     
  • With posix timers having become optional, we get a build error with
    the cpts time sync option of the CPSW driver:

    drivers/net/ethernet/ti/cpts.c: In function 'cpts_find_ts':
    drivers/net/ethernet/ti/cpts.c:291:23: error: implicit declaration of function 'ptp_classify_raw';did you mean 'ptp_classifier_init'? [-Werror=implicit-function-declaration]

    This adds a hard dependency on PTP_CLOCK to avoid the problem, as
    building it without PTP support makes no sense anyway.

    Fixes: baa73d9e478f ("posix-timers: Make them configurable")
    Cc: Nicolas Pitre
    Cc: stable@vger.kernel.org
    Signed-off-by: Arnd Bergmann
    Acked-by: Nicolas Pitre
    Signed-off-by: David S. Miller

    Arnd Bergmann
     
  • The dependency is reversed: cpsw and netcp call into cpts,
    but cpts depends on the other two in Kconfig. This can lead
    to cpts being a loadable module and its callers built-in:

    drivers/net/ethernet/ti/cpsw.o: In function `cpsw_remove':
    cpsw.c:(.text.cpsw_remove+0xd0): undefined reference to `cpts_release'
    drivers/net/ethernet/ti/cpsw.o: In function `cpsw_rx_handler':
    cpsw.c:(.text.cpsw_rx_handler+0x2dc): undefined reference to `cpts_rx_timestamp'
    drivers/net/ethernet/ti/cpsw.o: In function `cpsw_tx_handler':
    cpsw.c:(.text.cpsw_tx_handler+0x7c): undefined reference to `cpts_tx_timestamp'
    drivers/net/ethernet/ti/cpsw.o: In function `cpsw_ndo_stop':

    As a workaround, I'm introducing another Kconfig symbol to
    control the compilation of cpts, while making the actual
    module controlled by a silent symbol that is =y when necessary.

    Fixes: 6246168b4a38 ("net: ethernet: ti: netcp: add support of cpts")
    Signed-off-by: Arnd Bergmann
    Reviewed-by: Grygorii Strashko
    Signed-off-by: David S. Miller

    Arnd Bergmann