1. 09 Nov, 2023 8 commits
    • Edward Adam Davis's avatar
      ptp: ptp_read should not release queue · b714ca2c
      Edward Adam Davis authored
      Firstly, queue is not the memory allocated in ptp_read;
      Secondly, other processes may block at ptp_read and wait for conditions to be
      met to perform read operations.
      Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
      Reported-and-tested-by: syzbot+df3f3ef31f60781fa911@syzkaller.appspotmail.com
      Fixes: 8f5de6fb ("ptp: support multiple timestamp event readers")
      Signed-off-by: default avatarEdward Adam Davis <eadavis@qq.com>
      Link: https://lore.kernel.org/r/tencent_18747D76F1675A3C633772960237544AAA09@qq.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b714ca2c
    • Jakub Kicinski's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · 9b818a34
      Jakub Kicinski authored
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2023-11-06 (ice)
      
      This series contains updates to ice driver only.
      
      Dave removes SR-IOV LAG attribute for only the interface being disabled
      to allow for proper unwinding of all interfaces.
      
      Michal Schmidt changes some LAG allocations from GFP_KERNEL to GFP_ATOMIC
      due to non-allowed sleeping.
      
      Aniruddha and Marcin fix redirection and drop rules for switchdev by
      properly setting and marking egress/ingress type.
      
      * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
        ice: Fix VF-VF direction matching in drop rule in switchdev
        ice: Fix VF-VF filter rules in switchdev mode
        ice: lag: in RCU, use atomic allocation
        ice: Fix SRIOV LAG disable on non-compliant aggregate
      ====================
      
      Link: https://lore.kernel.org/r/20231107004844.655549-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9b818a34
    • Eric Dumazet's avatar
      net_sched: sch_fq: better validate TCA_FQ_WEIGHTS and TCA_FQ_PRIOMAP · f1a3b283
      Eric Dumazet authored
      syzbot was able to trigger the following report while providing
      too small TCA_FQ_WEIGHTS attribute [1]
      
      Fix is to use NLA_POLICY_EXACT_LEN() to ensure user space
      provided correct sizes.
      
      Apply the same fix to TCA_FQ_PRIOMAP.
      
      [1]
      BUG: KMSAN: uninit-value in fq_load_weights net/sched/sch_fq.c:960 [inline]
      BUG: KMSAN: uninit-value in fq_change+0x1348/0x2fe0 net/sched/sch_fq.c:1071
      fq_load_weights net/sched/sch_fq.c:960 [inline]
      fq_change+0x1348/0x2fe0 net/sched/sch_fq.c:1071
      fq_init+0x68e/0x780 net/sched/sch_fq.c:1159
      qdisc_create+0x12f3/0x1be0 net/sched/sch_api.c:1326
      tc_modify_qdisc+0x11ef/0x2c20
      rtnetlink_rcv_msg+0x16a6/0x1840 net/core/rtnetlink.c:6558
      netlink_rcv_skb+0x371/0x650 net/netlink/af_netlink.c:2545
      rtnetlink_rcv+0x34/0x40 net/core/rtnetlink.c:6576
      netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline]
      netlink_unicast+0xf47/0x1250 net/netlink/af_netlink.c:1368
      netlink_sendmsg+0x1238/0x13d0 net/netlink/af_netlink.c:1910
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg net/socket.c:745 [inline]
      ____sys_sendmsg+0x9c2/0xd60 net/socket.c:2588
      ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2642
      __sys_sendmsg net/socket.c:2671 [inline]
      __do_sys_sendmsg net/socket.c:2680 [inline]
      __se_sys_sendmsg net/socket.c:2678 [inline]
      __x64_sys_sendmsg+0x307/0x490 net/socket.c:2678
      do_syscall_x64 arch/x86/entry/common.c:51 [inline]
      do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
      entry_SYSCALL_64_after_hwframe+0x63/0x6b
      
      Uninit was created at:
      slab_post_alloc_hook+0x129/0xa70 mm/slab.h:768
      slab_alloc_node mm/slub.c:3478 [inline]
      kmem_cache_alloc_node+0x5e9/0xb10 mm/slub.c:3523
      kmalloc_reserve+0x13d/0x4a0 net/core/skbuff.c:560
      __alloc_skb+0x318/0x740 net/core/skbuff.c:651
      alloc_skb include/linux/skbuff.h:1286 [inline]
      netlink_alloc_large_skb net/netlink/af_netlink.c:1214 [inline]
      netlink_sendmsg+0xb34/0x13d0 net/netlink/af_netlink.c:1885
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg net/socket.c:745 [inline]
      ____sys_sendmsg+0x9c2/0xd60 net/socket.c:2588
      ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2642
      __sys_sendmsg net/socket.c:2671 [inline]
      __do_sys_sendmsg net/socket.c:2680 [inline]
      __se_sys_sendmsg net/socket.c:2678 [inline]
      __x64_sys_sendmsg+0x307/0x490 net/socket.c:2678
      do_syscall_x64 arch/x86/entry/common.c:51 [inline]
      do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
      entry_SYSCALL_64_after_hwframe+0x63/0x6b
      
      CPU: 1 PID: 5001 Comm: syz-executor300 Not tainted 6.6.0-syzkaller-12401-g8f6f76a6 #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
      
      Fixes: 29f834aa ("net_sched: sch_fq: add 3 bands and WRR scheduling")
      Fixes: 49e7265f ("net_sched: sch_fq: add TCA_FQ_WEIGHTS attribute")
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: Jamal Hadi Salim<jhs@mojatatu.com>
      Link: https://lore.kernel.org/r/20231107160440.1992526-1-edumazet@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f1a3b283
    • Jakub Kicinski's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · 09699f19
      Jakub Kicinski authored
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2023-11-06 (i40e)
      
      This series contains updates to i40e driver only.
      
      Ivan Vecera resolves a couple issues with devlink; removing a call to
      devlink_port_type_clear() and ensuring devlink port is unregistered
      after the net device.
      
      * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
        i40e: Fix devlink port unregistering
        i40e: Do not call devlink_port_type_clear()
      ====================
      
      Link: https://lore.kernel.org/r/20231107003600.653796-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      09699f19
    • Jakub Kicinski's avatar
      net: kcm: fill in MODULE_DESCRIPTION() · 31356547
      Jakub Kicinski authored
      W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
      
      Link: https://lore.kernel.org/r/20231108020305.537293-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      31356547
    • Jakub Kicinski's avatar
      Merge tag 'nf-23-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf · 0613736e
      Jakub Kicinski authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains Netfilter fixes for net:
      
      1) Add missing netfilter modules description to fix W=1, from Florian Westphal.
      
      2) Fix catch-all element GC with timeout when use with the pipapo set
         backend, this remained broken since I tried to fix it this summer,
         then another attempt to fix it recently.
      
      3) Add missing IPVS modules descriptions to fix W=1, also from Florian.
      
      4) xt_recent allocated a too small buffer to store an IPv4-mapped IPv6
         address which can be parsed by in6_pton(), from Maciej Zenczykowski.
         Broken for many releases.
      
      5) Skip IPv4-mapped IPv6, IPv4-compat IPv6, site/link local scoped IPv6
         addressses to set up IPv6 NAT redirect, also from Florian. This is
         broken since 2012.
      
      * tag 'nf-23-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
        netfilter: nat: fix ipv6 nat redirect with mapped and scoped addresses
        netfilter: xt_recent: fix (increase) ipv6 literal buffer length
        ipvs: add missing module descriptions
        netfilter: nf_tables: remove catchall element in GC sync path
        netfilter: add missing module descriptions
      ====================
      
      Link: https://lore.kernel.org/r/20231108155802.84617-1-pablo@netfilter.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0613736e
    • Jakub Kicinski's avatar
      Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 942b8b38
      Jakub Kicinski authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf 2023-11-08
      
      We've added 16 non-merge commits during the last 6 day(s) which contain
      a total of 30 files changed, 341 insertions(+), 130 deletions(-).
      
      The main changes are:
      
      1) Fix a BPF verifier issue in precision tracking for BPF_ALU | BPF_TO_BE |
         BPF_END where the source register was incorrectly marked as precise,
         from Shung-Hsi Yu.
      
      2) Fix a concurrency issue in bpf_timer where the former could still have
         been alive after an application releases or unpins the map, from Hou Tao.
      
      3) Fix a BPF verifier issue where immediates are incorrectly cast to u32
         before being spilled and therefore losing sign information, from Hao Sun.
      
      4) Fix a misplaced BPF_TRACE_ITER in check_css_task_iter_allowlist which
         incorrectly compared bpf_prog_type with bpf_attach_type, from Chuyi Zhou.
      
      5) Add __bpf_hook_{start,end} as well as __bpf_kfunc_{start,end}_defs macros,
         migrate all BPF-related __diag callsites over to it, and add a new
         __diag_ignore_all for -Wmissing-declarations to the macros to address
         recent build warnings, from Dave Marchevsky.
      
      6) Fix broken BPF selftest build of xdp_hw_metadata test on architectures
         where char is not signed, from Björn Töpel.
      
      7) Fix test_maps selftest to properly use LIBBPF_OPTS() macro to initialize
         the bpf_map_create_opts, from Andrii Nakryiko.
      
      8) Fix bpffs selftest to avoid unmounting /sys/kernel/debug as it may have
         been mounted and used by other applications already, from Manu Bretelle.
      
      9) Fix a build issue without CONFIG_CGROUPS wrt css_task open-coded
         iterators, from Matthieu Baerts.
      
      * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
        selftests/bpf: get trusted cgrp from bpf_iter__cgroup directly
        bpf: Let verifier consider {task,cgroup} is trusted in bpf_iter_reg
        selftests/bpf: Fix broken build where char is unsigned
        selftests/bpf: precision tracking test for BPF_NEG and BPF_END
        bpf: Fix precision tracking for BPF_ALU | BPF_TO_BE | BPF_END
        selftests/bpf: Add test for using css_task iter in sleepable progs
        selftests/bpf: Add tests for css_task iter combining with cgroup iter
        bpf: Relax allowlist for css_task iter
        selftests/bpf: fix test_maps' use of bpf_map_create_opts
        bpf: Check map->usercnt after timer->timer is assigned
        bpf: Add __bpf_hook_{start,end} macros
        bpf: Add __bpf_kfunc_{start,end}_defs macros
        selftests/bpf: fix test_bpffs
        selftests/bpf: Add test for immediate spilled to stack
        bpf: Fix check_stack_write_fixed_off() to correctly spill imm
        bpf: fix compilation error without CGROUPS
      ====================
      
      Link: https://lore.kernel.org/r/20231108132448.1970-1-daniel@iogearbox.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      942b8b38
    • Vlad Buslov's avatar
      net/sched: act_ct: Always fill offloading tuple iifidx · 9bc64bd0
      Vlad Buslov authored
      Referenced commit doesn't always set iifidx when offloading the flow to
      hardware. Fix the following cases:
      
      - nf_conn_act_ct_ext_fill() is called before extension is created with
      nf_conn_act_ct_ext_add() in tcf_ct_act(). This can cause rule offload with
      unspecified iifidx when connection is offloaded after only single
      original-direction packet has been processed by tc data path. Always fill
      the new nf_conn_act_ct_ext instance after creating it in
      nf_conn_act_ct_ext_add().
      
      - Offloading of unidirectional UDP NEW connections is now supported, but ct
      flow iifidx field is not updated when connection is promoted to
      bidirectional which can result reply-direction iifidx to be zero when
      refreshing the connection. Fill in the extension and update flow iifidx
      before calling flow_offload_refresh().
      
      Fixes: 9795ded7 ("net/sched: act_ct: Fill offloading tuple iifidx")
      Reviewed-by: default avatarPaul Blakey <paulb@nvidia.com>
      Signed-off-by: default avatarVlad Buslov <vladbu@nvidia.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Fixes: 6a9bad00 ("net/sched: act_ct: offload UDP NEW connections")
      Link: https://lore.kernel.org/r/20231103151410.764271-1-vladbu@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9bc64bd0
  2. 08 Nov, 2023 9 commits
  3. 07 Nov, 2023 20 commits
  4. 06 Nov, 2023 3 commits