Skip to content
Snippets Groups Projects
  1. Feb 20, 2025
  2. Feb 18, 2025
    • Linus Torvalds's avatar
      Merge tag 'sound-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 6537cfb3
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A slightly large collection of fixes, spread over various drivers.
      
        Almost all are small and device-specific fixes and quirks in ASoC SOF
        Intel and AMD, Renesas, Cirrus, HD-audio, in addition to a small fix
        for MIDI 2.0"
      
      * tag 'sound-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (41 commits)
        ALSA: seq: Drop UMP events when no UMP-conversion is set
        ALSA: hda/conexant: Add quirk for HP ProBook 450 G4 mute LED
        ALSA: hda/cirrus: Reduce codec resume time
        ALSA: hda/cirrus: Correct the full scale volume set logic
        virtio_snd.h: clarify that `controls` depends on VIRTIO_SND_F_CTLS
        ALSA: hda: Add error check for snd_ctl_rename_id() in snd_hda_create_dig_out_ctls()
        ALSA: hda/tas2781: Fix index issue in tas2781 hda SPI driver
        ASoC: imx-audmix: remove cpu_mclk which is from cpu dai device
        ALSA: hda/realtek: Fixup ALC225 depop procedure
        ALSA: hda/tas2781: Update tas2781 hda SPI driver
        ASoC: cs35l41: Fix acpi_device_hid() not found
        ASoC: SOF: amd: Add branch prediction hint in ACP IRQ handler
        ASoC: SOF: amd: Handle IPC replies before FW_BOOT_COMPLETE
        ASoC: SOF: amd: Drop unused includes from Vangogh driver
        ASoC: SOF: amd: Add post_fw_run_delay ACP quirk
        ASoC: Intel: soc-acpi-intel-ptl-match: revise typo of rt713_vb_l2_rt1320_l13
        ASoC: Intel: soc-acpi-intel-ptl-match: revise typo of rt712_vb + rt1320 support
        ALSA: Switch to use hrtimer_setup()
        ALSA: hda: hda-intel: add Panther Lake-H support
        ASoC: SOF: Intel: pci-ptl: Add support for PTL-H
        ...
      6537cfb3
  3. Feb 17, 2025
    • Linus Torvalds's avatar
      Merge tag 'vfs-6.14-rc4.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs · 2408a807
      Linus Torvalds authored
      Pull vfs fixes from Christian Brauner:
       "It was reported that the acct(2) system call can be used to trigger a
        NULL deref in cases where it is set to write to a file that triggers
        an internal lookup.
      
        This can e.g., happen when pointing acct(2) to /sys/power/resume. At
        the point the where the write to this file happens the calling task
        has already exited and called exit_fs() but an internal lookup might
        be triggered through lookup_bdev(). This may trigger a NULL-deref when
        accessing current->fs.
      
        Reorganize the code so that the the final write happens from the
        workqueue but with the caller's credentials. This preserves the
        (strange) permission model and has almost no regression risk.
      
        Also block access to kernel internal filesystems as well as procfs and
        sysfs in the first place.
      
        Various fixes for netfslib:
      
         - Fix a number of read-retry hangs, including:
      
            - Incorrect getting/putting of references on subreqs as we retry
              them
      
            - Failure to track whether a last old subrequest in a retried set
              is superfluous
      
            - Inconsistency in the usage of wait queues used for subrequests
              (ie. using clear_and_wake_up_bit() whilst waiting on a private
              waitqueue)
      
         - Add stats counters for retries and publish in /proc/fs/netfs/stats.
           This is not a fix per se, but is useful in debugging and shouldn't
           otherwise change the operation of the code
      
         - Fix the ordering of queuing subrequests with respect to setting the
           request flag that says we've now queued them all"
      
      * tag 'vfs-6.14-rc4.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
        netfs: Fix setting NETFS_RREQ_ALL_QUEUED to be after all subreqs queued
        netfs: Add retry stat counters
        netfs: Fix a number of read-retry hangs
        acct: block access to kernel internal filesystems
        acct: perform last write from workqueue
      2408a807
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 6186bdd1
      Linus Torvalds authored
      Pull powerpc fixes from Madhavan Srinivasan:
      
       - Couple of patches to fix KASAN failduring boot
      
       - Fix to avoid warnings/errors when building with 4k page size
      
      Thanks to Christophe Leroy, Ritesh Harjani (IBM), and Erhard Furtner
      
      * tag 'powerpc-6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/code-patching: Fix KASAN hit by not flagging text patching area as VM_ALLOC
        powerpc/64s: Rewrite __real_pte() and __rpte_to_hidx() as static inline
        powerpc/code-patching: Disable KASAN report during patching via temporary mm
      6186bdd1
    • Takashi Iwai's avatar
      ALSA: seq: Drop UMP events when no UMP-conversion is set · e77aa4b2
      Takashi Iwai authored
      When a destination client is a user client in the legacy MIDI mode and
      it sets the no-UMP-conversion flag, currently the all UMP events are
      still passed as-is.  But this may confuse the user-space, because the
      event packet size is different from the legacy mode.
      
      Since we cannot handle UMP events in user clients unless it's running
      in the UMP client mode, we should filter out those events instead of
      accepting blindly.  This patch addresses it by slightly adjusting the
      conditions for UMP event handling at the event delivery time.
      
      Fixes: 329ffe11 ("ALSA: seq: Allow suppressing UMP conversions")
      Link: https://lore.kernel.org/b77a2cd6-7b59-4eb0-a8db-22d507d3af5f@gmail.com
      Link: https://patch.msgid.link/20250217170034.21930-1-tiwai@suse.de
      
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e77aa4b2
    • John Veness's avatar
      ALSA: hda/conexant: Add quirk for HP ProBook 450 G4 mute LED · 6d1f8661
      John Veness authored and Takashi Iwai's avatar Takashi Iwai committed
      
      Allows the LED on the dedicated mute button on the HP ProBook 450 G4
      laptop to change colour correctly.
      
      Signed-off-by: default avatarJohn Veness <john-linux@pelago.org.uk>
      Cc: <stable@vger.kernel.org>
      Link: https://patch.msgid.link/2fb55d48-6991-4a42-b591-4c78f2fad8d7@pelago.org.uk
      
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6d1f8661
  4. Feb 16, 2025
    • Linus Torvalds's avatar
      Linux 6.14-rc3 · 0ad2507d
      Linus Torvalds authored
      0ad2507d
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v6.14-2' of... · 224e7451
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix annoying logs when building tools in parallel
      
       - Fix the Debian linux-headers package build again
      
       - Fix the target triple detection for userspace programs on Clang
      
      * tag 'kbuild-fixes-v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        modpost: Fix a few typos in a comment
        kbuild: userprogs: fix bitsize and target detection on clang
        kbuild: fix linux-headers package build when $(CC) cannot link userspace
        tools: fix annoying "mkdir -p ..." logs when building tools in parallel
      224e7451
    • Linus Torvalds's avatar
      Merge tag 'driver-core-6.14-rc3' of... · ae5fa8ce
      Linus Torvalds authored
      Merge tag 'driver-core-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core api addition from Greg KH:
       "Here is a driver core new api for 6.14-rc3 that is being added to
        allow platform devices from stop being abused.
      
        It adds a new 'faux_device' structure and bus and api to allow almost
        a straight or simpler conversion from platform devices that were not
        really a platform device. It also comes with a binding for rust, with
        an example driver in rust showing how it's used.
      
        I'm adding this now so that the patches that convert the different
        drivers and subsystems can all start flowing into linux-next now
        through their different development trees, in time for 6.15-rc1.
      
        We have a number that are already reviewed and tested, but adding
        those conversions now doesn't seem right. For now, no one is using
        this, and it passes all build tests from 0-day and linux-next, so all
        should be good"
      
      * tag 'driver-core-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        rust/kernel: Add faux device bindings
        driver core: add a faux bus for use when a simple device/bus is needed
      ae5fa8ce
    • Linus Torvalds's avatar
      Merge tag 'tty-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 56400391
      Linus Torvalds authored
      Pull serial driver fixes from Greg KH:
       "Here are some small serial driver fixes for some reported problems.
        Nothing major, just:
      
         - sc16is7xx irq check fix
      
         - 8250 fifo underflow fix
      
         - serial_port and 8250 iotype fixes
      
        Most of these have been in linux-next already, and all have passed
        0-day testing"
      
      * tag 'tty-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        serial: 8250: Fix fifo underflow on flush
        serial: 8250_pnp: Remove unneeded ->iotype assignment
        serial: 8250_platform: Remove unneeded ->iotype assignment
        serial: 8250_of: Remove unneeded ->iotype assignment
        serial: port: Make ->iotype validation global in __uart_read_properties()
        serial: port: Always update ->iotype in __uart_read_properties()
        serial: port: Assign ->iotype correctly when ->iobase is set
        serial: sc16is7xx: Fix IRQ number check behavior
      56400391
    • Linus Torvalds's avatar
      Merge tag 'usb-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 6bfcc5fb
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB driver fixes, and new device ids, for
        6.14-rc3. Lots of tiny stuff for reported problems, including:
      
         - new device ids and quirks
      
         - usb hub crash fix found by syzbot
      
         - dwc2 driver fix
      
         - dwc3 driver fixes
      
         - uvc gadget driver fix
      
         - cdc-acm driver fixes for a variety of different issues
      
         - other tiny bugfixes
      
        Almost all of these have been in linux-next this week, and all have
        passed 0-day testing"
      
      * tag 'usb-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (25 commits)
        usb: typec: tcpm: PSSourceOffTimer timeout in PR_Swap enters ERROR_RECOVERY
        usb: roles: set switch registered flag early on
        usb: gadget: uvc: Fix unstarted kthread worker
        USB: quirks: add USB_QUIRK_NO_LPM quirk for Teclast dist
        usb: gadget: core: flush gadget workqueue after device removal
        USB: gadget: f_midi: f_midi_complete to call queue_work
        usb: core: fix pipe creation for get_bMaxPacketSize0
        usb: dwc3: Fix timeout issue during controller enter/exit from halt state
        USB: Add USB_QUIRK_NO_LPM quirk for sony xperia xz1 smartphone
        USB: cdc-acm: Fill in Renesas R-Car D3 USB Download mode quirk
        usb: cdc-acm: Fix handling of oversized fragments
        usb: cdc-acm: Check control transfer buffer size before access
        usb: xhci: Restore xhci_pci support for Renesas HCs
        USB: pci-quirks: Fix HCCPARAMS register error for LS7A EHCI
        USB: serial: option: drop MeiG Smart defines
        USB: serial: option: fix Telit Cinterion FN990A name
        USB: serial: option: add Telit Cinterion FN990B compositions
        USB: serial: option: add MeiG Smart SLM828
        usb: gadget: f_midi: fix MIDI Streaming descriptor lengths
        usb: dwc2: gadget: remove of_node reference upon udc_stop
        ...
      6bfcc5fb
    • Linus Torvalds's avatar
      Merge tag 'irq_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ba643b6d
      Linus Torvalds authored
      Pull irq Kconfig cleanup from Borislav Petkov:
      
       - Remove an unused config item GENERIC_PENDING_IRQ_CHIPFLAGS
      
      * tag 'irq_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq: Remove unused CONFIG_GENERIC_PENDING_IRQ_CHIPFLAGS
      ba643b6d
    • Linus Torvalds's avatar
      Merge tag 'perf_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ff1848d8
      Linus Torvalds authored
      Pull x86 perf fixes from Borislav Petkov:
      
       - Explicitly clear DEBUGCTL.LBR to prevent LBRs continuing being
         enabled after handoff to the OS
      
       - Check CPUID(0x23) leaf and subleafs presence properly
      
       - Remove the PEBS-via-PT feature from being supported on hybrid systems
      
       - Fix perf record/top default commands on systems without a raw PMU
         registered
      
      * tag 'perf_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/intel: Ensure LBRs are disabled when a CPU is starting
        perf/x86/intel: Fix ARCH_PERFMON_NUM_COUNTER_LEAF
        perf/x86/intel: Clean up PEBS-via-PT on hybrid
        perf/x86/rapl: Fix the error checking order
      ff1848d8
    • Linus Torvalds's avatar
      Merge tag 'sched_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ff3b373e
      Linus Torvalds authored
      Pull scheduler fix from Borislav Petkov:
      
       - Clarify what happens when a task is woken up from the wake queue and
         make clear its removal from that queue is atomic
      
      * tag 'sched_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched: Clarify wake_up_q()'s write to task->wake_q.next
      ff3b373e
    • Linus Torvalds's avatar
      Merge tag 'objtool_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 592c358e
      Linus Torvalds authored
      Pull objtool fixes from Borislav Petkov:
      
       - Move a warning about a lld.ld breakage into the verbose setting as
         said breakage has been fixed in the meantime
      
       - Teach objtool to ignore dangling jump table entries added by Clang
      
      * tag 'objtool_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        objtool: Move dodgy linker warn to verbose
        objtool: Ignore dangling jump table entries
      592c358e
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 82ff3164
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "ARM:
      
         - Large set of fixes for vector handling, especially in the
           interactions between host and guest state.
      
           This fixes a number of bugs affecting actual deployments, and
           greatly simplifies the FP/SIMD/SVE handling. Thanks to Mark Rutland
           for dealing with this thankless task.
      
         - Fix an ugly race between vcpu and vgic creation/init, resulting in
           unexpected behaviours
      
         - Fix use of kernel VAs at EL2 when emulating timers with nVHE
      
         - Small set of pKVM improvements and cleanups
      
        x86:
      
         - Fix broken SNP support with KVM module built-in, ensuring the PSP
           module is initialized before KVM even when the module
           infrastructure cannot be used to order initcalls
      
         - Reject Hyper-V SEND_IPI hypercalls if the local APIC isn't being
           emulated by KVM to fix a NULL pointer dereference
      
         - Enter guest mode (L2) from KVM's perspective before initializing
           the vCPU's nested NPT MMU so that the MMU is properly tagged for
           L2, not L1
      
         - Load the guest's DR6 outside of the innermost .vcpu_run() loop, as
           the guest's value may be stale if a VM-Exit is handled in the
           fastpath"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (25 commits)
        x86/sev: Fix broken SNP support with KVM module built-in
        KVM: SVM: Ensure PSP module is initialized if KVM module is built-in
        crypto: ccp: Add external API interface for PSP module initialization
        KVM: arm64: vgic: Hoist SGI/PPI alloc from vgic_init() to kvm_create_vgic()
        KVM: arm64: timer: Drop warning on failed interrupt signalling
        KVM: arm64: Fix alignment of kvm_hyp_memcache allocations
        KVM: arm64: Convert timer offset VA when accessed in HYP code
        KVM: arm64: Simplify warning in kvm_arch_vcpu_load_fp()
        KVM: arm64: Eagerly switch ZCR_EL{1,2}
        KVM: arm64: Mark some header functions as inline
        KVM: arm64: Refactor exit handlers
        KVM: arm64: Refactor CPTR trap deactivation
        KVM: arm64: Remove VHE host restore of CPACR_EL1.SMEN
        KVM: arm64: Remove VHE host restore of CPACR_EL1.ZEN
        KVM: arm64: Remove host FPSIMD saving for non-protected KVM
        KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state
        KVM: x86: Load DR6 with guest value only before entering .vcpu_run() loop
        KVM: nSVM: Enter guest mode before initializing nested NPT MMU
        KVM: selftests: Add CPUID tests for Hyper-V features that need in-kernel APIC
        KVM: selftests: Manage CPUID array in Hyper-V CPUID test's core helper
        ...
      82ff3164
    • Linus Torvalds's avatar
      Merge tag 'mips-fixes_6.14_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · b878a1c0
      Linus Torvalds authored
      Pull MIPS fixes from Thomas Bogendoerfer:
       "Fix for o32 ptrace/get_syscall_info"
      
      * tag 'mips-fixes_6.14_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: fix mips_get_syscall_arg() for o32
        MIPS: Export syscall stack arguments properly for remote use
      b878a1c0
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · ad1b832b
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Add bindings for QCom QCS8300 clocks, QCom SAR2130P qfprom, and
         powertip,{st7272|hx8238a} displays
      
       - Fix compatible for TI am62a7 dss
      
       - Add a kunit test for __of_address_resource_bounds()
      
      * tag 'devicetree-fixes-for-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: display: Add powertip,{st7272|hx8238a} as DT Schema description
        dt-bindings: nvmem: qcom,qfprom: Add SAR2130P compatible
        dt-bindings: display: ti: Fix compatible for am62a7 dss
        of: address: Add kunit test for __of_address_resource_bounds()
        dt-bindings: clock: qcom: Add QCS8300 video clock controller
        dt-bindings: clock: qcom: Add CAMCC clocks for QCS8300
        dt-bindings: clock: qcom: Add GPU clocks for QCS8300
      ad1b832b
    • Linus Torvalds's avatar
      Merge tag 'uml-for-linus-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux · ad73b9a1
      Linus Torvalds authored
      Pull UML fixes from Richard Weinberger:
      
       - Align signal stack correctly
      
       - Convert to raw spinlocks where needed (irq and virtio)
      
       - FPU related fixes
      
      * tag 'uml-for-linus-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux:
        um: convert irq_lock to raw spinlock
        um: virtio_uml: use raw spinlock
        um: virt-pci: don't use kmalloc()
        um: fix execve stub execution on old host OSs
        um: properly align signal stack on x86_64
        um: avoid copying FP state from init_task
        um: add back support for FXSAVE registers
      ad73b9a1
    • Linus Torvalds's avatar
      Merge tag 'trace-ring-buffer-v6.14-rc2' of... · 5784d8c9
      Linus Torvalds authored
      Merge tag 'trace-ring-buffer-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
      
      Pull trace ring buffer fixes from Steven Rostedt:
      
       - Enable resize on mmap() error
      
         When a process mmaps a ring buffer, its size is locked and resizing
         is disabled. But if the user passes in a wrong parameter, the mmap()
         can fail after the resize was disabled and the mmap() exits with
         error without reenabling the ring buffer resize. This prevents the
         ring buffer from ever being resized after that. Reenable resizing of
         the ring buffer on mmap() error.
      
       - Have resizing return proper error and not always -ENOMEM
      
         If the ring buffer is mmapped by one task and another task tries to
         resize the buffer it will error with -ENOMEM. This is confusing to
         the user as there may be plenty of memory available. Have it return
         the error that actually happens (in this case -EBUSY) where the user
         can understand why the resize failed.
      
       - Test the sub-buffer array to validate persistent memory buffer
      
         On boot up, the initialization of the persistent memory buffer will
         do a validation check to see if the content of the data is valid, and
         if so, it will use the memory as is, otherwise it re-initializes it.
         There's meta data in this persistent memory that keeps track of which
         sub-buffer is the reader page and an array that states the order of
         the sub-buffers. The values in this array are indexes into the
         sub-buffers. The validator checks to make sure that all the entries
         in the array are within the sub-buffer list index, but it does not
         check for duplications.
      
         While working on this code, the array got corrupted and had
         duplicates, where not all the sub-buffers were accounted for. This
         passed the validator as all entries were valid, but the link list was
         incorrect and could have caused a crash. The corruption only produced
         incorrect data, but it could have been more severe. To fix this,
         create a bitmask that covers all the sub-buffer indexes and set it to
         all zeros. While iterating the array checking the values of the array
         content, have it set a bit corresponding to the index in the array.
         If the bit was already set, then it is a duplicate and mark the
         buffer as invalid and reset it.
      
       - Prevent mmap()ing persistent ring buffer
      
         The persistent ring buffer uses vmap() to map the persistent memory.
         Currently, the mmap() logic only uses virt_to_page() to get the page
         from the ring buffer memory and use that to map to user space. This
         works because a normal ring buffer uses alloc_page() to allocate its
         memory. But because the persistent ring buffer use vmap() it causes a
         kernel crash.
      
         Fixing this to work with vmap() is not hard, but since mmap() on
         persistent memory buffers never worked, just have the mmap() return
         -ENODEV (what was returned before mmap() for persistent memory ring
         buffers, as they never supported mmap. Normal buffers will still
         allow mmap(). Implementing mmap() for persistent memory ring buffers
         can wait till the next merge window.
      
       - Fix polling on persistent ring buffers
      
         There's a "buffer_percent" option (default set to 50), that is used
         to have reads of the ring buffer binary data block until the buffer
         fills to that percentage. The field "pages_touched" is incremented
         every time a new sub-buffer has content added to it. This field is
         used in the calculations to determine the amount of content is in the
         buffer and if it exceeds the "buffer_percent" then it will wake the
         task polling on the buffer.
      
         As persistent ring buffers can be created by the content from a
         previous boot, the "pages_touched" field was not updated. This means
         that if a task were to poll on the persistent buffer, it would block
         even if the buffer was completely full. It would block even if the
         "buffer_percent" was zero, because with "pages_touched" as zero, it
         would be calculated as the buffer having no content. Update
         pages_touched when initializing the persistent ring buffer from a
         previous boot.
      
      * tag 'trace-ring-buffer-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        ring-buffer: Update pages_touched to reflect persistent buffer content
        tracing: Do not allow mmap() of persistent ring buffer
        ring-buffer: Validate the persistent meta data subbuf array
        tracing: Have the error of __tracing_resize_ring_buffer() passed to user
        ring-buffer: Unlock resize on mmap error
      5784d8c9
  5. Feb 15, 2025
    • Steven Rostedt's avatar
      ring-buffer: Update pages_touched to reflect persistent buffer content · 97937834
      Steven Rostedt authored
      The pages_touched field represents the number of subbuffers in the ring
      buffer that have content that can be read. This is used in accounting of
      "dirty_pages" and "buffer_percent" to allow the user to wait for the
      buffer to be filled to a certain amount before it reads the buffer in
      blocking mode.
      
      The persistent buffer never updated this value so it was set to zero, and
      this accounting would take it as it had no content. This would cause user
      space to wait for content even though there's enough content in the ring
      buffer that satisfies the buffer_percent.
      
      Cc: stable@vger.kernel.org
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Vincent Donnefort <vdonnefort@google.com>
      Link: https://lore.kernel.org/20250214123512.0631436e@gandalf.local.home
      
      
      Fixes: 5f3b6e83 ("ring-buffer: Validate boot range memory events")
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      97937834
    • Steven Rostedt's avatar
      tracing: Do not allow mmap() of persistent ring buffer · 129fe718
      Steven Rostedt authored
      When trying to mmap a trace instance buffer that is attached to
      reserve_mem, it would crash:
      
       BUG: unable to handle page fault for address: ffffe97bd00025c8
       #PF: supervisor read access in kernel mode
       #PF: error_code(0x0000) - not-present page
       PGD 2862f3067 P4D 2862f3067 PUD 0
       Oops: Oops: 0000 [#1] PREEMPT_RT SMP PTI
       CPU: 4 UID: 0 PID: 981 Comm: mmap-rb Not tainted 6.14.0-rc2-test-00003-g7f1a5e3fbf9e-dirty #233
       Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
       RIP: 0010:validate_page_before_insert+0x5/0xb0
       Code: e2 01 89 d0 c3 cc cc cc cc 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 <48> 8b 46 08 a8 01 75 67 66 90 48 89 f0 8b 50 34 85 d2 74 76 48 89
       RSP: 0018:ffffb148c2f3f968 EFLAGS: 00010246
       RAX: ffff9fa5d3322000 RBX: ffff9fa5ccff9c08 RCX: 00000000b879ed29
       RDX: ffffe97bd00025c0 RSI: ffffe97bd00025c0 RDI: ffff9fa5ccff9c08
       RBP: ffffb148c2f3f9f0 R08: 0000000000000004 R09: 0000000000000004
       R10: 0000000000000000 R11: 0000000000000200 R12: 0000000000000000
       R13: 00007f16a18d5000 R14: ffff9fa5c48db6a8 R15: 0000000000000000
       FS:  00007f16a1b54740(0000) GS:ffff9fa73df00000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: ffffe97bd00025c8 CR3: 00000001048c6006 CR4: 0000000000172ef0
       Call Trace:
        <TASK>
        ? __die_body.cold+0x19/0x1f
        ? __die+0x2e/0x40
        ? page_fault_oops+0x157/0x2b0
        ? search_module_extables+0x53/0x80
        ? validate_page_before_insert+0x5/0xb0
        ? kernelmode_fixup_or_oops.isra.0+0x5f/0x70
        ? __bad_area_nosemaphore+0x16e/0x1b0
        ? bad_area_nosemaphore+0x16/0x20
        ? do_kern_addr_fault+0x77/0x90
        ? exc_page_fault+0x22b/0x230
        ? asm_exc_page_fault+0x2b/0x30
        ? validate_page_before_insert+0x5/0xb0
        ? vm_insert_pages+0x151/0x400
        __rb_map_vma+0x21f/0x3f0
        ring_buffer_map+0x21b/0x2f0
        tracing_buffers_mmap+0x70/0xd0
        __mmap_region+0x6f0/0xbd0
        mmap_region+0x7f/0x130
        do_mmap+0x475/0x610
        vm_mmap_pgoff+0xf2/0x1d0
        ksys_mmap_pgoff+0x166/0x200
        __x64_sys_mmap+0x37/0x50
        x64_sys_call+0x1670/0x1d70
        do_syscall_64+0xbb/0x1d0
        entry_SYSCALL_64_after_hwframe+0x77/0x7f
      
      The reason was that the code that maps the ring buffer pages to user space
      has:
      
      	page = virt_to_page((void *)cpu_buffer->subbuf_ids[s]);
      
      And uses that in:
      
      	vm_insert_pages(vma, vma->vm_start, pages, &nr_pages);
      
      But virt_to_page() does not work with vmap()'d memory which is what the
      persistent ring buffer has. It is rather trivial to allow this, but for
      now just disable mmap() of instances that have their ring buffer from the
      reserve_mem option.
      
      If an mmap() is performed on a persistent buffer it will return -ENODEV
      just like it would if the .mmap field wasn't defined in the
      file_operations structure.
      
      Cc: stable@vger.kernel.org
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Vincent Donnefort <vdonnefort@google.com>
      Link: https://lore.kernel.org/20250214115547.0d7287d3@gandalf.local.home
      
      
      Fixes: 9b7bdf6f ("tracing: Have trace_printk not use binary prints if boot buffer")
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      129fe718
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 49665900
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "MAINTAINERS maintenance.
      
        Changed email, added entry, deleted entry falling back to a generic
        one"
      
      * tag 'i2c-for-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        MAINTAINERS: Add maintainer for Qualcomm's I2C GENI driver
        MAINTAINERS: delete entry for AXXIA I2C
        MAINTAINERS: Use my kernel.org address for I2C ACPI work
      49665900
    • Linus Torvalds's avatar
      Merge tag 's390-6.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · f3d8b0eb
      Linus Torvalds authored
      Pull s390 fixes from Vasily Gorbik:
      
       - Fix isolated VFs handling by verifying that a VF’s parent PF is
         locally owned before registering it in an existing PCI domain
      
       - Disable arch_test_bit() optimization for PROFILE_ALL_BRANCHES to
         workaround gcc failure in handling __builtin_constant_p() in this
         case
      
       - Fix CHPID "configure" attribute caching in CIO by not updating the
         cache when SCLP returns no data, ensuring consistent sysfs output
      
       - Remove CONFIG_LSM from default configs and rely on defaults, which
         enables BPF LSM hook
      
      * tag 's390-6.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/pci: Fix handling of isolated VFs
        s390/pci: Pull search for parent PF out of zpci_iov_setup_virtfn()
        s390/bitops: Disable arch_test_bit() optimization for PROFILE_ALL_BRANCHES
        s390/cio: Fix CHPID "configure" attribute caching
        s390/configs: Remove CONFIG_LSM
      f3d8b0eb
    • Uwe Kleine-König's avatar
      modpost: Fix a few typos in a comment · b28fb1f2
      Uwe Kleine-König authored
      
      Namely: s/becasue/because/ and s/wiht/with/ plus an added article.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@baylibre.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      b28fb1f2
    • Thomas Weißschuh's avatar
      kbuild: userprogs: fix bitsize and target detection on clang · 1b71c2fb
      Thomas Weißschuh authored
      
      scripts/Makefile.clang was changed in the linked commit to move --target from
      KBUILD_CFLAGS to KBUILD_CPPFLAGS, as that generally has a broader scope.
      However that variable is not inspected by the userprogs logic,
      breaking cross compilation on clang.
      
      Use both variables to detect bitsize and target arguments for userprogs.
      
      Fixes: feb843a4 ("kbuild: add $(CLANG_FLAGS) to KBUILD_CPPFLAGS")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarThomas Weißschuh <thomas.weissschuh@linutronix.de>
      Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      1b71c2fb
    • Linus Torvalds's avatar
      Merge tag 'rust-fixes-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux · 24389907
      Linus Torvalds authored
      Pull rust fixes from Miguel Ojeda:
      
       - Fix objtool warning due to future Rust 1.85.0 (to be released in a
         few days)
      
       - Clean future Rust 1.86.0 (to be released 2025-04-03) Clippy warning
      
      * tag 'rust-fixes-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux:
        rust: rbtree: fix overindented list item
        objtool/rust: add one more `noreturn` Rust function
      24389907
    • Linus Torvalds's avatar
      tegra210-adma: fix 32-bit x86 build · d4401484
      Linus Torvalds authored
      
      The Tegra210 Audio DMA controller driver did a plain divide:
      
      	page_no = (res_page->start - res_base->start) / cdata->ch_base_offset;
      
      which causes problems on 32-bit x86 configurations that have 64-bit
      resource sizes:
      
        x86_64-linux-ld: drivers/dma/tegra210-adma.o: in function `tegra_adma_probe':
        tegra210-adma.c:(.text+0x1322): undefined reference to `__udivdi3'
      
      because gcc doesn't generate the trivial code for a 64-by-32 divide,
      turning it into a function call to do a full 64-by-64 divide.  And the
      kernel intentionally doesn't provide that helper function, because 99%
      of the time all you want is the narrower version.
      
      Of course, tegra210 is a 64-bit architecture and the 32-bit x86 build is
      purely for build testing, so this really is just about build coverage
      failure.
      
      But build coverage is good.
      
      Side note: div_u64() would be suboptimal if you actually have a 32-bit
      resource_t, so our "helper" for divides are admittedly making it harder
      than it should be to generate good code for all the possible cases.
      
      At some point, I'll consider 32-bit x86 so entirely legacy that I can't
      find it in myself to care any more, and we'll just add the __udivdi3
      library function.
      
      But for now, the right thing to do is to use "div_u64()" to show that
      you know that you are doing the simpler divide with a 32-bit number.
      And the build error enforces that.
      
      While fixing the build issue, also check for division-by-zero, and for
      overflow.  Which hopefully cannot happen on real production hardware,
      but the value of 'ch_base_offset' can definitely be zero in other
      places.
      
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d4401484
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v6.14-rc3-take2' of... · 6452feaf
      Linus Torvalds authored
      Merge tag 'gpio-fixes-for-v6.14-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
      
      Pull gpio fixes from Bartosz Golaszewski:
      
       - fix interrupt handling issues in gpio-bcm-kona
      
       - add an ACPI quirk for Acer Nitro ANV14 fixing an issue with spurious
         wake up events
      
       - add missing return value checks to gpio-stmpe
      
       - fix a crash in error path in gpiochip_get_ngpios()
      
      * tag 'gpio-fixes-for-v6.14-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpiolib: Fix crash on error in gpiochip_get_ngpios()
        gpio: stmpe: Check return value of stmpe_reg_read in stmpe_gpio_irq_sync_unlock
        gpiolib: acpi: Add a quirk for Acer Nitro ANV14
        gpio: bcm-kona: Add missing newline to dev_err format string
        gpio: bcm-kona: Make sure GPIO bits are unlocked when requesting IRQ
        gpio: bcm-kona: Fix GPIO lock/unlock for banks above bank 0
      6452feaf
    • Masahiro Yamada's avatar
      kbuild: fix linux-headers package build when $(CC) cannot link userspace · 140332b6
      Masahiro Yamada authored
      
      Since commit 5f73e7d0 ("kbuild: refactor cross-compiling
      linux-headers package"), the linux-headers Debian package fails to
      build when $(CC) cannot build userspace applications, for example,
      when using toolchains installed by the 0day bot.
      
      The host programs in the linux-headers package should be rebuilt using
      the disto's cross-compiler, ${DEB_HOST_GNU_TYPE}-gcc instead of $(CC).
      Hence, the variable 'CC' must be expanded in this shell script instead
      of in the top-level Makefile.
      
      Commit f354fc88 ("kbuild: install-extmod-build: add missing
      quotation marks for CC variable") was not a correct fix because
      CC="ccache gcc" should be unrelated when rebuilding userspace tools.
      
      Fixes: 5f73e7d0 ("kbuild: refactor cross-compiling linux-headers package")
      Reported-by: default avatarJeff Johnson <jeff.johnson@oss.qualcomm.com>
      Closes: https://lore.kernel.org/linux-kbuild/CAK7LNARb3xO3ptBWOMpwKcyf3=zkfhMey5H2KnB1dOmUwM79dA@mail.gmail.com/T/#t
      
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Tested-by: default avatarJeff Johnson <jeff.johnson@oss.qualcomm.com>
      140332b6
    • Masahiro Yamada's avatar
      tools: fix annoying "mkdir -p ..." logs when building tools in parallel · d1d09631
      Masahiro Yamada authored
      When CONFIG_OBJTOOL=y or CONFIG_DEBUG_INFO_BTF=y, parallel builds
      show awkward "mkdir -p ..." logs.
      
        $ make -j16
          [ snip ]
        mkdir -p /home/masahiro/ref/linux/tools/objtool && make O=/home/masahiro/ref/linux subdir=tools/objtool --no-print-directory -C objtool
        mkdir -p /home/masahiro/ref/linux/tools/bpf/resolve_btfids && make O=/home/masahiro/ref/linux subdir=tools/bpf/resolve_btfids --no-print-directory -C bpf/resolve_btfids
      
      Defining MAKEFLAGS=<value> on the command line wipes out command line
      switches from the resultant MAKEFLAGS definition, even though the command
      line switches are active. [1]
      
      MAKEFLAGS puts all single-letter options into the first word, and that
      word will be empty if no single-letter options were given. [2]
      However, this breaks if MAKEFLAGS=<value> is given on the command line.
      
      The tools/ and tools/% targets set MAKEFLAGS=<value> on the command
      line, which breaks the following code in tools/scripts/Makefile.include:
      
          short-opts := $(firstword -$(MAKEFLAGS))
      
      If MAKEFLAGS really needs modification, it should be done through the
      environment variable, as follows:
      
          MAKEFLAGS=<value> $(MAKE) ...
      
      That said, I question whether modifying MAKEFLAGS is necessary here.
      The only flag we might want to exclude is --no-print-directory, as the
      tools build system changes the working directory. However, people might
      find the "Entering/Leaving directory" logs annoying.
      
      I simply removed the offending MAKEFLAGS=<value>.
      
      [1]: https://savannah.gnu.org/bugs/?62469
      [2]: https://www.gnu.org/software/make/manual/make.html#Testing-Flags
      
      
      
      Fixes: ea01fa9f ("tools: Connect to the kernel build system")
      Fixes: a50e4333 ("perf tools: Honor parallel jobs")
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Tested-by: default avatarDaniel Xu <dxu@dxuuu.xyz>
      d1d09631
    • Vitaly Rodionov's avatar
      ALSA: hda/cirrus: Reduce codec resume time · 6a7ed7ee
      Vitaly Rodionov authored and Takashi Iwai's avatar Takashi Iwai committed
      
      This patch reduces the resume time by half and introduces an option to
      include a delay after a single write operation before continuing.
      
      Signed-off-by: default avatarVitaly Rodionov <vitalyr@opensource.cirrus.com>
      Link: https://patch.msgid.link/20250214162354.2675652-2-vitalyr@opensource.cirrus.com
      
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6a7ed7ee
    • Vitaly Rodionov's avatar
      ALSA: hda/cirrus: Correct the full scale volume set logic · 08b613b9
      Vitaly Rodionov authored and Takashi Iwai's avatar Takashi Iwai committed
      
      This patch corrects the full-scale volume setting logic. On certain
      platforms, the full-scale volume bit is required. The current logic
      mistakenly sets this bit and incorrectly clears reserved bit 0, causing
      the headphone output to be muted.
      
      Fixes: 342b6b61 ("ALSA: hda/cs8409: Fix Full Scale Volume setting for all variants")
      Signed-off-by: default avatarVitaly Rodionov <vitalyr@opensource.cirrus.com>
      Link: https://patch.msgid.link/20250214210736.30814-1-vitalyr@opensource.cirrus.com
      
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      08b613b9
    • Linus Torvalds's avatar
      Merge tag 'alpha-fixes-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha · 7ff71e6d
      Linus Torvalds authored
      Pull alpha fixes from Matt Turner:
       "A few changes for alpha, including some important fixes for kernel
        stack alignment"
      
      * tag 'alpha-fixes-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha:
        alpha: Use str_yes_no() helper in pci_dac_dma_supported()
        alpha: Replace one-element array with flexible array member
        alpha: align stack for page fault and user unaligned trap handlers
        alpha: make stack 16-byte aligned (most cases)
        alpha: replace hardcoded stack offsets with autogenerated ones
      7ff71e6d
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.14-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · 78a632a2
      Linus Torvalds authored
      Pull pci fixes from Bjorn Helgaas:
      
       - Update a BUILD_BUG_ON() usage that works on current compilers, but
         breaks compilation on gcc 5.3.1 (Alex Williamson)
      
       - Avoid use of FLR for Mediatek MT7922 WiFi; the device previously
         worked after a long timeout and fallback to SBR, but after a recent
         RRS change it doesn't work at all after FLR (Bjorn Helgaas)
      
      * tag 'pci-v6.14-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        PCI: Avoid FLR for Mediatek MT7922 WiFi
        PCI: Fix BUILD_BUG_ON usage for old gcc
      78a632a2
    • Paolo Bonzini's avatar
      Merge tag 'kvm-x86-fixes-6.14-rcN' of https://github.com/kvm-x86/linux into HEAD · d3d0b8df
      Paolo Bonzini authored
      KVM fixes for 6.14 part 1
      
       - Reject Hyper-V SEND_IPI hypercalls if the local APIC isn't being emulated
         by KVM to fix a NULL pointer dereference.
      
       - Enter guest mode (L2) from KVM's perspective before initializing the vCPU's
         nested NPT MMU so that the MMU is properly tagged for L2, not L1.
      
       - Load the guest's DR6 outside of the innermost .vcpu_run() loop, as the
         guest's value may be stale if a VM-Exit is handled in the fastpath.
      d3d0b8df
Loading