1. 13 Dec, 2023 18 commits
  2. 12 Dec, 2023 5 commits
  3. 10 Dec, 2023 7 commits
  4. 09 Dec, 2023 10 commits
    • Linus Torvalds's avatar
      Merge tag 'usb-6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 21b73ffc
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes for 6.7-rc5 to resolve some reported
        issues. Included in here are:
      
         - usb gadget f_hid, and uevent fix
      
         - xhci driver revert to resolve a much-reported issue
      
         - typec driver fix
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: gadget: f_hid: fix report descriptor allocation
        Revert "xhci: Loosen RPM as default policy to cover for AMD xHC 1.1"
        usb: typec: class: fix typec_altmode_put_partner to put plugs
        USB: gadget: core: adjust uevent timing on gadget unbind
      21b73ffc
    • Linus Torvalds's avatar
      Merge tag 'tty-6.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 0b526090
      Linus Torvalds authored
      Pull serial driver fixes from Greg KH:
       "Here are some small serial driver fixes for 6.7-rc4 to resolve some
        reported issues. Included in here are:
      
         - pl011 dma support fix
      
         - sc16is7xx driver fix
      
         - ma35d1 console index fix
      
         - 8250 driver fixes for small issues
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'tty-6.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        serial: 8250_dw: Add ACPI ID for Granite Rapids-D UART
        serial: ma35d1: Validate console index before assignment
        ARM: PL011: Fix DMA support
        serial: sc16is7xx: address RX timeout interrupt errata
        serial: 8250: 8250_omap: Clear UART_HAS_RHR_IT_DIS bit
        serial: 8250_omap: Add earlycon support for the AM654 UART controller
        serial: 8250: 8250_omap: Do not start RX DMA on THRI interrupt
      0b526090
    • Linus Torvalds's avatar
      Merge tag 'char-misc-6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · ca20f162
      Linus Torvalds authored
      Pull char / misc driver fixes from Greg KH:
       "Here are some small fixes for 6.7-rc5 for a variety of small driver
        subsystems. Included in here are:
      
         - debugfs revert for reported issue
      
         - greybus revert for reported issue
      
         - greybus fixup for endian build warning
      
         - coresight driver fixes
      
         - nvmem driver fixes
      
         - devcoredump fix
      
         - parport new device id
      
         - ndtest build fix
      
        All of these have ben in linux-next with no reported issues"
      
      * tag 'char-misc-6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        nvmem: Do not expect fixed layouts to grab a layout driver
        parport: Add support for Brainboxes IX/UC/PX parallel cards
        Revert "greybus: gb-beagleplay: Ensure le for values in transport"
        greybus: gb-beagleplay: Ensure le for values in transport
        greybus: BeaglePlay driver needs CRC_CCITT
        Revert "debugfs: annotate debugfs handlers vs. removal with lockdep"
        devcoredump: Send uevent once devcd is ready
        ndtest: fix typo class_regster -> class_register
        misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write
        misc: mei: client.c: return negative error code in mei_cl_write
        mei: pxp: fix mei_pxp_send_message return value
        coresight: ultrasoc-smb: Fix uninitialized before use buf_hw_base
        coresight: ultrasoc-smb: Config SMB buffer before register sink
        coresight: ultrasoc-smb: Fix sleep while close preempt in enable_smb
        Documentation: coresight: fix `make refcheckdocs` warning
        hwtracing: hisi_ptt: Don't try to attach a task
        hwtracing: hisi_ptt: Handle the interrupt in hardirq context
        hwtracing: hisi_ptt: Add dummy callback pmu::read()
        coresight: Fix crash when Perf and sysfs modes are used concurrently
        coresight: etm4x: Remove bogous __exit annotation for some functions
      ca20f162
    • Linus Torvalds's avatar
      Merge tag 'loongarch-fixes-6.7-2' of... · b10a3cca
      Linus Torvalds authored
      Merge tag 'loongarch-fixes-6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
      
      Pull LoongArch fixes from Huacai Chen:
       "Preserve syscall nr across execve(), slightly clean up drdtime(), fix
        the Clang built zboot kernel, fix a stack unwinder bug and several bpf
        jit bugs"
      
      * tag 'loongarch-fixes-6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
        LoongArch: BPF: Fix unconditional bswap instructions
        LoongArch: BPF: Fix sign-extension mov instructions
        LoongArch: BPF: Don't sign extend function return value
        LoongArch: BPF: Don't sign extend memory load operand
        LoongArch: Preserve syscall nr across execve()
        LoongArch: Set unwind stack type to unknown rather than set error flag
        LoongArch: Slightly clean up drdtime()
        LoongArch: Apply dynamic relocations for LLD
      b10a3cca
    • Linus Torvalds's avatar
      Merge tag 'mips-fixes_6.7_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · b8503b21
      Linus Torvalds authored
      Pull MIPS fixes from Thomas Bogendoerfer:
      
       - Fixes for broken Loongson firmware
      
       - Fix lockdep splat
      
       - Fix FPU states when creating kernel threads
      
      * tag 'mips-fixes_6.7_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: kernel: Clear FPU states when setting up kernel threads
        MIPS: Loongson64: Handle more memory types passed from firmware
        MIPS: Loongson64: Enable DMA noncoherent support
        MIPS: Loongson64: Reserve vgabios memory on boot
        mips/smp: Call rcutree_report_cpu_starting() earlier
      b8503b21
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v6.7-2-2023-12-08' of... · 9d3bc457
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v6.7-2-2023-12-08' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools
      
      Pull perf tools fixes from Namhyung Kim:
       "A random set of small bug fixes including:
      
         - Fix segfault on AmpereOne due to missing default metricgroup name
      
         - Fix segfault on `perf list --json` due to NULL pointer"
      
      * tag 'perf-tools-fixes-for-v6.7-2-2023-12-08' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools:
        perf list: Fix JSON segfault by setting the used skip_duplicate_pmus callback
        perf vendor events arm64: AmpereOne: Add missing DefaultMetricgroupName fields
        perf metrics: Avoid segv if default metricgroup isn't set
      9d3bc457
    • Linus Torvalds's avatar
      Merge tag '6.7-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 2099306c
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
       "Six smb3 client fixes:
      
         - Fixes for copy_file_range and clone (cache invalidation and file
           size), also addresses an xfstest failure
      
         - Fix to return proper error if REMAP_FILE_DEDUP set (also fixes
           xfstest generic/304)
      
         - Fix potential null pointer reference with DFS
      
         - Multichannel fix addressing (reverting an earlier patch) some of
           the problems with enabling/disabling channels dynamically
      
        Still working on a followon multichannel fix to address another issue
        found in reconnect testing that will send next week"
      
      * tag '6.7-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: reconnect worker should take reference on server struct unconditionally
        Revert "cifs: reconnect work should have reference on server struct"
        cifs: Fix non-availability of dedup breaking generic/304
        smb: client: fix potential NULL deref in parse_dfs_referrals()
        cifs: Fix flushing, invalidation and file size with FICLONE
        cifs: Fix flushing, invalidation and file size with copy_file_range()
      2099306c
    • Tiezhu Yang's avatar
      LoongArch: BPF: Fix unconditional bswap instructions · e2f7b3d8
      Tiezhu Yang authored
      We can see that "bswap32: Takes an unsigned 32-bit number in either big-
      or little-endian format and returns the equivalent number with the same
      bit width but opposite endianness" in BPF Instruction Set Specification,
      so it should clear the upper 32 bits in "case 32:" for both BPF_ALU and
      BPF_ALU64.
      
      [root@linux fedora]# echo 1 > /proc/sys/net/core/bpf_jit_enable
      [root@linux fedora]# modprobe test_bpf
      
      Before:
      test_bpf: #313 BSWAP 32: 0x0123456789abcdef -> 0xefcdab89 jited:1 ret 1460850314 != -271733879 (0x5712ce8a != 0xefcdab89)FAIL (1 times)
      test_bpf: #317 BSWAP 32: 0xfedcba9876543210 -> 0x10325476 jited:1 ret -1460850316 != 271733878 (0xa8ed3174 != 0x10325476)FAIL (1 times)
      
      After:
      test_bpf: #313 BSWAP 32: 0x0123456789abcdef -> 0xefcdab89 jited:1 4 PASS
      test_bpf: #317 BSWAP 32: 0xfedcba9876543210 -> 0x10325476 jited:1 4 PASS
      
      Fixes: 4ebf9216 ("LoongArch: BPF: Support unconditional bswap instructions")
      Acked-by: default avatarHengqi Chen <hengqi.chen@gmail.com>
      Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      e2f7b3d8
    • Tiezhu Yang's avatar
      LoongArch: BPF: Fix sign-extension mov instructions · 772cbe94
      Tiezhu Yang authored
      We can see that "Short form of movsx, dst_reg = (s8,s16,s32)src_reg" in
      include/linux/filter.h, additionally, for BPF_ALU64 the value of the
      destination register is unchanged whereas for BPF_ALU the upper 32 bits
      of the destination register are zeroed, so it should clear the upper 32
      bits for BPF_ALU.
      
      [root@linux fedora]# echo 1 > /proc/sys/net/core/bpf_jit_enable
      [root@linux fedora]# modprobe test_bpf
      
      Before:
      test_bpf: #81 ALU_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times)
      test_bpf: #82 ALU_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times)
      
      After:
      test_bpf: #81 ALU_MOVSX | BPF_B jited:1 6 PASS
      test_bpf: #82 ALU_MOVSX | BPF_H jited:1 6 PASS
      
      By the way, the bpf selftest case "./test_progs -t verifier_movsx" can
      also be fixed with this patch.
      
      Fixes: f48012f1 ("LoongArch: BPF: Support sign-extension mov instructions")
      Acked-by: default avatarHengqi Chen <hengqi.chen@gmail.com>
      Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      772cbe94
    • Hengqi Chen's avatar
      LoongArch: BPF: Don't sign extend function return value · 5d47ec2e
      Hengqi Chen authored
      The `cls_redirect` test triggers a kernel panic like:
      
        # ./test_progs -t cls_redirect
        Can't find bpf_testmod.ko kernel module: -2
        WARNING! Selftests relying on bpf_testmod.ko will be skipped.
        [   30.938489] CPU 3 Unable to handle kernel paging request at virtual address fffffffffd814de0, era == ffff800002009fb8, ra == ffff800002009f9c
        [   30.939331] Oops[#1]:
        [   30.939513] CPU: 3 PID: 1260 Comm: test_progs Not tainted 6.7.0-rc2-loong-devel-g2f56bb0d2327 #35 a896aca3f4164f09cc346f89f2e09832e07be5f6
        [   30.939732] Hardware name: QEMU QEMU Virtual Machine, BIOS unknown 2/2/2022
        [   30.939901] pc ffff800002009fb8 ra ffff800002009f9c tp 9000000104da4000 sp 9000000104da7ab0
        [   30.940038] a0 fffffffffd814de0 a1 9000000104da7a68 a2 0000000000000000 a3 9000000104da7c10
        [   30.940183] a4 9000000104da7c14 a5 0000000000000002 a6 0000000000000021 a7 00005555904d7f90
        [   30.940321] t0 0000000000000110 t1 0000000000000000 t2 fffffffffd814de0 t3 0004c4b400000000
        [   30.940456] t4 ffffffffffffffff t5 00000000c3f63600 t6 0000000000000000 t7 0000000000000000
        [   30.940590] t8 000000000006d803 u0 0000000000000020 s9 9000000104da7b10 s0 900000010504c200
        [   30.940727] s1 fffffffffd814de0 s2 900000010504c200 s3 9000000104da7c10 s4 9000000104da7ad0
        [   30.940866] s5 0000000000000000 s6 90000000030e65bc s7 9000000104da7b44 s8 90000000044f6fc0
        [   30.941015]    ra: ffff800002009f9c bpf_prog_846803e5ae81417f_cls_redirect+0xa0/0x590
        [   30.941535]   ERA: ffff800002009fb8 bpf_prog_846803e5ae81417f_cls_redirect+0xbc/0x590
        [   30.941696]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
        [   30.942224]  PRMD: 00000004 (PPLV0 +PIE -PWE)
        [   30.942330]  EUEN: 00000003 (+FPE +SXE -ASXE -BTE)
        [   30.942453]  ECFG: 00071c1c (LIE=2-4,10-12 VS=7)
        [   30.942612] ESTAT: 00010000 [PIL] (IS= ECode=1 EsubCode=0)
        [   30.942764]  BADV: fffffffffd814de0
        [   30.942854]  PRID: 0014c010 (Loongson-64bit, Loongson-3A5000)
        [   30.942974] Modules linked in:
        [   30.943078] Process test_progs (pid: 1260, threadinfo=00000000ce303226, task=000000007d10bb76)
        [   30.943306] Stack : 900000010a064000 90000000044f6fc0 9000000104da7b48 0000000000000000
        [   30.943495]         0000000000000000 9000000104da7c14 9000000104da7c10 900000010504c200
        [   30.943626]         0000000000000001 ffff80001b88c000 9000000104da7b70 90000000030e6668
        [   30.943785]         0000000000000000 9000000104da7b58 ffff80001b88c048 9000000003d05000
        [   30.943936]         900000000303ac88 0000000000000000 0000000000000000 9000000104da7b70
        [   30.944091]         0000000000000000 0000000000000001 0000000731eeab00 0000000000000000
        [   30.944245]         ffff80001b88c000 0000000000000000 0000000000000000 54b99959429f83b8
        [   30.944402]         ffff80001b88c000 90000000044f6fc0 9000000101d70000 ffff80001b88c000
        [   30.944538]         000000000000005a 900000010504c200 900000010a064000 900000010a067000
        [   30.944697]         9000000104da7d88 0000000000000000 9000000003d05000 90000000030e794c
        [   30.944852]         ...
        [   30.944924] Call Trace:
        [   30.945120] [<ffff800002009fb8>] bpf_prog_846803e5ae81417f_cls_redirect+0xbc/0x590
        [   30.945650] [<90000000030e6668>] bpf_test_run+0x1ec/0x2f8
        [   30.945958] [<90000000030e794c>] bpf_prog_test_run_skb+0x31c/0x684
        [   30.946065] [<90000000026d4f68>] __sys_bpf+0x678/0x2724
        [   30.946159] [<90000000026d7288>] sys_bpf+0x20/0x2c
        [   30.946253] [<90000000032dd224>] do_syscall+0x7c/0x94
        [   30.946343] [<9000000002541c5c>] handle_syscall+0xbc/0x158
        [   30.946492]
        [   30.946549] Code: 0015030e  5c0009c0  5001d000 <28c00304> 02c00484  29c00304  00150009  2a42d2e4  0280200d
        [   30.946793]
        [   30.946971] ---[ end trace 0000000000000000 ]---
        [   32.093225] Kernel panic - not syncing: Fatal exception in interrupt
        [   32.093526] Kernel relocated by 0x2320000
        [   32.093630]  .text @ 0x9000000002520000
        [   32.093725]  .data @ 0x9000000003400000
        [   32.093792]  .bss  @ 0x9000000004413200
        [   34.971998] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
      
      This is because we signed-extend function return values. When subprog
      mode is enabled, we have:
      
        cls_redirect()
          -> get_global_metrics() returns pcpu ptr 0xfffffefffc00b480
      
      The pointer returned is later signed-extended to 0xfffffffffc00b480 at
      `BPF_JMP | BPF_EXIT`. During BPF prog run, this triggers unhandled page
      fault and a kernel panic.
      
      Drop the unnecessary signed-extension on return values like other
      architectures do.
      
      With this change, we have:
      
        # ./test_progs -t cls_redirect
        Can't find bpf_testmod.ko kernel module: -2
        WARNING! Selftests relying on bpf_testmod.ko will be skipped.
        #51/1    cls_redirect/cls_redirect_inlined:OK
        #51/2    cls_redirect/IPv4 TCP accept unknown (no hops, flags: SYN):OK
        #51/3    cls_redirect/IPv6 TCP accept unknown (no hops, flags: SYN):OK
        #51/4    cls_redirect/IPv4 TCP accept unknown (no hops, flags: ACK):OK
        #51/5    cls_redirect/IPv6 TCP accept unknown (no hops, flags: ACK):OK
        #51/6    cls_redirect/IPv4 TCP forward unknown (one hop, flags: ACK):OK
        #51/7    cls_redirect/IPv6 TCP forward unknown (one hop, flags: ACK):OK
        #51/8    cls_redirect/IPv4 TCP accept known (one hop, flags: ACK):OK
        #51/9    cls_redirect/IPv6 TCP accept known (one hop, flags: ACK):OK
        #51/10   cls_redirect/IPv4 UDP accept unknown (no hops, flags: none):OK
        #51/11   cls_redirect/IPv6 UDP accept unknown (no hops, flags: none):OK
        #51/12   cls_redirect/IPv4 UDP forward unknown (one hop, flags: none):OK
        #51/13   cls_redirect/IPv6 UDP forward unknown (one hop, flags: none):OK
        #51/14   cls_redirect/IPv4 UDP accept known (one hop, flags: none):OK
        #51/15   cls_redirect/IPv6 UDP accept known (one hop, flags: none):OK
        #51/16   cls_redirect/cls_redirect_subprogs:OK
        #51/17   cls_redirect/IPv4 TCP accept unknown (no hops, flags: SYN):OK
        #51/18   cls_redirect/IPv6 TCP accept unknown (no hops, flags: SYN):OK
        #51/19   cls_redirect/IPv4 TCP accept unknown (no hops, flags: ACK):OK
        #51/20   cls_redirect/IPv6 TCP accept unknown (no hops, flags: ACK):OK
        #51/21   cls_redirect/IPv4 TCP forward unknown (one hop, flags: ACK):OK
        #51/22   cls_redirect/IPv6 TCP forward unknown (one hop, flags: ACK):OK
        #51/23   cls_redirect/IPv4 TCP accept known (one hop, flags: ACK):OK
        #51/24   cls_redirect/IPv6 TCP accept known (one hop, flags: ACK):OK
        #51/25   cls_redirect/IPv4 UDP accept unknown (no hops, flags: none):OK
        #51/26   cls_redirect/IPv6 UDP accept unknown (no hops, flags: none):OK
        #51/27   cls_redirect/IPv4 UDP forward unknown (one hop, flags: none):OK
        #51/28   cls_redirect/IPv6 UDP forward unknown (one hop, flags: none):OK
        #51/29   cls_redirect/IPv4 UDP accept known (one hop, flags: none):OK
        #51/30   cls_redirect/IPv6 UDP accept known (one hop, flags: none):OK
        #51/31   cls_redirect/cls_redirect_dynptr:OK
        #51/32   cls_redirect/IPv4 TCP accept unknown (no hops, flags: SYN):OK
        #51/33   cls_redirect/IPv6 TCP accept unknown (no hops, flags: SYN):OK
        #51/34   cls_redirect/IPv4 TCP accept unknown (no hops, flags: ACK):OK
        #51/35   cls_redirect/IPv6 TCP accept unknown (no hops, flags: ACK):OK
        #51/36   cls_redirect/IPv4 TCP forward unknown (one hop, flags: ACK):OK
        #51/37   cls_redirect/IPv6 TCP forward unknown (one hop, flags: ACK):OK
        #51/38   cls_redirect/IPv4 TCP accept known (one hop, flags: ACK):OK
        #51/39   cls_redirect/IPv6 TCP accept known (one hop, flags: ACK):OK
        #51/40   cls_redirect/IPv4 UDP accept unknown (no hops, flags: none):OK
        #51/41   cls_redirect/IPv6 UDP accept unknown (no hops, flags: none):OK
        #51/42   cls_redirect/IPv4 UDP forward unknown (one hop, flags: none):OK
        #51/43   cls_redirect/IPv6 UDP forward unknown (one hop, flags: none):OK
        #51/44   cls_redirect/IPv4 UDP accept known (one hop, flags: none):OK
        #51/45   cls_redirect/IPv6 UDP accept known (one hop, flags: none):OK
        #51      cls_redirect:OK
        Summary: 1/45 PASSED, 0 SKIPPED, 0 FAILED
      
      Fixes: 5dc61552 ("LoongArch: Add BPF JIT support")
      Signed-off-by: default avatarHengqi Chen <hengqi.chen@gmail.com>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      5d47ec2e