1. Jan 06, 2023
  2. Jan 05, 2023
    • Paolo Abeni's avatar
      Merge branch 'add-support-for-qsgmii-mode-for-j721e-cpsw9g-to-am65-cpsw-driver' · 0471005e
      Paolo Abeni authored
      Siddharth Vadapalli says:
      
      ====================
      Add support for QSGMII mode for J721e CPSW9G to am65-cpsw driver
      
      Add compatible to am65-cpsw driver for J721e CPSW9G, which contains 8
      external ports and 1 internal host port.
      
      Add support to power on and power off the SERDES PHY which is used by the
      CPSW MAC.
      
      =========
      Changelog
      =========
      v5:
      https://lore.kernel.org/r/20221109042203.375042-1-s-vadapalli@ti.com/
      v4:
      https://lore.kernel.org/r/20221108080606.124596-1-s-vadapalli@ti.com/
      v3:
      https://lore.kernel.org/r/20221026090957.180592-1-s-vadapalli@ti.com/
      v2:
      https://lore.kernel.org/r/20221018085810.151327-1-s-vadapalli@ti.com/
      v1:
      https://lore.kernel.org/r/20220914095053.189851-1-s-vadapalli@ti.com/
      ====================
      
      Link: https://lore.kernel.org/r/20230104103432.1126403-1-s-vadapalli@ti.com
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      0471005e
    • Siddharth Vadapalli's avatar
      net: ethernet: ti: am65-cpsw: Add support for SERDES configuration · dab2b265
      Siddharth Vadapalli authored
      
      
      Use PHY framework APIs to initialize the SERDES PHY connected to CPSW MAC.
      
      Define the functions am65_cpsw_disable_phy(), am65_cpsw_enable_phy(),
      am65_cpsw_disable_serdes_phy() and am65_cpsw_enable_serdes_phy().
      
      Add new member "serdes_phy" to struct "am65_cpsw_slave_data" to store the
      SERDES PHY for each port, if it exists. Use it later while disabling the
      SERDES PHY for each port.
      
      Power on and initialize the SerDes PHY in am65_cpsw_nuss_init_slave_ports()
      by invoking am65_cpsw_enable_serdes_phy().
      
      Power off the SerDes PHY in am65_cpsw_nuss_remove() by invoking
      am65_cpsw_disable_serdes_phy().
      
      Signed-off-by: default avatarSiddharth Vadapalli <s-vadapalli@ti.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      dab2b265
    • Siddharth Vadapalli's avatar
      net: ethernet: ti: am65-cpsw: Enable QSGMII mode for J721e CPSW9G · 944131fa
      Siddharth Vadapalli authored
      
      
      CPSW9G in J721e supports additional modes like QSGMII.
      Add new compatible for J721e in am65-cpsw driver.
      
      Signed-off-by: default avatarSiddharth Vadapalli <s-vadapalli@ti.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      944131fa
    • Siddharth Vadapalli's avatar
      dt-bindings: net: ti: k3-am654-cpsw-nuss: Add J721e CPSW9G support · c85b53e3
      Siddharth Vadapalli authored
      
      
      Update bindings for TI K3 J721e SoC which contains 9 ports (8 external
      ports) CPSW9G module and add compatible for it.
      
      Changes made:
          - Add new compatible ti,j721e-cpswxg-nuss for CPSW9G.
          - Extend pattern properties for new compatible.
          - Change maximum number of CPSW ports to 8 for new compatible.
      
      Signed-off-by: default avatarSiddharth Vadapalli <s-vadapalli@ti.com>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      c85b53e3
    • Arnd Bergmann's avatar
      fbdev: omapfb: avoid stack overflow warning · 634cf6ea
      Arnd Bergmann authored
      
      
      The dsi_irq_stats structure is a little too big to fit on the
      stack of a 32-bit task, depending on the specific gcc options:
      
      fbdev/omap2/omapfb/dss/dsi.c: In function 'dsi_dump_dsidev_irqs':
      fbdev/omap2/omapfb/dss/dsi.c:1621:1: error: the frame size of 1064 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
      
      Since this is only a debugfs file, performance is not critical,
      so just dynamically allocate it, and print an error message
      in there in place of a failure code when the allocation fails.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      634cf6ea
    • Zhengchao Shao's avatar
      caif: fix memory leak in cfctrl_linkup_request() · fe69230f
      Zhengchao Shao authored
      When linktype is unknown or kzalloc failed in cfctrl_linkup_request(),
      pkt is not released. Add release process to error path.
      
      Fixes: b482cd20 ("net-caif: add CAIF core protocol stack")
      Fixes: 8d545c8f
      
       ("caif: Disconnect without waiting for response")
      Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Link: https://lore.kernel.org/r/20230104065146.1153009-1-shaozhengchao@huawei.com
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      fe69230f
    • Eric Dumazet's avatar
      inet: control sockets should not use current thread task_frag · 1ac88557
      Eric Dumazet authored
      Because ICMP handlers run from softirq contexts,
      they must not use current thread task_frag.
      
      Previously, all sockets allocated by inet_ctl_sock_create()
      would use the per-socket page fragment, with no chance of
      recursion.
      
      Fixes: 98123866
      
       ("Treewide: Stop corrupting socket's task_frag")
      Reported-by: default avatar <syzbot+bebc6f1acdf4cbb79b03@syzkaller.appspotmail.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Benjamin Coddington <bcodding@redhat.com>
      Acked-by: default avatarGuillaume Nault <gnault@redhat.com>
      Link: https://lore.kernel.org/r/20230103192736.454149-1-edumazet@google.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1ac88557
    • Paolo Abeni's avatar
      net/ulp: prevent ULP without clone op from entering the LISTEN status · 2c02d41d
      Paolo Abeni authored
      When an ULP-enabled socket enters the LISTEN status, the listener ULP data
      pointer is copied inside the child/accepted sockets by sk_clone_lock().
      
      The relevant ULP can take care of de-duplicating the context pointer via
      the clone() operation, but only MPTCP and SMC implement such op.
      
      Other ULPs may end-up with a double-free at socket disposal time.
      
      We can't simply clear the ULP data at clone time, as TLS replaces the
      socket ops with custom ones assuming a valid TLS ULP context is
      available.
      
      Instead completely prevent clone-less ULP sockets from entering the
      LISTEN status.
      
      Fixes: 734942cc
      
       ("tcp: ULP infrastructure")
      Reported-by: default avatarslipper <slipper.alive@gmail.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Link: https://lore.kernel.org/r/4b80c3d1dbe3d0ab072f80450c202d9bc88b4b03.1672740602.git.pabeni@redhat.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2c02d41d
    • Caleb Sander's avatar
      qed: allow sleep in qed_mcp_trace_dump() · 5401c3e0
      Caleb Sander authored
      By default, qed_mcp_cmd_and_union() delays 10us at a time in a loop
      that can run 500K times, so calls to qed_mcp_nvm_rd_cmd()
      may block the current thread for over 5s.
      We observed thread scheduling delays over 700ms in production,
      with stacktraces pointing to this code as the culprit.
      
      qed_mcp_trace_dump() is called from ethtool, so sleeping is permitted.
      It already can sleep in qed_mcp_halt(), which calls qed_mcp_cmd().
      Add a "can sleep" parameter to qed_find_nvram_image() and
      qed_nvram_read() so they can sleep during qed_mcp_trace_dump().
      qed_mcp_trace_get_meta_info() and qed_mcp_trace_read_meta(),
      called only by qed_mcp_trace_dump(), allow these functions to sleep.
      I can't tell if the other caller (qed_grc_dump_mcp_hw_dump()) can sleep,
      so keep b_can_sleep set to false when it calls these functions.
      
      An example stacktrace from a custom warning we added to the kernel
      showing a thread that has not scheduled despite long needing resched:
      [ 2745.362925,17] ------------[ cut here ]------------
      [ 2745.362941,17] WARNING: CPU: 23 PID: 5640 at arch/x86/kernel/irq.c:233 do_IRQ+0x15e/0x1a0()
      [ 2745.362946,17] Thread not rescheduled for 744 ms after irq 99
      [ 2745.362956,17] Modules linked in: ...
      [ 2745.363339,17] CPU: 23 PID: 5640 Comm: lldpd Tainted: P           O    4.4.182+ #202104120910+6d1da174272d.61x
      [ 2745.363343,17] Hardware name: FOXCONN MercuryB/Quicksilver Controller, BIOS H11P1N09 07/08/2020
      [ 2745.363346,17]  0000000000000000 ffff885ec07c3ed8 ffffffff8131eb2f ffff885ec07c3f20
      [ 2745.363358,17]  ffffffff81d14f64 ffff885ec07c3f10 ffffffff81072ac2 ffff88be98ed0000
      [ 2745.363369,17]  0000000000000063 0000000000000174 0000000000000074 0000000000000000
      [ 2745.363379,17] Call Trace:
      [ 2745.363382,17]  <IRQ>  [<ffffffff8131eb2f>] dump_stack+0x8e/0xcf
      [ 2745.363393,17]  [<ffffffff81072ac2>] warn_slowpath_common+0x82/0xc0
      [ 2745.363398,17]  [<ffffffff81072b4c>] warn_slowpath_fmt+0x4c/0x50
      [ 2745.363404,17]  [<ffffffff810d5a8e>] ? rcu_irq_exit+0xae/0xc0
      [ 2745.363408,17]  [<ffffffff817c99fe>] do_IRQ+0x15e/0x1a0
      [ 2745.363413,17]  [<ffffffff817c7ac9>] common_interrupt+0x89/0x89
      [ 2745.363416,17]  <EOI>  [<ffffffff8132aa74>] ? delay_tsc+0x24/0x50
      [ 2745.363425,17]  [<ffffffff8132aa04>] __udelay+0x34/0x40
      [ 2745.363457,17]  [<ffffffffa04d45ff>] qed_mcp_cmd_and_union+0x36f/0x7d0 [qed]
      [ 2745.363473,17]  [<ffffffffa04d5ced>] qed_mcp_nvm_rd_cmd+0x4d/0x90 [qed]
      [ 2745.363490,17]  [<ffffffffa04e1dc7>] qed_mcp_trace_dump+0x4a7/0x630 [qed]
      [ 2745.363504,17]  [<ffffffffa04e2556>] ? qed_fw_asserts_dump+0x1d6/0x1f0 [qed]
      [ 2745.363520,17]  [<ffffffffa04e4ea7>] qed_dbg_mcp_trace_get_dump_buf_size+0x37/0x80 [qed]
      [ 2745.363536,17]  [<ffffffffa04ea881>] qed_dbg_feature_size+0x61/0xa0 [qed]
      [ 2745.363551,17]  [<ffffffffa04eb427>] qed_dbg_all_data_size+0x247/0x260 [qed]
      [ 2745.363560,17]  [<ffffffffa0482c10>] qede_get_regs_len+0x30/0x40 [qede]
      [ 2745.363566,17]  [<ffffffff816c9783>] ethtool_get_drvinfo+0xe3/0x190
      [ 2745.363570,17]  [<ffffffff816cc152>] dev_ethtool+0x1362/0x2140
      [ 2745.363575,17]  [<ffffffff8109bcc6>] ? finish_task_switch+0x76/0x260
      [ 2745.363580,17]  [<ffffffff817c2116>] ? __schedule+0x3c6/0x9d0
      [ 2745.363585,17]  [<ffffffff810dbd50>] ? hrtimer_start_range_ns+0x1d0/0x370
      [ 2745.363589,17]  [<ffffffff816c1e5b>] ? dev_get_by_name_rcu+0x6b/0x90
      [ 2745.363594,17]  [<ffffffff816de6a8>] dev_ioctl+0xe8/0x710
      [ 2745.363599,17]  [<ffffffff816a58a8>] sock_do_ioctl+0x48/0x60
      [ 2745.363603,17]  [<ffffffff816a5d87>] sock_ioctl+0x1c7/0x280
      [ 2745.363608,17]  [<ffffffff8111f393>] ? seccomp_phase1+0x83/0x220
      [ 2745.363612,17]  [<ffffffff811e3503>] do_vfs_ioctl+0x2b3/0x4e0
      [ 2745.363616,17]  [<ffffffff811e3771>] SyS_ioctl+0x41/0x70
      [ 2745.363619,17]  [<ffffffff817c6ffe>] entry_SYSCALL_64_fastpath+0x1e/0x79
      [ 2745.363622,17] ---[ end trace f6954aa440266421 ]---
      
      Fixes: c965db44
      
       ("qed: Add support for debug data collection")
      Signed-off-by: default avatarCaleb Sander <csander@purestorage.com>
      Acked-by: default avatarAlok Prasad <palok@marvell.com>
      Link: https://lore.kernel.org/r/20230103233021.1457646-1-csander@purestorage.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5401c3e0
    • Jakub Kicinski's avatar
      Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · d75858ef
      Jakub Kicinski authored
      Daniel Borkmann says:
      
      ====================
      bpf-next 2023-01-04
      
      We've added 45 non-merge commits during the last 21 day(s) which contain
      a total of 50 files changed, 1454 insertions(+), 375 deletions(-).
      
      The main changes are:
      
      1) Fixes, improvements and refactoring of parts of BPF verifier's
         state equivalence checks, from Andrii Nakryiko.
      
      2) Fix a few corner cases in libbpf's BTF-to-C converter in particular
         around padding handling and enums, also from Andrii Nakryiko.
      
      3) Add BPF_F_NO_TUNNEL_KEY extension to bpf_skb_set_tunnel_key to better
        support decap on GRE tunnel devices not operating in collect metadata,
        from Christian Ehrig.
      
      4) Improve x86 JIT's codegen for PROBE_MEM runtime error checks,
         from Dave Marchevsky.
      
      5) Remove the need for trace_printk_lock for bpf_trace_printk
         and bpf_trace_vprintk helpers, from Jiri Olsa.
      
      6) Add proper documentation for BPF_MAP_TYPE_SOCK{MAP,HASH} maps,
         from Maryam Tahhan.
      
      7) Improvements in libbpf's btf_parse_elf error handling, from Changbin Du.
      
      8) Bigger batch of improvements to BPF tracing code samples,
         from Daniel T. Lee.
      
      9) Add LoongArch support to libbpf's bpf_tracing helper header,
         from Hengqi Chen.
      
      10) Fix a libbpf compiler warning in perf_event_open_probe on arm32,
          from Khem Raj.
      
      11) Optimize bpf_local_storage_elem by removing 56 bytes of padding,
          from Martin KaFai Lau.
      
      12) Use pkg-config to locate libelf for resolve_btfids build,
          from Shen Jiamin.
      
      13) Various libbpf improvements around API documentation and errno
          handling, from Xin Liu.
      
      * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (45 commits)
        libbpf: Return -ENODATA for missing btf section
        libbpf: Add LoongArch support to bpf_tracing.h
        libbpf: Restore errno after pr_warn.
        libbpf: Added the description of some API functions
        libbpf: Fix invalid return address register in s390
        samples/bpf: Use BPF_KSYSCALL macro in syscall tracing programs
        samples/bpf: Fix tracex2 by using BPF_KSYSCALL macro
        samples/bpf: Change _kern suffix to .bpf with syscall tracing program
        samples/bpf: Use vmlinux.h instead of implicit headers in syscall tracing program
        samples/bpf: Use kyscall instead of kprobe in syscall tracing program
        bpf: rename list_head -> graph_root in field info types
        libbpf: fix errno is overwritten after being closed.
        bpf: fix regs_exact() logic in regsafe() to remap IDs correctly
        bpf: perform byte-by-byte comparison only when necessary in regsafe()
        bpf: reject non-exact register type matches in regsafe()
        bpf: generalize MAYBE_NULL vs non-MAYBE_NULL rule
        bpf: reorganize struct bpf_reg_state fields
        bpf: teach refsafe() to take into account ID remapping
        bpf: Remove unused field initialization in bpf's ctl_table
        selftests/bpf: Add jit probe_mem corner case tests to s390x denylist
        ...
      ====================
      
      Link: https://lore.kernel.org/r/20230105000926.31350-1-daniel@iogearbox.net
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d75858ef
    • Jakub Kicinski's avatar
      Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 49d9601b
      Jakub Kicinski authored
      Alexei Starovoitov says:
      
      ====================
      bpf 2023-01-04
      
      We've added 5 non-merge commits during the last 8 day(s) which contain
      a total of 5 files changed, 112 insertions(+), 18 deletions(-).
      
      The main changes are:
      
      1) Always use maximal size for copy_array in the verifier to fix
         KASAN tracking, from Kees.
      
      2) Fix bpf task iterator walking through dead tasks, from Kui-Feng.
      
      3) Make sure livepatch and bpf fexit can coexist, from Chuang.
      
      * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
        bpf: Always use maximal size for copy_array()
        selftests/bpf: add a test for iter/task_vma for short-lived processes
        bpf: keep a reference to the mm, in case the task is dead.
        selftests/bpf: Temporarily disable part of btf_dump:var_data test.
        bpf: Fix panic due to wrong pageattr of im->image
      ====================
      
      Link: https://lore.kernel.org/r/20230104215500.79435-1-alexei.starovoitov@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      49d9601b
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 41c03ba9
      Linus Torvalds authored
      Pull virtio updates from Michael Tsirkin:
       "Mostly fixes all over the place, a couple of cleanups"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (32 commits)
        virtio_blk: Fix signedness bug in virtblk_prep_rq()
        vdpa_sim_net: should not drop the multicast/broadcast packet
        vdpasim: fix memory leak when freeing IOTLBs
        vdpa: conditionally fill max max queue pair for stats
        vdpa/vp_vdpa: fix kfree a wrong pointer in vp_vdpa_remove
        vduse: Validate vq_num in vduse_validate_config()
        tools/virtio: remove smp_read_barrier_depends()
        tools/virtio: remove stray characters
        vhost_vdpa: fix the crash in unmap a large memory
        virtio: Implementing attribute show with sysfs_emit
        virtio-crypto: fix memory leak in virtio_crypto_alg_skcipher_close_session()
        tools/virtio: Variable type completion
        vdpa_sim: fix vringh initialization in vdpasim_queue_ready()
        virtio_blk: use UINT_MAX instead of -1U
        vhost-vdpa: fix an iotlb memory leak
        vhost: fix range used in translate_desc()
        vringh: fix range used in iotlb_translate()
        vhost/vsock: Fix error handling in vhost_vsock_init()
        vdpa_sim: fix possible memory leak in vdpasim_net_init() and vdpasim_blk_init()
        tools: Delete the unneeded semicolon after curly braces
        ...
      41c03ba9
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2023-01-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 512dee0c
      Linus Torvalds authored
      Pull misc x86 fixes from Ingo Molnar:
       "Fix a double-free bug, a binutils warning, a header namespace clash
        and a bug in ib_prctl_set()"
      
      * tag 'x86-urgent-2023-01-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/bugs: Flush IBP in ib_prctl_set()
        x86/insn: Avoid namespace clash by separating instruction decoder MMIO type from MMIO trace type
        x86/asm: Fix an assembler warning with current binutils
        x86/kexec: Fix double-free of elf header buffer
      512dee0c
    • Linus Torvalds's avatar
      Merge tag 'f2fs-fix-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · 2ac44821
      Linus Torvalds authored
      Pull f2fs fixes from Jaegeuk Kim:
      
       - fix a null pointer dereference in f2fs_issue_flush, which occurs by
         the combination of mount/remount options.
      
       - fix a bug in per-block age-based extent_cache newly introduced in
         6.2-rc1, which reported a wrong age information in extent_cache.
      
       - fix a kernel panic if extent_tree was not created, which was caught
         by a wrong BUG_ON
      
      * tag 'f2fs-fix-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs:
        f2fs: let's avoid panic if extent_tree is not created
        f2fs: should use a temp extent_info for lookup
        f2fs: don't mix to use union values in extent_info
        f2fs: initialize extent_cache parameter
        f2fs: fix to avoid NULL pointer dereference in f2fs_issue_flush()
      2ac44821