1. 17 Jan, 2024 5 commits
  2. 11 Jan, 2024 1 commit
    • Jens Axboe's avatar
      io_uring/rsrc: improve code generation for fixed file assignment · 3f302388
      Jens Axboe authored
      For the normal read/write path, we have already locked the ring
      submission side when assigning the file. This causes branch
      mispredictions when we then check and try and lock again in
      io_req_set_rsrc_node(). As this is a very hot path, this matters.
      
      Add a basic helper that already assumes we already have it locked,
      and use that in io_file_get_fixed().
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      3f302388
  3. 10 Jan, 2024 1 commit
    • Jens Axboe's avatar
      io_uring/rw: cleanup io_rw_done() · fe80eb15
      Jens Axboe authored
      This originally came from the aio side, and it's laid out rather oddly.
      The common case here is that we either get -EIOCBQUEUED from submitting
      an async request, or that we complete the request correctly with the
      given number of bytes. Handling the odd internal restart error codes
      is not a common operation.
      
      Lay it out a bit more optimally that better explains the normal flow,
      and switch to avoiding the indirect call completely as this is our
      kiocb and we know the completion handler can only be one of two
      possible variants. While at it, move it to where it belongs in the
      file, with fellow end IO helpers.
      
      Outside of being easier to read, this also reduces the text size of the
      function by 24 bytes for me on arm64.
      Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      fe80eb15
  4. 04 Jan, 2024 1 commit
    • Jens Axboe's avatar
      io_uring: ensure local task_work is run on wait timeout · 6ff1407e
      Jens Axboe authored
      A previous commit added an earlier break condition here, which is fine if
      we're using non-local task_work as it'll be run on return to userspace.
      However, if DEFER_TASKRUN is used, then we could be leaving local
      task_work that is ready to process in the ctx list until next time that
      we enter the kernel to wait for events.
      
      Move the break condition to _after_ we have run task_work.
      
      Cc: stable@vger.kernel.org
      Fixes: 846072f1 ("io_uring: mimimise io_cqring_wait_schedule")
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      6ff1407e
  5. 21 Dec, 2023 2 commits
    • Jens Axboe's avatar
      io_uring/kbuf: add method for returning provided buffer ring head · d293b1a8
      Jens Axboe authored
      The tail of the provided ring buffer is shared between the kernel and
      the application, but the head is private to the kernel as the
      application doesn't need to see it. However, this also prevents the
      application from knowing how many buffers the kernel has consumed.
      Usually this is fine, as the information is inherently racy in that
      the kernel could be consuming buffers continually, but for cleanup
      purposes it may be relevant to know how many buffers are still left
      in the ring.
      
      Add IORING_REGISTER_PBUF_STATUS which will return status for a given
      provided buffer ring. Right now it just returns the head, but space
      is reserved for more information later in, if needed.
      
      Link: https://github.com/axboe/liburing/discussions/1020Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      d293b1a8
    • Jens Axboe's avatar
      io_uring/rw: ensure io->bytes_done is always initialized · 0a535edd
      Jens Axboe authored
      If IOSQE_ASYNC is set and we fail importing an iovec for a readv or
      writev request, then we leave ->bytes_done uninitialized and hence the
      eventual failure CQE posted can potentially have a random res value
      rather than the expected -EINVAL.
      
      Setup ->bytes_done before potentially failing, so we have a consistent
      value if we fail the request early.
      
      Cc: stable@vger.kernel.org
      Reported-by: default avatarxingwei lee <xrivendell7@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      0a535edd
  6. 19 Dec, 2023 3 commits
  7. 12 Dec, 2023 14 commits
  8. 10 Dec, 2023 7 commits
  9. 09 Dec, 2023 6 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