25 Jan, 2021

1 commit


20 Jan, 2021

2 commits

  • This is the 5.10.8 stable release

    * tag 'v5.10.8': (104 commits)
    Linux 5.10.8
    tools headers UAPI: Sync linux/fscrypt.h with the kernel sources
    drm/panfrost: Remove unused variables in panfrost_job_close()
    ...

    Signed-off-by: Jason Liu

    Jason Liu
     
  • This is the 5.10.7 stable release

    * tag 'v5.10.7': (144 commits)
    Linux 5.10.7
    scsi: target: Fix XCOPY NAA identifier lookup
    rtlwifi: rise completion at the last step of firmware callback
    ...

    Signed-off-by: Jason Liu

    Jason Liu
     

18 Jan, 2021

1 commit


17 Jan, 2021

1 commit

  • commit f09ced4053bc0a2094a12b60b646114c966ef4c6 upstream.

    Fix a race when multiple sockets are simultaneously calling sendto()
    when the completion ring is shared in the SKB case. This is the case
    when you share the same netdev and queue id through the
    XDP_SHARED_UMEM bind flag. The problem is that multiple processes can
    be in xsk_generic_xmit() and call the backpressure mechanism in
    xskq_prod_reserve(xs->pool->cq). As this is a shared resource in this
    specific scenario, a race might occur since the rings are
    single-producer single-consumer.

    Fix this by moving the tx_completion_lock from the socket to the pool
    as the pool is shared between the sockets that share the completion
    ring. (The pool is not shared when this is not the case.) And then
    protect the accesses to xskq_prod_reserve() with this lock. The
    tx_completion_lock is renamed cq_lock to better reflect that it
    protects accesses to the potentially shared completion ring.

    Fixes: 35fcde7f8deb ("xsk: support for Tx")
    Reported-by: Xuan Zhuo
    Signed-off-by: Magnus Karlsson
    Signed-off-by: Daniel Borkmann
    Acked-by: Björn Töpel
    Link: https://lore.kernel.org/bpf/20201218134525.13119-2-magnus.karlsson@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Magnus Karlsson
     

13 Jan, 2021

1 commit

  • [ Upstream commit bd1248f1ddbc48b0c30565fce897a3b6423313b8 ]

    Check Scell_log shift size in red_check_params() and modify all callers
    of red_check_params() to pass Scell_log.

    This prevents a shift out-of-bounds as detected by UBSAN:
    UBSAN: shift-out-of-bounds in ./include/net/red.h:252:22
    shift exponent 72 is too large for 32-bit type 'int'

    Fixes: 8afa10cbe281 ("net_sched: red: Avoid illegal values")
    Signed-off-by: Randy Dunlap
    Reported-by: syzbot+97c5bd9cc81eca63d36e@syzkaller.appspotmail.com
    Cc: Nogah Frankel
    Cc: Jamal Hadi Salim
    Cc: Cong Wang
    Cc: Jiri Pirko
    Cc: netdev@vger.kernel.org
    Cc: "David S. Miller"
    Cc: Jakub Kicinski
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     

14 Dec, 2020

1 commit

  • This patch provids netlink method to configure the TSN protocols hardwares.
    TSN guaranteed packet transport with bounded low latency, low packet delay
    variation, and low packet loss by hardware and software methods.

    The three basic components of TSN are:

    1. Time synchronization: This was implement by 8021AS which base on the
    IEEE1588 precision Time Protocol. This is configured by the other way
    in kernel.
    8021AS not included in this patch.

    2. Scheduling and traffic shaping and per-stream filter policing:
    This patch support Qbv/Qci/Qbu/8021CB/Qav etc.

    3. Selection of communication paths:
    This patch not support the pure software only TSN protocols(like Qcc)
    but hardware related configuration.

    TSN Protocols supports by this patch: Qbv/Qci/Qbu/Credit-base Shaper(Qav).
    This patch verified on NXP ls1028ardb board.

    Signed-off-by: Po Liu

    Po Liu
     

11 Dec, 2020

