1. 30 Jun, 2024 8 commits
    • Linus Torvalds's avatar
      Merge tag 'char-misc-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 84dd4373
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some small driver fixes for 6.10-rc6. Included in here are:
      
         - IIO driver fixes for reported issues
      
         - Counter driver fix for a reported problem.
      
        All of these have been in linux-next this week with no reported
        issues"
      
      * tag 'char-misc-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        counter: ti-eqep: enable clock at probe
        iio: chemical: bme680: Fix sensor data read operation
        iio: chemical: bme680: Fix overflows in compensate() functions
        iio: chemical: bme680: Fix calibration data variable
        iio: chemical: bme680: Fix pressure value output
        iio: humidity: hdc3020: fix hysteresis representation
        iio: dac: fix ad9739a random config compile error
        iio: accel: fxls8962af: select IIO_BUFFER & IIO_KFIFO_BUF
        iio: adc: ad7266: Fix variable checking bug
        iio: xilinx-ams: Don't include ams_ctrl_channels in scan_mask
      84dd4373
    • Linus Torvalds's avatar
      Merge tag 'staging-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 12529aa1
      Linus Torvalds authored
      Pull staging driver fixes from Greg KH:
       "Here are two small staging driver fixes for 6.10-rc6, both for the
        vc04_services drivers:
      
         - build fix if CONFIG_DEBUGFS was not set
      
         - initialization check fix that was much reported.
      
        Both of these have been in linux-next this week with no reported
        issues"
      
      * tag 'staging-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: vchiq_debugfs: Fix build if CONFIG_DEBUG_FS is not set
        staging: vc04_services: vchiq_arm: Fix initialisation check
      12529aa1
    • Linus Torvalds's avatar
      Merge tag 'tty-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 3e334486
      Linus Torvalds authored
      Pull tty / serial / console fixes from Greg KH:
       "Here are a bunch of fixes/reverts for 6.10-rc6.  Include in here are:
      
         - revert the bunch of tty/serial/console changes that landed in -rc1
           that didn't quite work properly yet.
      
           Everyone agreed to just revert them for now and will work on making
           them better for a future release instead of trying to quick fix the
           existing changes this late in the release cycle
      
         - 8250 driver port count bugfix
      
         - Other tiny serial port bugfixes for reported issues
      
        All of these have been in linux-next this week with no reported
        issues"
      
      * tag 'tty-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        Revert "printk: Save console options for add_preferred_console_match()"
        Revert "printk: Don't try to parse DEVNAME:0.0 console options"
        Revert "printk: Flag register_console() if console is set on command line"
        Revert "serial: core: Add support for DEVNAME:0.0 style naming for kernel console"
        Revert "serial: core: Handle serial console options"
        Revert "serial: 8250: Add preferred console in serial8250_isa_init_ports()"
        Revert "Documentation: kernel-parameters: Add DEVNAME:0.0 format for serial ports"
        Revert "serial: 8250: Fix add preferred console for serial8250_isa_init_ports()"
        Revert "serial: core: Fix ifdef for serial base console functions"
        serial: bcm63xx-uart: fix tx after conversion to uart_port_tx_limited()
        serial: core: introduce uart_port_tx_limited_flags()
        Revert "serial: core: only stop transmit when HW fifo is empty"
        serial: imx: set receiver level before starting uart
        tty: mcf: MCF54418 has 10 UARTS
        serial: 8250_omap: Implementation of Errata i2310
        tty: serial: 8250: Fix port count mismatch with the device
      3e334486
    • Linus Torvalds's avatar
      Merge tag 'usb-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 2c01c3d5
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a handful of small USB driver fixes for 6.10-rc6 to resolve
        some reported issues. Included in here are:
      
         - typec driver bugfixes
      
         - usb gadget driver reverts for commits that were reported to have
           problems
      
         - resource leak bugfix
      
         - gadget driver bugfixes
      
         - dwc3 driver bugfixes
      
         - usb atm driver bugfix for when syzbot got loose on it
      
        All of these have been in linux-next this week with no reported issues"
      
      * tag 'usb-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: dwc3: core: Workaround for CSR read timeout
        Revert "usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach"
        Revert "usb: gadget: u_ether: Re-attach netif device to mirror detachment"
        usb: gadget: aspeed_udc: fix device address configuration
        usb: dwc3: core: remove lock of otg mode during gadget suspend/resume to avoid deadlock
        usb: typec: ucsi: glink: fix child node release in probe function
        usb: musb: da8xx: fix a resource leak in probe()
        usb: typec: ucsi_acpi: Add LG Gram quirk
        usb: ucsi: stm32: fix command completion handling
        usb: atm: cxacru: fix endpoint checking in cxacru_bind()
        usb: gadget: printer: fix races against disable
        usb: gadget: printer: SS+ support
      2c01c3d5
    • Linus Torvalds's avatar
      Merge tag 'smp_urgent_for_v6.10_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3ffea9a7
      Linus Torvalds authored
      Pull smp fixes from Borislav Petkov:
      
       - Fix "nosmp" and "maxcpus=0" after the parallel CPU bringup work went
         in and broke them
      
       - Make sure CPU hotplug dynamic prepare states are actually executed
      
      * tag 'smp_urgent_for_v6.10_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        cpu: Fix broken cmdline "nosmp" and "maxcpus=0"
        cpu/hotplug: Fix dynstate assignment in __cpuhp_setup_state_cpuslocked()
      3ffea9a7
    • Linus Torvalds's avatar
      Merge tag 'irq_urgent_for_v6.10_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4e412160
      Linus Torvalds authored
      Pull irq fixes from Borislav Petkov:
      
       - Make sure multi-bridge machines get all eiointc interrupt controllers
         initialized even if the number of CPUs has been limited by a cmdline
         param
      
       - Make sure interrupt lines on liointc hw are configured properly even
         when interrupt routing changes
      
       - Avoid use-after-free in the error path of the MSI init code
      
      * tag 'irq_urgent_for_v6.10_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        PCI/MSI: Fix UAF in msi_capability_init
        irqchip/loongson-liointc: Set different ISRs for different cores
        irqchip/loongson-eiointc: Use early_cpu_to_node() instead of cpu_to_node()
      4e412160
    • Linus Torvalds's avatar
      Merge tag 'timers_urgent_for_v6.10_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 03c8b0bd
      Linus Torvalds authored
      Pull timer fix from Borislav Petkov:
      
       - Warn when an hrtimer doesn't get a callback supplied
      
      * tag 'timers_urgent_for_v6.10_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        hrtimer: Prevent queuing of hrtimer without a function callback
      03c8b0bd
    • Linus Torvalds's avatar
      Merge tag 'linux-watchdog-6.10-rc-fixes' of git://www.linux-watchdog.org/linux-watchdog · 327fceff
      Linus Torvalds authored
      Pull watchdog fixes from Wim Van Sebroeck:
      
       - lenovo_se10_wdt: add HAS_IOPORT dependency
      
       - add missing MODULE_DESCRIPTION() macros
      
      * tag 'linux-watchdog-6.10-rc-fixes' of git://www.linux-watchdog.org/linux-watchdog:
        watchdog: add missing MODULE_DESCRIPTION() macros
        watchdog: lenovo_se10_wdt: add HAS_IOPORT dependency
      327fceff
  2. 29 Jun, 2024 5 commits
  3. 28 Jun, 2024 22 commits
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · de0a9f44
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - A fix for vector load/store instruction decoding, which could result
         in reserved vector element length encodings decoding as valid vector
         instructions.
      
       - Instruction patching now aggressively flushes the local instruction
         cache, to avoid situations where patching functions on the flush path
         results in torn instructions being fetched.
      
       - A fix to prevent the stack walker from showing up as part of traces.
      
      * tag 'riscv-for-linus-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: stacktrace: convert arch_stack_walk() to noinstr
        riscv: patch: Flush the icache right after patching to avoid illegal insns
        RISC-V: fix vector insn load/store width mask
      de0a9f44
    • Linus Torvalds's avatar
      Merge tag 'hardening-v6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · b75f9472
      Linus Torvalds authored
      Pull hardening fixes from Kees Cook:
      
       - Remove invalid tty __counted_by annotation (Nathan Chancellor)
      
       - Add missing MODULE_DESCRIPTION()s for KUnit string tests (Jeff
         Johnson)
      
       - Remove non-functional per-arch kstack entropy filtering
      
      * tag 'hardening-v6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        tty: mxser: Remove __counted_by from mxser_board.ports[]
        randomize_kstack: Remove non-functional per-arch entropy filtering
        string: kunit: add missing MODULE_DESCRIPTION() macros
      b75f9472
    • Linus Torvalds's avatar
      x86: stop playing stack games in profile_pc() · 093d9603
      Linus Torvalds authored
      The 'profile_pc()' function is used for timer-based profiling, which
      isn't really all that relevant any more to begin with, but it also ends
      up making assumptions based on the stack layout that aren't necessarily
      valid.
      
      Basically, the code tries to account the time spent in spinlocks to the
      caller rather than the spinlock, and while I support that as a concept,
      it's not worth the code complexity or the KASAN warnings when no serious
      profiling is done using timers anyway these days.
      
      And the code really does depend on stack layout that is only true in the
      simplest of cases.  We've lost the comment at some point (I think when
      the 32-bit and 64-bit code was unified), but it used to say:
      
      	Assume the lock function has either no stack frame or a copy
      	of eflags from PUSHF.
      
      which explains why it just blindly loads a word or two straight off the
      stack pointer and then takes a minimal look at the values to just check
      if they might be eflags or the return pc:
      
      	Eflags always has bits 22 and up cleared unlike kernel addresses
      
      but that basic stack layout assumption assumes that there isn't any lock
      debugging etc going on that would complicate the code and cause a stack
      frame.
      
      It causes KASAN unhappiness reported for years by syzkaller [1] and
      others [2].
      
      With no real practical reason for this any more, just remove the code.
      
      Just for historical interest, here's some background commits relating to
      this code from 2006:
      
        0cb91a22 ("i386: Account spinlocks to the caller during profiling for !FP kernels")
        31679f38 ("Simplify profile_pc on x86-64")
      
      and a code unification from 2009:
      
        ef451288 ("x86: time_32/64.c unify profile_pc")
      
      but the basics of this thing actually goes back to before the git tree.
      
      Link: https://syzkaller.appspot.com/bug?extid=84fe685c02cd112a2ac3 [1]
      Link: https://lore.kernel.org/all/CAK55_s7Xyq=nh97=K=G1sxueOFrJDAvPOJAL4TPTCAYvmxO9_A@mail.gmail.com/ [2]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      093d9603
    • Wolfram Sang's avatar
      i2c: testunit: discard write requests while old command is running · c116deaf
      Wolfram Sang authored
      When clearing registers on new write requests was added, the protection
      for currently running commands was missed leading to concurrent access
      to the testunit registers. Check the flag beforehand.
      
      Fixes: b39ab96a ("i2c: testunit: add support for block process calls")
      Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@kernel.org>
      c116deaf
    • Wolfram Sang's avatar
      i2c: testunit: don't erase registers after STOP · c422b6a6
      Wolfram Sang authored
      STOP fallsthrough to WRITE_REQUESTED but this became problematic when
      clearing the testunit registers was added to the latter. Actually, there
      is no reason to clear the testunit state after STOP. Doing it when a new
      WRITE_REQUESTED arrives is enough. So, no need to fallthrough, at all.
      
      Fixes: b39ab96a ("i2c: testunit: add support for block process calls")
      Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@kernel.org>
      c422b6a6
    • Wolfram Sang's avatar
      Merge tag 'i2c-host-fixes-6.10-rc6' of... · 4e9a1a47
      Wolfram Sang authored
      Merge tag 'i2c-host-fixes-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current
      
      Fixed a build error following the major refactoring involving the
      VIA-I2C modules. Originally, the code was split to group together
      parts that would be used by different drivers. This caused build
      issues when two modules linked to the same code.
      4e9a1a47
    • Linus Torvalds's avatar
      Merge tag 'nfsd-6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · 6c0483db
      Linus Torvalds authored
      Pull nfsd fixes from Chuck Lever:
      
       - Due to a late review, revert and re-fix a recent crasher fix
      
      * tag 'nfsd-6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        Revert "nfsd: fix oops when reading pool_stats before server is started"
        nfsd: initialise nfsd_info.mutex early.
      6c0483db
    • Linus Torvalds's avatar
      Merge tag 'bcachefs-2024-06-28' of https://evilpiepirate.org/git/bcachefs · cd63a278
      Linus Torvalds authored
      Pull bcachefs fixes from Kent Overstreet:
       "Simple stuff:
      
         - NULL ptr/err ptr deref fixes
      
         - fix for getting wedged on shutdown after journal error
      
         - fix missing recalc_capacity() call, capacity now changes correctly
           after a device goes read only
      
           however: our capacity calculation still doesn't take into account
           when we have mixed ro/rw devices and the ro devices have data on
           them, that's going to be a more involved fix to separate accounting
           for "capacity used on ro devices" and "capacity used on rw devices"
      
         - boring syzbot stuff
      
        Slightly more involved:
      
         - discard, invalidate workers are now per device
      
           this has the effect of simplifying how we take device refs in these
           paths, and the device ref cleanup fixes a longstanding race between
           the device removal path and the discard path
      
         - fixes for how the debugfs code takes refs on btree_trans objects we
           have debugfs code that prints in use btree_trans objects.
      
           It uses closure_get() on trans->ref, which is mainly for the cycle
           detector, but the debugfs code was using it on a closure that may
           have hit 0, which is not allowed; for performance reasons we cannot
           avoid having not-in-use transactions on the global list.
      
           Introduce some new primitives to fix this and make the
           synchronization here a whole lot saner"
      
      * tag 'bcachefs-2024-06-28' of https://evilpiepirate.org/git/bcachefs:
        bcachefs: Fix kmalloc bug in __snapshot_t_mut
        bcachefs: Discard, invalidate workers are now per device
        bcachefs: Fix shift-out-of-bounds in bch2_blacklist_entries_gc
        bcachefs: slab-use-after-free Read in bch2_sb_errors_from_cpu
        bcachefs: Add missing bch2_journal_do_writes() call
        bcachefs: Fix null ptr deref in journal_pins_to_text()
        bcachefs: Add missing recalc_capacity() call
        bcachefs: Fix btree_trans list ordering
        bcachefs: Fix race between trans_put() and btree_transactions_read()
        closures: closure_get_not_zero(), closure_return_sync()
        bcachefs: Make btree_deadlock_to_text() clearer
        bcachefs: fix seqmutex_relock()
        bcachefs: Fix freeing of error pointers
      cd63a278
    • Linus Torvalds's avatar
      Merge tag 'block-6.10-20240628' of git://git.kernel.dk/linux · cd17613f
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "NVMe fixes via Keith:
      
         - Fabrics fixes (Hannes)
      
         - Missing module description (Jeff)
      
         - Clang warning fix (Nathan)"
      
      * tag 'block-6.10-20240628' of git://git.kernel.dk/linux:
        nvmet-fc: Remove __counted_by from nvmet_fc_tgt_queue.fod[]
        nvmet: make 'tsas' attribute idempotent for RDMA
        nvme: fixup comment for nvme RDMA Provider Type
        nvme-apple: add missing MODULE_DESCRIPTION()
        nvmet: do not return 'reserved' for empty TSAS values
        nvme: fix NVME_NS_DEAC may incorrectly identifying the disk as EXT_LBA.
      cd17613f
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux · a2316dda
      Linus Torvalds authored
      Pull iommu fixes from Joerg Roedel:
      
       - Two cache flushing fixes for Intel and AMD drivers
      
       - AMD guest translation enabling fix
      
       - Update IOMMU tree location in MAINTAINERS file
      
      * tag 'iommu-fixes-v6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux:
        MAINTAINERS: Update IOMMU tree location
        iommu/amd: Fix GT feature enablement again
        iommu/vt-d: Fix missed device TLB cache tag
        iommu/amd: Invalidate cache before removing device from domain list
      a2316dda
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 1cf06684
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
       "An assortment of driver fixes and two commits addressing a bad
        behavior of the GPIO uAPI when reconfiguring requested lines.
      
         - fix a race condition in i2c transfers by adding a missing i2c lock
           section in gpio-pca953x
      
         - validate the number of obtained interrupts in gpio-davinci
      
         - add missing raw_spinlock_init() in gpio-graniterapids
      
         - fix bad character device behavior: disallow GPIO line
           reconfiguration without set direction both in v1 and v2 uAPI"
      
      * tag 'gpio-fixes-for-v6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpiolib: cdev: Ignore reconfiguration without direction
        gpiolib: cdev: Disallow reconfiguration without direction (uAPI v1)
        gpio: graniterapids: Add missing raw_spinlock_init()
        gpio: davinci: Validate the obtained number of IRQs
        gpio: pca953x: fix pca953x_irq_bus_sync_unlock race
      1cf06684
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 90384559
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "A pair of small arm64 fixes for -rc6.
      
        One is a fix for the recently merged uffd-wp support (which was
        triggering a spurious warning) and the other is a fix to the clearing
        of the initial idmap pgd in some configurations
      
        Summary:
      
         - Fix spurious page-table warning when clearing PTE_UFFD_WP in a live
           pte
      
         - Fix clearing of the idmap pgd when using large addressing modes"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: Clear the initial ID map correctly before remapping
        arm64: mm: Permit PTE SW bits to change in live mappings
      90384559
    • Linus Torvalds's avatar
      Merge tag 'v6.10-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux · 234458d0
      Linus Torvalds authored
      Pull turbostat fixes from Len Brown:
       "Fix three recent minor turbostat regressions"
      
      * tag 'v6.10-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
        tools/power turbostat: Add local build_bug.h header for snapshot target
        tools/power turbostat: Fix unc freq columns not showing with '-q' or '-l'
        tools/power turbostat: option '-n' is ambiguous
      234458d0
    • Nathan Chancellor's avatar
      tty: mxser: Remove __counted_by from mxser_board.ports[] · 1c07c9be
      Nathan Chancellor authored
      Work for __counted_by on generic pointers in structures (not just
      flexible array members) has started landing in Clang 19 (current tip of
      tree). During the development of this feature, a restriction was added
      to __counted_by to prevent the flexible array member's element type from
      including a flexible array member itself such as:
      
        struct foo {
          int count;
          char buf[];
        };
      
        struct bar {
          int count;
          struct foo data[] __counted_by(count);
        };
      
      because the size of data cannot be calculated with the standard array
      size formula:
      
        sizeof(struct foo) * count
      
      This restriction was downgraded to a warning but due to CONFIG_WERROR,
      it can still break the build. The application of __counted_by on the
      ports member of 'struct mxser_board' triggers this restriction,
      resulting in:
      
        drivers/tty/mxser.c:291:2: error: 'counted_by' should not be applied to an array with element of unknown size because 'struct mxser_port' is a struct type with a flexible array member. This will be an error in a future compiler version [-Werror,-Wbounds-safety-counted-by-elt-type-unknown-size]
          291 |         struct mxser_port ports[] __counted_by(nports);
              |         ^~~~~~~~~~~~~~~~~~~~~~~~~
        1 error generated.
      
      Remove this use of __counted_by to fix the warning/error. However,
      rather than remove it altogether, leave it commented, as it may be
      possible to support this in future compiler releases.
      
      Cc:  <stable@vger.kernel.org>
      Closes: https://github.com/ClangBuiltLinux/linux/issues/2026
      Fixes: f34907ec ("mxser: Annotate struct mxser_board with __counted_by")
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Link: https://lore.kernel.org/r/20240529-drop-counted-by-ports-mxser-board-v1-1-0ab217f4da6d@kernel.orgSigned-off-by: default avatarKees Cook <kees@kernel.org>
      1c07c9be
    • Kees Cook's avatar
      randomize_kstack: Remove non-functional per-arch entropy filtering · 6db1208b
      Kees Cook authored
      An unintended consequence of commit 9c573cd3 ("randomize_kstack:
      Improve entropy diffusion") was that the per-architecture entropy size
      filtering reduced how many bits were being added to the mix, rather than
      how many bits were being used during the offsetting. All architectures
      fell back to the existing default of 0x3FF (10 bits), which will consume
      at most 1KiB of stack space. It seems that this is working just fine,
      so let's avoid the confusion and update everything to use the default.
      
      The prior intent of the per-architecture limits were:
      
        arm64: capped at 0x1FF (9 bits), 5 bits effective
        powerpc: uncapped (10 bits), 6 or 7 bits effective
        riscv: uncapped (10 bits), 6 bits effective
        x86: capped at 0xFF (8 bits), 5 (x86_64) or 6 (ia32) bits effective
        s390: capped at 0xFF (8 bits), undocumented effective entropy
      
      Current discussion has led to just dropping the original per-architecture
      filters. The additional entropy appears to be safe for arm64, x86,
      and s390. Quoting Arnd, "There is no point pretending that 15.75KB is
      somehow safe to use while 15.00KB is not."
      Co-developed-by: default avatarYuntao Liu <liuyuntao12@huawei.com>
      Signed-off-by: default avatarYuntao Liu <liuyuntao12@huawei.com>
      Fixes: 9c573cd3 ("randomize_kstack: Improve entropy diffusion")
      Link: https://lore.kernel.org/r/20240617133721.377540-1-liuyuntao12@huawei.comReviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: Heiko Carstens <hca@linux.ibm.com> # s390
      Link: https://lore.kernel.org/r/20240619214711.work.953-kees@kernel.orgSigned-off-by: default avatarKees Cook <kees@kernel.org>
      6db1208b
    • Jeff Johnson's avatar
      string: kunit: add missing MODULE_DESCRIPTION() macros · 6a4805b2
      Jeff Johnson authored
      make allmodconfig && make W=1 C=1 reports:
      WARNING: modpost: missing MODULE_DESCRIPTION() in lib/string_kunit.o
      WARNING: modpost: missing MODULE_DESCRIPTION() in lib/string_helpers_kunit.o
      
      Add the missing invocation of the MODULE_DESCRIPTION() macro.
      Signed-off-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
      Link: https://lore.kernel.org/r/20240531-md-lib-string-v1-1-2738cf057d94@quicinc.comSigned-off-by: default avatarKees Cook <kees@kernel.org>
      6a4805b2
    • Joerg Roedel's avatar
      MAINTAINERS: Update IOMMU tree location · 09aaa2d0
      Joerg Roedel authored
      Update the maintainers entries to the new location of the
      IOMMU tree.
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      09aaa2d0
    • Patryk Wlazlyn's avatar
      tools/power turbostat: Add local build_bug.h header for snapshot target · b15943c4
      Patryk Wlazlyn authored
      Fixes compilation errors for Makefile snapshot target described in:
      commit 231ce08b ("tools/power turbostat: Add "snapshot:" Makefile target")
      Signed-off-by: default avatarPatryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      b15943c4
    • Adam Hawley's avatar
      tools/power turbostat: Fix unc freq columns not showing with '-q' or '-l' · c5120a33
      Adam Hawley authored
      Commit 78464d76 ("tools/power turbostat: Add columns for clustered
      uncore frequency") introduced 'probe_intel_uncore_frequency_cluster()'
      in a way which prevents printing uncore frequency columns if either of
      the '-q' or '-l' options are used. Systems which do not have multiple
      uncore frequencies per package are unaffected by this regression.
      
      Fix the function so that uncore frequency columns are shown when either
      the '-l' or '-q' option is used by checking if 'quiet' is true after
      adding counters for the uncore frequency columns.
      
      Fixes: 78464d76 ("tools/power turbostat: Add columns for clustered uncore frequency")
      Signed-off-by: default avatarAdam Hawley <adam.james.hawley@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      c5120a33
    • David Arcari's avatar
      tools/power turbostat: option '-n' is ambiguous · ebb5b260
      David Arcari authored
      In some cases specifying the '-n' command line argument will cause
      turbostat to fail.  For instance 'turbostat -n 1' works fine; however,
      'turbostat -n 1 -d' will fail.  This is the result of the first call
      to getopt_long_only() where "MP" is specified as the optstring.  This can
      be easily fixed by changing the optstring from "MP" to "MPn:" to remove
      ambiguity between the arguments.
      
      tools/power turbostat: option '-n' is ambiguous; possibilities: '-num_iterations' '-no-msr' '-no-perf'
      
      Fixes: a0e86c90 ("tools/power turbostat: Add --no-perf option")
      Signed-off-by: default avatarDavid Arcari <darcari@redhat.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      ebb5b260
    • Linus Torvalds's avatar
      Merge tag 'v6.10-p4' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 5bbd9b24
      Linus Torvalds authored
      Pyll crypto fix from Herbert Xu:
       "Fix a build failure in qat"
      
      * tag 'v6.10-p4' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: qat - fix linking errors when PCI_IOV is disabled
      5bbd9b24
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2024-06-28' of https://gitlab.freedesktop.org/drm/kernel · 1c52cf5e
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Regular fixes, mostly amdgpu with some minor fixes in other places,
        along with a fix for a very narrow UAF race in the pid handover code.
      
        core:
         - fix refcounting race on pid handover
      
        fbdev:
         - Fix fb_info when vmalloc is used, regression from
           CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM.
      
        amdgpu:
         - SMU 14.x fix
         - vram info parsing fix
         - mode1 reset fix
         - LTTPR fix
         - Virtual display fix
         - Avoid spurious error in PSP init
      
        i915:
         - Fix potential UAF due to race on fence register revocation
      
        nouveau
         - nouveau tv mode fixes
      
        panel:
         - Add KOE TX26D202VM0BWA timings"
      
      * tag 'drm-fixes-2024-06-28' of https://gitlab.freedesktop.org/drm/kernel:
        drm/drm_file: Fix pid refcounting race
        drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_ld_modes
        drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_hd_modes
        drm/amdgpu: Don't show false warning for reg list
        drm/amdgpu: avoid using null object of framebuffer
        drm/amd/display: Send DP_TOTAL_LTTPR_CNT during detection if LTTPR is present
        drm/amdgpu: Fix pci state save during mode-1 reset
        drm/amdgpu/atomfirmware: fix parsing of vram_info
        drm/amd/swsmu: add MALL init support workaround for smu_v14_0_1
        drm/i915/gt: Fix potential UAF by revoke of fence registers
        drm/panel: simple: Add missing display timing flags for KOE TX26D202VM0BWA
        drm/fbdev-dma: Only set smem_start is enable per module option
      1c52cf5e
  4. 27 Jun, 2024 5 commits
    • Jann Horn's avatar
      drm/drm_file: Fix pid refcounting race · 4f2a129b
      Jann Horn authored
      <maarten.lankhorst@linux.intel.com>, Maxime Ripard
      <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>
      
      filp->pid is supposed to be a refcounted pointer; however, before this
      patch, drm_file_update_pid() only increments the refcount of a struct
      pid after storing a pointer to it in filp->pid and dropping the
      dev->filelist_mutex, making the following race possible:
      
      process A               process B
      =========               =========
                              begin drm_file_update_pid
                              mutex_lock(&dev->filelist_mutex)
                              rcu_replace_pointer(filp->pid, <pid B>, 1)
                              mutex_unlock(&dev->filelist_mutex)
      begin drm_file_update_pid
      mutex_lock(&dev->filelist_mutex)
      rcu_replace_pointer(filp->pid, <pid A>, 1)
      mutex_unlock(&dev->filelist_mutex)
      get_pid(<pid A>)
      synchronize_rcu()
      put_pid(<pid B>)   *** pid B reaches refcount 0 and is freed here ***
                              get_pid(<pid B>)   *** UAF ***
                              synchronize_rcu()
                              put_pid(<pid A>)
      
      As far as I know, this race can only occur with CONFIG_PREEMPT_RCU=y
      because it requires RCU to detect a quiescent state in code that is not
      explicitly calling into the scheduler.
      
      This race leads to use-after-free of a "struct pid".
      It is probably somewhat hard to hit because process A has to pass
      through a synchronize_rcu() operation while process B is between
      mutex_unlock() and get_pid().
      
      Fix it by ensuring that by the time a pointer to the current task's pid
      is stored in the file, an extra reference to the pid has been taken.
      
      This fix also removes the condition for synchronize_rcu(); I think
      that optimization is unnecessary complexity, since in that case we
      would usually have bailed out on the lockless check above.
      
      Fixes: 1c7a387f ("drm: Update file owner during use")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarJann Horn <jannh@google.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      4f2a129b
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2024-06-27' of... · 3e6d5e11
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2024-06-27' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes
      
      drm/i915 fixes for v6.10-rc6:
      - Fix potential UAF due to race on fence register revocation
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87ikxudcpd.fsf@intel.com
      3e6d5e11
    • Linus Torvalds's avatar
      Merge tag 'pm-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · ef8abe96
      Linus Torvalds authored
      Pull power management fix from Rafael Wysocki:
       "Modify the intel_pstate driver to use HWP to initialize the ITMT
        scheduler extension if ACPI CPPC cannot be used for that, which is the
        case on some hybrid x86 systems (Rafael Wysocki)"
      
      * tag 'pm-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: intel_pstate: Use HWP to initialize ITMT if CPPC is missing
      ef8abe96
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 92572d2c
      Linus Torvalds authored
      Pull thermal control fix from Rafael Wysocki:
       "Replace an earlier fix for a recent regression in the Step-Wise
        thermal governor that was not effective in all of the relevant cases
        (Rafael Wysocki)"
      
      * tag 'thermal-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal: gov_step_wise: Go straight to instance->lower when mitigation is over
      92572d2c
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.10-20240627' of git://git.kernel.dk/linux · 0f47788b
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Removal of a struct member that's unused since the 6.10 merge window,
        and a fix for a regression in SQPOLL wakeups, bringing it back to how
        it worked before the SQPOLL local task_work"
      
      * tag 'io_uring-6.10-20240627' of git://git.kernel.dk/linux:
        io_uring: signal SQPOLL task_work with TWA_SIGNAL_NO_IPI
        io_uring: remove dead struct io_submit_state member
      0f47788b