2 commits

  • …/linux/kernel/git/rostedt/linux-ktest") into android-mainline

    Steps on the way to 5.10-rc8/final

    Resolves conflicts with:
    net/xfrm/xfrm_state.c

    Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
    Change-Id: I06495103fc0f2531b241b3577820f4461ba83dd5

    Greg Kroah-Hartman
     
  • Alexei Starovoitov says:

    ====================
    pull-request: bpf 2020-12-10

    The following pull-request contains BPF updates for your *net* tree.

    We've added 21 non-merge commits during the last 12 day(s) which contain
    a total of 21 files changed, 163 insertions(+), 88 deletions(-).

    The main changes are:

    1) Fix propagation of 32-bit signed bounds from 64-bit bounds, from Alexei.

    2) Fix ring_buffer__poll() return value, from Andrii.

    3) Fix race in lwt_bpf, from Cong.

    4) Fix test_offload, from Toke.

    5) Various xsk fixes.

    Please consider pulling these changes from:

    git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git

    Thanks a lot!

    Also thanks to reporters, reviewers and testers of commits in this pull-request:

    Cong Wang, Hulk Robot, Jakub Kicinski, Jean-Philippe Brucker, John
    Fastabend, Magnus Karlsson, Maxim Mikityanskiy, Yonghong Song
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

10 Dec, 2020

1 commit

  • Pablo Neira Ayuso says:

    ====================
    Netfilter fixes for net

    The following patchset contains Netfilter fixes for net:

    1) Switch to RCU in x_tables to fix possible NULL pointer dereference,
    from Subash Abhinov Kasiviswanathan.

    2) Fix netlink dump of dynset timeouts later than 23 days.

    3) Add comment for the indirect serialization of the nft commit mutex
    with rtnl_mutex.

    4) Remove bogus check for confirmed conntrack when matching on the
    conntrack ID, from Brett Mastbergen.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

09 Dec, 2020

4 commits

  • Since commit 7f0a838254bd ("bpf, xdp: Maintain info on attached XDP BPF
    programs in net_device"), the XDP program attachment info is now maintained
    in the core code. This interacts badly with the xdp_attachment_flags_ok()
    check that prevents unloading an XDP program with different load flags than
    it was loaded with. In practice, two kinds of failures are seen:

    - An XDP program loaded without specifying a mode (and which then ends up
    in driver mode) cannot be unloaded if the program mode is specified on
    unload.

    - The dev_xdp_uninstall() hook always calls the driver callback with the
    mode set to the type of the program but an empty flags argument, which
    means the flags_ok() check prevents the program from being removed,
    leading to bpf prog reference leaks.

    The original reason this check was added was to avoid ambiguity when
    multiple programs were loaded. With the way the checks are done in the core
    now, this is quite simple to enforce in the core code, so let's add a check
    there and get rid of the xdp_attachment_flags_ok() callback entirely.

    Fixes: 7f0a838254bd ("bpf, xdp: Maintain info on attached XDP BPF programs in net_device")
    Signed-off-by: Toke Høiland-Jørgensen
    Signed-off-by: Daniel Borkmann
    Acked-by: Jakub Kicinski
    Link: https://lore.kernel.org/bpf/160752225751.110217.10267659521308669050.stgit@toke.dk

    Toke Høiland-Jørgensen
     
  • Linux 5.10-rc7

    Signed-off-by: Greg Kroah-Hartman
    Change-Id: Ie61b3510311a825ee57bee12610e25bc1500b350

    Greg Kroah-Hartman
     
  • Use nf_msecs_to_jiffies64 and nf_jiffies64_to_msecs as provided by
    8e1102d5a159 ("netfilter: nf_tables: support timeouts larger than 23
    days"), otherwise ruleset listing breaks.

    Fixes: a8b1e36d0d1d ("netfilter: nft_dynset: fix element timeout for HZ != 1000")
    Signed-off-by: Pablo Neira Ayuso

    Pablo Neira Ayuso
     
  • Don't try to adjust XFRM support flags if the bond device isn't yet
    registered. Bad things can currently happen when netdev_change_features()
    is called without having wanted_features fully filled in yet. This code
    runs both on post-module-load mode changes, as well as at module init
    time, and when run at module init time, it is before register_netdevice()
    has been called and filled in wanted_features. The empty wanted_features
    led to features also getting emptied out, which was definitely not the
    intended behavior, so prevent that from happening.

    Originally, I'd hoped to stop adjusting wanted_features at all in the
    bonding driver, as it's documented as being something only the network
    core should touch, but we actually do need to do this to properly update
    both the features and wanted_features fields when changing the bond type,
    or we get to a situation where ethtool sees:

    esp-hw-offload: off [requested on]

    I do think we should be using netdev_update_features instead of
    netdev_change_features here though, so we only send notifiers when the
    features actually changed.

    Fixes: a3b658cfb664 ("bonding: allow xfrm offload setup post-module-load")
    Reported-by: Ivan Vecera
    Suggested-by: Ivan Vecera
    Cc: Jay Vosburgh
    Cc: Veaceslav Falico
    Cc: Andy Gospodarek
    Signed-off-by: Jarod Wilson
    Link: https://lore.kernel.org/r/20201205172229.576587-1-jarod@redhat.com
    Signed-off-by: Jakub Kicinski

    Jarod Wilson
     

02 Dec, 2020

1 commit

  • When adding support for propagating ECT(1) marking in IP headers it seems I
    suffered from endianness-confusion in the checksum update calculation: In
    fact the ECN field is in the *lower* bits of the first 16-bit word of the
    IP header when calculating in network byte order. This means that the
    addition performed to update the checksum field was wrong; let's fix that.

    Fixes: b723748750ec ("tunnel: Propagate ECT(1) when decapsulating as recommended by RFC6040")
    Reported-by: Jonathan Morton
    Tested-by: Pete Heist
    Signed-off-by: Toke Høiland-Jørgensen
    Link: https://lore.kernel.org/r/20201130183705.17540-1-toke@redhat.com
    Signed-off-by: Jakub Kicinski

    Toke Høiland-Jørgensen
     

01 Dec, 2020

1 commit

  • Currently, it is not possible to set CONFIG_NET_PKTGEN=m in a
    vendor kernel, as it depends on pktgen_xfrm_outer_mode_output,
    which is only exported if CONFIG_NET_PKTGEN is enabled.

    Always export this symbol so vendor kernels can depend on it.
    This may be simpler than the alternative, which is to set
    CONFIG_NET_PKTGEN=m in the GKI kernel.

    Bug: 171693245
    Signed-off-by: Lorenzo Colitti
    Change-Id: I96b48c77121aea90fb4c4c51ecb97a92601bccf6
    (cherry picked from commit 3ef1e249c624e1a7f28e1364d9b924d933826ee6)
    Signed-off-by: Will McVicker

    Lorenzo Colitti
     

29 Nov, 2020

2 commits

  • Pablo Neira Ayuso says:

    ====================
    Netfilter fixes for net

    1) Fix insufficient validation of IPSET_ATTR_IPADDR_IPV6 reported
    by syzbot.

    2) Remove spurious reports on nf_tables when lockdep gets disabled,
    from Florian Westphal.

    3) Fix memleak in the error path of error path of
    ip_vs_control_net_init(), from Wang Hai.

    4) Fix missing control data in flow dissector, otherwise IP address
    matching in hardware offload infra does not work.

    5) Fix hardware offload match on prefix IP address when userspace
    does not send a bitwise expression to represent the prefix.

    * git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf:
    netfilter: nftables_offload: build mask based from the matching bytes
    netfilter: nftables_offload: set address type in control dissector
    ipvs: fix possible memory leak in ip_vs_control_net_init
    netfilter: nf_tables: avoid false-postive lockdep splat
    netfilter: ipset: prevent uninit-value in hash_ip6_add
    ====================

    Link: https://lore.kernel.org/r/20201127190313.24947-1-pablo@netfilter.org
    Signed-off-by: Jakub Kicinski

    Jakub Kicinski
     
  • Daniel Borkmann says:

    ====================
    pull-request: bpf 2020-11-28

    1) Do not reference the skb for xsk's generic TX side since when looped
    back into RX it might crash in generic XDP, from Björn Töpel.

    2) Fix umem cleanup on a partially set up xsk socket when being destroyed,
    from Magnus Karlsson.

    3) Fix an incorrect netdev reference count when failing xsk_bind() operation,
    from Marek Majtyka.

    4) Fix bpftool to set an error code on failed calloc() in build_btf_type_table(),
    from Zhen Lei.

    * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
    bpf: Add MAINTAINERS entry for BPF LSM
    bpftool: Fix error return value in build_btf_type_table
    net, xsk: Avoid taking multiple skbuff references
    xsk: Fix incorrect netdev reference count
    xsk: Fix umem cleanup bug at socket destruct
    MAINTAINERS: Update XDP and AF_XDP entries
    ====================

    Link: https://lore.kernel.org/r/20201128005104.1205-1-daniel@iogearbox.net
    Signed-off-by: Jakub Kicinski

    Jakub Kicinski
     

28 Nov, 2020

1 commit


27 Nov, 2020

2 commits

  • Userspace might match on prefix bytes of header fields if they are on
    the byte boundary, this requires that the mask is adjusted accordingly.
    Use NFT_OFFLOAD_MATCH_EXACT() for meta since prefix byte matching is not
    allowed for this type of selector.

    The bitwise expression might be optimized out by userspace, hence the
    kernel needs to infer the prefix from the number of payload bytes to
    match on. This patch adds nft_payload_offload_mask() to calculate the
    bitmask to match on the prefix.

    Fixes: c9626a2cbdb2 ("netfilter: nf_tables: add hardware offload support")
    Signed-off-by: Pablo Neira Ayuso

    Pablo Neira Ayuso
     
  • This patch adds nft_flow_rule_set_addr_type() to set the address type
    from the nft_payload expression accordingly.

    If the address type is not set in the control dissector then a rule that
    matches either on source or destination IP address does not work.

    After this patch, nft hardware offload generates the flow dissector
    configuration as tc-flower does to match on an IP address.

    This patch has been also tested functionally to make sure packets are
    filtered out by the NIC.

    This is also getting the code aligned with the existing netfilter flow
    offload infrastructure which is also setting the control dissector.

    Fixes: c9626a2cbdb2 ("netfilter: nf_tables: add hardware offload support")
    Signed-off-by: Pablo Neira Ayuso

    Pablo Neira Ayuso
     

26 Nov, 2020

1 commit

  • tls_device_offload_cleanup_rx doesn't clear tls_ctx->netdev after
    calling tls_dev_del if TLX TX offload is also enabled. Clearing
    tls_ctx->netdev gets postponed until tls_device_gc_task. It leaves a
    time frame when tls_device_down may get called and call tls_dev_del for
    RX one extra time, confusing the driver, which may lead to a crash.

    This patch corrects this racy behavior by adding a flag to prevent
    tls_device_down from calling tls_dev_del the second time.

    Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure")
    Signed-off-by: Maxim Mikityanskiy
    Signed-off-by: Saeed Mahameed
    Link: https://lore.kernel.org/r/20201125221810.69870-1-saeedm@nvidia.com
    Signed-off-by: Jakub Kicinski

    Maxim Mikityanskiy
     

24 Nov, 2020

1 commit

  • When the TCP stack is in SYN flood mode, the server child socket is
    created from the SYN cookie received in a TCP packet with the ACK flag
    set.

    The child socket is created when the server receives the first TCP
    packet with a valid SYN cookie from the client. Usually, this packet
    corresponds to the final step of the TCP 3-way handshake, the ACK
    packet. But is also possible to receive a valid SYN cookie from the
    first TCP data packet sent by the client, and thus create a child socket
    from that SYN cookie.

    Since a client socket is ready to send data as soon as it receives the
    SYN+ACK packet from the server, the client can send the ACK packet (sent
    by the TCP stack code), and the first data packet (sent by the userspace
    program) almost at the same time, and thus the server will equally
    receive the two TCP packets with valid SYN cookies almost at the same
    instant.

    When such event happens, the TCP stack code has a race condition that
    occurs between the momement a lookup is done to the established
    connections hashtable to check for the existence of a connection for the
    same client, and the moment that the child socket is added to the
    established connections hashtable. As a consequence, this race condition
    can lead to a situation where we add two child sockets to the
    established connections hashtable and deliver two sockets to the
    userspace program to the same client.

    This patch fixes the race condition by checking if an existing child
    socket exists for the same client when we are adding the second child
    socket to the established connections socket. If an existing child
    socket exists, we drop the packet and discard the second child socket
    to the same client.

    Signed-off-by: Ricardo Dias
    Signed-off-by: Eric Dumazet
    Link: https://lore.kernel.org/r/20201120111133.GA67501@rdias-suse-pc.lan
    Signed-off-by: Jakub Kicinski

    Ricardo Dias
     

22 Nov, 2020

1 commit

  • syzkaller found that with CONFIG_DEBUG_KOBJECT_RELEASE=y, releasing a
    struct slave device could result in the following splat:

    kobject: 'bonding_slave' (00000000cecdd4fe): kobject_release, parent 0000000074ceb2b2 (delayed 1000)
    bond0 (unregistering): (slave bond_slave_1): Releasing backup interface
    ------------[ cut here ]------------
    ODEBUG: free active (active state 0) object type: timer_list hint: workqueue_select_cpu_near kernel/workqueue.c:1549 [inline]
    ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x98 kernel/workqueue.c:1600
    WARNING: CPU: 1 PID: 842 at lib/debugobjects.c:485 debug_print_object+0x180/0x240 lib/debugobjects.c:485
    Kernel panic - not syncing: panic_on_warn set ...
    CPU: 1 PID: 842 Comm: kworker/u4:4 Tainted: G S 5.9.0-rc8+ #96
    Hardware name: linux,dummy-virt (DT)
    Workqueue: netns cleanup_net
    Call trace:
    dump_backtrace+0x0/0x4d8 include/linux/bitmap.h:239
    show_stack+0x34/0x48 arch/arm64/kernel/traps.c:142
    __dump_stack lib/dump_stack.c:77 [inline]
    dump_stack+0x174/0x1f8 lib/dump_stack.c:118
    panic+0x360/0x7a0 kernel/panic.c:231
    __warn+0x244/0x2ec kernel/panic.c:600
    report_bug+0x240/0x398 lib/bug.c:198
    bug_handler+0x50/0xc0 arch/arm64/kernel/traps.c:974
    call_break_hook+0x160/0x1d8 arch/arm64/kernel/debug-monitors.c:322
    brk_handler+0x30/0xc0 arch/arm64/kernel/debug-monitors.c:329
    do_debug_exception+0x184/0x340 arch/arm64/mm/fault.c:864
    el1_dbg+0x48/0xb0 arch/arm64/kernel/entry-common.c:65
    el1_sync_handler+0x170/0x1c8 arch/arm64/kernel/entry-common.c:93
    el1_sync+0x80/0x100 arch/arm64/kernel/entry.S:594
    debug_print_object+0x180/0x240 lib/debugobjects.c:485
    __debug_check_no_obj_freed lib/debugobjects.c:967 [inline]
    debug_check_no_obj_freed+0x200/0x430 lib/debugobjects.c:998
    slab_free_hook mm/slub.c:1536 [inline]
    slab_free_freelist_hook+0x190/0x210 mm/slub.c:1577
    slab_free mm/slub.c:3138 [inline]
    kfree+0x13c/0x460 mm/slub.c:4119
    bond_free_slave+0x8c/0xf8 drivers/net/bonding/bond_main.c:1492
    __bond_release_one+0xe0c/0xec8 drivers/net/bonding/bond_main.c:2190
    bond_slave_netdev_event drivers/net/bonding/bond_main.c:3309 [inline]
    bond_netdev_event+0x8f0/0xa70 drivers/net/bonding/bond_main.c:3420
    notifier_call_chain+0xf0/0x200 kernel/notifier.c:83
    __raw_notifier_call_chain kernel/notifier.c:361 [inline]
    raw_notifier_call_chain+0x44/0x58 kernel/notifier.c:368
    call_netdevice_notifiers_info+0xbc/0x150 net/core/dev.c:2033
    call_netdevice_notifiers_extack net/core/dev.c:2045 [inline]
    call_netdevice_notifiers net/core/dev.c:2059 [inline]
    rollback_registered_many+0x6a4/0xec0 net/core/dev.c:9347
    unregister_netdevice_many.part.0+0x2c/0x1c0 net/core/dev.c:10509
    unregister_netdevice_many net/core/dev.c:10508 [inline]
    default_device_exit_batch+0x294/0x338 net/core/dev.c:10992
    ops_exit_list.isra.0+0xec/0x150 net/core/net_namespace.c:189
    cleanup_net+0x44c/0x888 net/core/net_namespace.c:603
    process_one_work+0x96c/0x18c0 kernel/workqueue.c:2269
    worker_thread+0x3f0/0xc30 kernel/workqueue.c:2415
    kthread+0x390/0x498 kernel/kthread.c:292
    ret_from_fork+0x10/0x18 arch/arm64/kernel/entry.S:925

    This is a potential use-after-free if the sysfs nodes are being accessed
    whilst removing the struct slave, so wait for the object destruction to
    complete before freeing the struct slave itself.

    Fixes: 07699f9a7c8d ("bonding: add sysfs /slave dir for bond slave devices.")
    Fixes: a068aab42258 ("bonding: Fix reference count leak in bond_sysfs_slave_add.")
    Cc: Qiushi Wu
    Cc: Jay Vosburgh
    Cc: Veaceslav Falico
    Cc: Andy Gospodarek
    Signed-off-by: Jamie Iles
    Reviewed-by: Greg Kroah-Hartman
    Link: https://lore.kernel.org/r/20201120142827.879226-1-jamie@nuviainc.com
    Signed-off-by: Jakub Kicinski

    Jamie Iles
     

20 Nov, 2020

3 commits

  • Fix a bug that is triggered when a partially setup socket is
    destroyed. For a fully setup socket, a socket that has been bound to a
    device, the cleanup of the umem is performed at the end of the buffer
    pool's cleanup work queue item. This has to be performed in a work
    queue, and not in RCU cleanup, as it is doing a vunmap that cannot
    execute in interrupt context. However, when a socket has only been
    partially set up so that a umem has been created but the buffer pool
    has not, the code erroneously directly calls the umem cleanup function
    instead of using a work queue, and this leads to a BUG_ON() in
    vunmap().

    As there in this case is no buffer pool, we cannot use its work queue,
    so we need to introduce a work queue for the umem and schedule this for
    the cleanup. So in the case there is no pool, we are going to use the
    umem's own work queue to schedule the cleanup. But if there is a
    pool, the cleanup of the umem is still being performed by the pool's
    work queue, as it is important that the umem is cleaned up after the
    pool.

    Fixes: e5e1a4bc916d ("xsk: Fix possible memory leak at socket close")
    Reported-by: Marek Majtyka
    Signed-off-by: Magnus Karlsson
    Signed-off-by: Daniel Borkmann
    Tested-by: Marek Majtyka
    Link: https://lore.kernel.org/bpf/1605873219-21629-1-git-send-email-magnus.karlsson@gmail.com

    Magnus Karlsson
     
  • …nux/kernel/git/netdev/net") into android-mainline

    Steps on the way to 5.10-rc5

    Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
    Change-Id: I00726ee0d08f08ae6ac5edd07c8fa502b41d4800

    Greg Kroah-Hartman
     
  • IPV6=m
    NF_DEFRAG_IPV6=y

    ld: net/ipv6/netfilter/nf_conntrack_reasm.o: in function
    `nf_ct_frag6_gather':
    net/ipv6/netfilter/nf_conntrack_reasm.c:462: undefined reference to
    `ipv6_frag_thdr_truncated'

    Netfilter is depending on ipv6 symbol ipv6_frag_thdr_truncated. This
    dependency is forcing IPV6=y.

    Remove this dependency by moving ipv6_frag_thdr_truncated out of ipv6. This
    is the same solution as used with a similar issues: Referring to
    commit 70b095c843266 ("ipv6: remove dependency of nf_defrag_ipv6 on ipv6
    module")

    Fixes: 9d9e937b1c8b ("ipv6/netfilter: Discard first fragment not including all headers")
    Reported-by: Randy Dunlap
    Reported-by: kernel test robot
    Signed-off-by: Georg Kohmann
    Acked-by: Pablo Neira Ayuso
    Acked-by: Randy Dunlap # build-tested
    Link: https://lore.kernel.org/r/20201119095833.8409-1-geokohma@cisco.com
    Signed-off-by: Jakub Kicinski

    Georg Kohmann
     

18 Nov, 2020

1 commit

  • In async_resync mode, we log the TCP seq of records until the async request
    is completed. Later, in case one of the logged seqs matches the resync
    request, we return it, together with its record serial number. Before this
    fix, we mistakenly returned the serial number of the current record
    instead.

    Fixes: ed9b7646b06a ("net/tls: Add asynchronous resync")
    Signed-off-by: Tariq Toukan
    Reviewed-by: Boris Pismenny
    Link: https://lore.kernel.org/r/20201115131448.2702-1-tariqt@nvidia.com
    Signed-off-by: Jakub Kicinski

    Tariq Toukan
     

17 Nov, 2020

1 commit

  • Packets are processed even though the first fragment don't include all
    headers through the upper layer header. This breaks TAHI IPv6 Core
    Conformance Test v6LC.1.3.6.

    Referring to RFC8200 SECTION 4.5: "If the first fragment does not include
    all headers through an Upper-Layer header, then that fragment should be
    discarded and an ICMP Parameter Problem, Code 3, message should be sent to
    the source of the fragment, with the Pointer field set to zero."

    The fragment needs to be validated the same way it is done in
    commit 2efdaaaf883a ("IPv6: reply ICMP error if the first fragment don't
    include all headers") for ipv6. Wrap the validation into a common function,
    ipv6_frag_thdr_truncated() to check for truncation in the upper layer
    header. This validation does not fullfill all aspects of RFC 8200,
    section 4.5, but is at the moment sufficient to pass mentioned TAHI test.

    In netfilter, utilize the fragment offset returned by find_prev_fhdr() to
    let ipv6_frag_thdr_truncated() start it's traverse from the fragment
    header.

    Return 0 to drop the fragment in the netfilter. This is the same behaviour
    as used on other protocol errors in this function, e.g. when
    nf_ct_frag6_queue() returns -EPROTO. The Fragment will later be picked up
    by ipv6_frag_rcv() in reassembly.c. ipv6_frag_rcv() will then send an
    appropriate ICMP Parameter Problem message back to the source.

    References commit 2efdaaaf883a ("IPv6: reply ICMP error if the first
    fragment don't include all headers")

    Signed-off-by: Georg Kohmann
    Acked-by: Pablo Neira Ayuso
    Link: https://lore.kernel.org/r/20201111115025.28879-1-geokohma@cisco.com
    Signed-off-by: Jakub Kicinski

    Georg Kohmann
     

14 Nov, 2020

2 commits

  • Currently, we may set the tunnel option flag when the size of metadata
    is zero. For example, we set TUNNEL_GENEVE_OPT in the receive function
    no matter the geneve option is present or not. As this may result in
    issues on the tunnel flags consumers, this patch fixes the issue.

    Related discussion:
    * https://lore.kernel.org/netdev/1604448694-19351-1-git-send-email-yihung.wei@gmail.com/T/#u

    Fixes: 256c87c17c53 ("net: check tunnel option type in tunnel flags")
    Signed-off-by: Yi-Hung Wei
    Link: https://lore.kernel.org/r/1605053800-74072-1-git-send-email-yihung.wei@gmail.com
    Signed-off-by: Jakub Kicinski

    Yi-Hung Wei
     
  • Commit 58956317c8de ("neighbor: Improve garbage collection")
    guarantees neighbour table entries a five-second lifetime. Processes
    which make heavy use of multicast can fill the neighour table with
    multicast addresses in five seconds. At that point, neighbour entries
    can't be GC-ed because they aren't five seconds old yet, the kernel
    log starts to fill up with "neighbor table overflow!" messages, and
    sends start to fail.

    This patch allows multicast addresses to be thrown out before they've
    lived out their five seconds. This makes room for non-multicast
    addresses and makes messages to all addresses more reliable in these
    circumstances.

    Fixes: 58956317c8de ("neighbor: Improve garbage collection")
    Signed-off-by: Jeff Dike
    Reviewed-by: David Ahern
    Link: https://lore.kernel.org/r/20201113015815.31397-1-jdike@akamai.com
    Signed-off-by: Jakub Kicinski

    Jeff Dike
     

13 Nov, 2020

1 commit


09 Nov, 2020

1 commit


07 Nov, 2020

1 commit

  • Alexei Starovoitov says:

    ====================
    pull-request: bpf 2020-11-06

    1) Pre-allocated per-cpu hashmap needs to zero-fill reused element, from David.

    2) Tighten bpf_lsm function check, from KP.

    3) Fix bpftool attaching to flow dissector, from Lorenz.

    4) Use -fno-gcse for the whole kernel/bpf/core.c instead of function attribute, from Ard.

    * git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
    bpf: Update verification logic for LSM programs
    bpf: Zero-fill re-used per-cpu map element
    bpf: BPF_PRELOAD depends on BPF_SYSCALL
    tools/bpftool: Fix attaching flow dissector
    libbpf: Fix possible use after free in xsk_socket__delete
    libbpf: Fix null dereference in xsk_socket__delete
    libbpf, hashmap: Fix undefined behavior in hash_bits
    bpf: Don't rely on GCC __attribute__((optimize)) to disable GCSE
    tools, bpftool: Remove two unused variables.
    tools, bpftool: Avoid array index warnings.
    xsk: Fix possible memory leak at socket close
    bpf: Add struct bpf_redir_neigh forward declaration to BPF helper defs
    samples/bpf: Set rlimit for memlock to infinity in all samples
    bpf: Fix -Wshadow warnings
    selftest/bpf: Fix profiler test using CO-RE relocation for enums
    ====================

    Link: https://lore.kernel.org/r/20201106221759.24143-1-alexei.starovoitov@gmail.com
    Signed-off-by: Jakub Kicinski

    Jakub Kicinski
     

30 Oct, 2020

1 commit

  • Some identifiers have different names between their prototypes
    and the kernel-doc markup.

    Others need to be fixed, as kernel-doc markups should use this format:
    identifier - description

    In the specific case of __sta_info_flush(), add a documentation
    for sta_info_flush(), as this one is the one used outside
    sta_info.c.

    Signed-off-by: Mauro Carvalho Chehab
    Reviewed-by: Johannes Berg
    Link: https://lore.kernel.org/r/978d35eef2dc76e21c81931804e4eaefbd6d635e.1603469755.git.mchehab+huawei@kernel.org
    Signed-off-by: Johannes Berg

    Mauro Carvalho Chehab
     

29 Oct, 2020

1 commit

  • Fix a possible memory leak at xsk socket close that is caused by the
    refcounting of the umem object being wrong. The reference count of the
    umem was decremented only after the pool had been freed. Note that if
    the buffer pool is destroyed, it is important that the umem is
    destroyed after the pool, otherwise the umem would disappear while the
    driver is still running. And as the buffer pool needs to be destroyed
    in a work queue, the umem is also (if its refcount reaches zero)
    destroyed after the buffer pool in that same work queue.

    What was missing is that the refcount also needs to be decremented
    when the pool is not freed and when the pool has not even been
    created. The first case happens when the refcount of the pool is
    higher than 1, i.e. it is still being used by some other socket using
    the same device and queue id. In this case, it is safe to decrement
    the refcount of the umem outside of the work queue as the umem will
    never be freed because the refcount of the umem is always greater than
    or equal to the refcount of the buffer pool. The second case is if the
    buffer pool has not been created yet, i.e. the socket was closed
    before it was bound but after the umem was created. In this case, it
    is safe to destroy the umem outside of the work queue, since there is
    no pool that can use it by definition.

    Fixes: 1c1efc2af158 ("xsk: Create and free buffer pool independently from umem")
    Reported-by: syzbot+eb71df123dc2be2c1456@syzkaller.appspotmail.com
    Signed-off-by: Magnus Karlsson
    Signed-off-by: Daniel Borkmann
    Acked-by: Björn Töpel
    Link: https://lore.kernel.org/bpf/1603801921-2712-1-git-send-email-magnus.karlsson@gmail.com

    Magnus Karlsson
     

27 Oct, 2020

1 commit


26 Oct, 2020

2 commits


24 Oct, 2020

1 commit

  • Pull networking fixes from Jakub Kicinski:
    "Cross-tree/merge window issues:

    - rtl8150: don't incorrectly assign random MAC addresses; fix late in
    the 5.9 cycle started depending on a return code from a function
    which changed with the 5.10 PR from the usb subsystem

    Current release regressions:

    - Revert "virtio-net: ethtool configurable RXCSUM", it was causing
    crashes at probe when control vq was not negotiated/available

    Previous release regressions:

    - ixgbe: fix probing of multi-port 10 Gigabit Intel NICs with an MDIO
    bus, only first device would be probed correctly

    - nexthop: Fix performance regression in nexthop deletion by
    effectively switching from recently added synchronize_rcu() to
    synchronize_rcu_expedited()

    - netsec: ignore 'phy-mode' device property on ACPI systems; the
    property is not populated correctly by the firmware, but firmware
    configures the PHY so just keep boot settings

    Previous releases - always broken:

    - tcp: fix to update snd_wl1 in bulk receiver fast path, addressing
    bulk transfers getting "stuck"

    - icmp: randomize the global rate limiter to prevent attackers from
    getting useful signal

    - r8169: fix operation under forced interrupt threading, make the
    driver always use hard irqs, even on RT, given the handler is light
    and only wants to schedule napi (and do so through a _irqoff()
    variant, preferably)

    - bpf: Enforce pointer id generation for all may-be-null register
    type to avoid pointers erroneously getting marked as null-checked

    - tipc: re-configure queue limit for broadcast link

    - net/sched: act_tunnel_key: fix OOB write in case of IPv6 ERSPAN
    tunnels

    - fix various issues in chelsio inline tls driver

    Misc:

    - bpf: improve just-added bpf_redirect_neigh() helper api to support
    supplying nexthop by the caller - in case BPF program has already
    done a lookup we can avoid doing another one

    - remove unnecessary break statements

    - make MCTCP not select IPV6, but rather depend on it"

    * tag 'net-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (62 commits)
    tcp: fix to update snd_wl1 in bulk receiver fast path
    net: Properly typecast int values to set sk_max_pacing_rate
    netfilter: nf_fwd_netdev: clear timestamp in forwarding path
    ibmvnic: save changed mac address to adapter->mac_addr
    selftests: mptcp: depends on built-in IPv6
    Revert "virtio-net: ethtool configurable RXCSUM"
    rtnetlink: fix data overflow in rtnl_calcit()
    net: ethernet: mtk-star-emac: select REGMAP_MMIO
    net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup
    net: hdlc: In hdlc_rcv, check to make sure dev is an HDLC device
    bpf, libbpf: Guard bpf inline asm from bpf_tail_call_static
    bpf, selftests: Extend test_tc_redirect to use modified bpf_redirect_neigh()
    bpf: Fix bpf_redirect_neigh helper api to support supplying nexthop
    mptcp: depends on IPV6 but not as a module
    sfc: move initialisation of efx->filter_sem to efx_init_struct()
    mpls: load mpls_gso after mpls_iptunnel
    net/sched: act_tunnel_key: fix OOB write in case of IPv6 ERSPAN tunnels
    net/sched: act_gate: Unlock ->tcfa_lock in tc_setup_flow_action()
    net: dsa: bcm_sf2: make const array static, makes object smaller
    mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it
    ...

    Linus Torvalds