1. 07 Sep, 2023 7 commits
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v6.6-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 32904dec
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A couple of fixes for the sun6i driver. The patch to reduce DMA RX to
        single byte width all the time is *hopefully* excessively cautious but
        it's unclear which SoCs are affected so the fix just covers everything
        for safety"
      
      * tag 'spi-fix-v6.6-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: sun6i: fix race between DMA RX transfer completion and RX FIFO drain
        spi: sun6i: reduce DMA RX transfer width to single byte
      32904dec
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 0c021834
      Linus Torvalds authored
      Pull kvm updates from Paolo Bonzini:
       "ARM:
      
         - Clean up vCPU targets, always returning generic v8 as the preferred
           target
      
         - Trap forwarding infrastructure for nested virtualization (used for
           traps that are taken from an L2 guest and are needed by the L1
           hypervisor)
      
         - FEAT_TLBIRANGE support to only invalidate specific ranges of
           addresses when collapsing a table PTE to a block PTE. This avoids
           that the guest refills the TLBs again for addresses that aren't
           covered by the table PTE.
      
         - Fix vPMU issues related to handling of PMUver.
      
         - Don't unnecessary align non-stack allocations in the EL2 VA space
      
         - Drop HCR_VIRT_EXCP_MASK, which was never used...
      
         - Don't use smp_processor_id() in kvm_arch_vcpu_load(), but the cpu
           parameter instead
      
         - Drop redundant call to kvm_set_pfn_accessed() in user_mem_abort()
      
         - Remove prototypes without implementations
      
        RISC-V:
      
         - Zba, Zbs, Zicntr, Zicsr, Zifencei, and Zihpm support for guest
      
         - Added ONE_REG interface for SATP mode
      
         - Added ONE_REG interface to enable/disable multiple ISA extensions
      
         - Improved error codes returned by ONE_REG interfaces
      
         - Added KVM_GET_REG_LIST ioctl() implementation for KVM RISC-V
      
         - Added get-reg-list selftest for KVM RISC-V
      
        s390:
      
         - PV crypto passthrough enablement (Tony, Steffen, Viktor, Janosch)
      
           Allows a PV guest to use crypto cards. Card access is governed by
           the firmware and once a crypto queue is "bound" to a PV VM every
           other entity (PV or not) looses access until it is not bound
           anymore. Enablement is done via flags when creating the PV VM.
      
         - Guest debug fixes (Ilya)
      
        x86:
      
         - Clean up KVM's handling of Intel architectural events
      
         - Intel bugfixes
      
         - Add support for SEV-ES DebugSwap, allowing SEV-ES guests to use
           debug registers and generate/handle #DBs
      
         - Clean up LBR virtualization code
      
         - Fix a bug where KVM fails to set the target pCPU during an IRTE
           update
      
         - Fix fatal bugs in SEV-ES intrahost migration
      
         - Fix a bug where the recent (architecturally correct) change to
           reinject #BP and skip INT3 broke SEV guests (can't decode INT3 to
           skip it)
      
         - Retry APIC map recalculation if a vCPU is added/enabled
      
         - Overhaul emergency reboot code to bring SVM up to par with VMX, tie
           the "emergency disabling" behavior to KVM actually being loaded,
           and move all of the logic within KVM
      
         - Fix user triggerable WARNs in SVM where KVM incorrectly assumes the
           TSC ratio MSR cannot diverge from the default when TSC scaling is
           disabled up related code
      
         - Add a framework to allow "caching" feature flags so that KVM can
           check if the guest can use a feature without needing to search
           guest CPUID
      
         - Rip out the ancient MMU_DEBUG crud and replace the useful bits with
           CONFIG_KVM_PROVE_MMU
      
         - Fix KVM's handling of !visible guest roots to avoid premature
           triple fault injection
      
         - Overhaul KVM's page-track APIs, and KVMGT's usage, to reduce the
           API surface that is needed by external users (currently only
           KVMGT), and fix a variety of issues in the process
      
        Generic:
      
         - Wrap kvm_{gfn,hva}_range.pte in a union to allow mmu_notifier
           events to pass action specific data without needing to constantly
           update the main handlers.
      
         - Drop unused function declarations
      
        Selftests:
      
         - Add testcases to x86's sync_regs_test for detecting KVM TOCTOU bugs
      
         - Add support for printf() in guest code and covert all guest asserts
           to use printf-based reporting
      
         - Clean up the PMU event filter test and add new testcases
      
         - Include x86 selftests in the KVM x86 MAINTAINERS entry"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (279 commits)
        KVM: x86/mmu: Include mmu.h in spte.h
        KVM: x86/mmu: Use dummy root, backed by zero page, for !visible guest roots
        KVM: x86/mmu: Disallow guest from using !visible slots for page tables
        KVM: x86/mmu: Harden TDP MMU iteration against root w/o shadow page
        KVM: x86/mmu: Harden new PGD against roots without shadow pages
        KVM: x86/mmu: Add helper to convert root hpa to shadow page
        drm/i915/gvt: Drop final dependencies on KVM internal details
        KVM: x86/mmu: Handle KVM bookkeeping in page-track APIs, not callers
        KVM: x86/mmu: Drop @slot param from exported/external page-track APIs
        KVM: x86/mmu: Bug the VM if write-tracking is used but not enabled
        KVM: x86/mmu: Assert that correct locks are held for page write-tracking
        KVM: x86/mmu: Rename page-track APIs to reflect the new reality
        KVM: x86/mmu: Drop infrastructure for multiple page-track modes
        KVM: x86/mmu: Use page-track notifiers iff there are external users
        KVM: x86/mmu: Move KVM-only page-track declarations to internal header
        KVM: x86: Remove the unused page-track hook track_flush_slot()
        drm/i915/gvt: switch from ->track_flush_slot() to ->track_remove_region()
        KVM: x86: Add a new page-track hook to handle memslot deletion
        drm/i915/gvt: Don't bother removing write-protection on to-be-deleted slot
        KVM: x86: Reject memslot MOVE operations if KVMGT is attached
        ...
      0c021834
    • Linus Torvalds's avatar
      Merge tag 's390-6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 4a0fc73d
      Linus Torvalds authored
      Pull more s390 updates from Heiko Carstens:
      
       - A couple of virtual vs physical address confusion fixes
      
       - Rework locking in dcssblk driver to address a lockdep warning
      
       - Remove support for "noexec" kernel command line option since there is
         no use case where it would make sense
      
       - Simplify kernel mapping setup and get rid of quite a bit of code
      
       - Add architecture specific __set_memory_yy() functions which allow us
         to modify kernel mappings. Unlike the set_memory_xx() variants they
         take void pointer start and end parameters, which allows using them
         without the usual casts, and also to use them on areas larger than
         8TB.
      
         Note that the set_memory_xx() family comes with an int num_pages
         parameter which overflows with 8TB. This could be addressed by
         changing the num_pages parameter to unsigned long, however requires
         to change all architectures, since the module code expects an int
         parameter (see module_set_memory()).
      
         This was indeed an issue since for debug_pagealloc() we call
         set_memory_4k() on the whole identity mapping. Therefore address this
         for now with the __set_memory_yy() variant, and address common code
         later
      
       - Use dev_set_name() and also fix memory leak in zcrypt driver error
         handling
      
       - Remove unused lsi_mask from airq_struct
      
       - Add warning for invalid kernel mapping requests
      
      * tag 's390-6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/vmem: do not silently ignore mapping limit
        s390/zcrypt: utilize dev_set_name() ability to use a formatted string
        s390/zcrypt: don't leak memory if dev_set_name() fails
        s390/mm: fix MAX_DMA_ADDRESS physical vs virtual confusion
        s390/airq: remove lsi_mask from airq_struct
        s390/mm: use __set_memory() variants where useful
        s390/set_memory: add __set_memory() variant
        s390/set_memory: generate all set_memory() functions
        s390/mm: improve description of mapping permissions of prefix pages
        s390/amode31: change type of __samode31, __eamode31, etc
        s390/mm: simplify kernel mapping setup
        s390: remove "noexec" option
        s390/vmem: fix virtual vs physical address confusion
        s390/dcssblk: fix lockdep warning
        s390/monreader: fix virtual vs physical address confusion
      4a0fc73d
    • Linus Torvalds's avatar
      Merge tag 'mips_6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · ac2224a4
      Linus Torvalds authored
      Pull MIPS updates from Thomas Bogendoerfer:
       "Just cleanups and fixes"
      
      * tag 'mips_6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: TXx9: Do PCI error checks on own line
        arch/mips/configs/*_defconfig cleanup
        MIPS: VDSO: Conditionally export __vdso_gettimeofday()
        Mips: loongson3_defconfig: Enable ast drm driver by default
        mips: remove <asm/export.h>
        mips: replace #include <asm/export.h> with #include <linux/export.h>
        mips: remove unneeded #include <asm/export.h>
        MIPS: Loongson64: Fix more __iomem attributes
        MIPS: loongson32: Remove regs-rtc.h
        MIPS: loongson32: Remove regs-clk.h
        MIPS: More explicit DT include clean-ups
        MIPS: Fixup explicit DT include clean-up
        Revert MIPS: Loongson: Fix build error when make modules_install
        MIPS: Only fiddle with CHECKFLAGS if `need-compiler'
        MIPS: Fix CONFIG_CPU_DADDI_WORKAROUNDS `modules_install' regression
        MIPS: Explicitly include correct DT includes
      ac2224a4
    • Linus Torvalds's avatar
      Merge tag 'xtensa-20230905' of https://github.com/jcmvbkbc/linux-xtensa · dd1386dd
      Linus Torvalds authored
      Pull xtensa updates from Max Filippov:
      
       - enable MTD XIP support
      
       - fix base address of the xtensa perf module in newer hardware
      
      * tag 'xtensa-20230905' of https://github.com/jcmvbkbc/linux-xtensa:
        xtensa: add XIP-aware MTD support
        xtensa: PMU: fix base address for the newer hardware
      dd1386dd
    • Christian Brauner's avatar
      ntfs3: drop inode references in ntfs_put_super() · 78a06688
      Christian Brauner authored
      Recently we moved most cleanup from ntfs_put_super() into
      ntfs3_kill_sb() as part of a bigger cleanup.  This accidently also moved
      dropping inode references stashed in ntfs3's sb->s_fs_info from
      @sb->put_super() to @sb->kill_sb().  But generic_shutdown_super()
      verifies that there are no busy inodes past sb->put_super().  Fix this
      and disentangle dropping inode references from freeing @sb->s_fs_info.
      
      Fixes: a4f64a30 ("ntfs3: free the sbi in ->kill_sb") # mainline only
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      78a06688
    • Linus Torvalds's avatar
      vfs: mostly undo glibc turning 'fstat()' into 'fstatat(AT_EMPTY_PATH)' · 9013c51c
      Linus Torvalds authored
      Mateusz reports that glibc turns 'fstat()' calls into 'fstatat()', and
      that seems to have been going on for quite a long time due to glibc
      having tried to simplify its stat logic into just one point.
      
      This turns out to cause completely unnecessary overhead, where we then
      go off and allocate the kernel side pathname, and actually look up the
      empty path.  Sure, our path lookup is quite optimized, but it still
      causes a fair bit of allocation overhead and a couple of completely
      unnecessary rounds of lockref accesses etc.
      
      This is all hopefully getting fixed in user space, and there is a patch
      floating around for just having glibc use the native fstat() system
      call.  But even with the current situation we can at least improve on
      things by catching the situation and short-circuiting it.
      
      Note that this is still measurably slower than just a plain 'fstat()',
      since just checking that the filename is actually empty is somewhat
      expensive due to inevitable user space access overhead from the kernel
      (ie verifying pointers, and SMAP on x86).  But it's still quite a bit
      faster than actually looking up the path for real.
      
      To quote numers from Mateusz:
       "Sapphire Rapids, will-it-scale, ops/s
      
        stock fstat	5088199
        patched fstat	7625244	(+49%)
        real fstat	8540383	(+67% / +12%)"
      
      where that 'stock fstat' is the glibc translation of fstat into
      fstatat() with an empty path, the 'patched fstat' is with this short
      circuiting of the path lookup, and the 'real fstat' is the actual native
      fstat() system call with none of this overhead.
      
      Link: https://lore.kernel.org/lkml/20230903204858.lv7i3kqvw6eamhgz@f/Reported-by: default avatarMateusz Guzik <mjguzik@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9013c51c
  2. 06 Sep, 2023 4 commits
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-6.6-rc1' of https://github.com/ceph/ceph-client · 7ba2090c
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "Mixed with some fixes and cleanups, this brings in reasonably complete
        fscrypt support to CephFS! The list of things which don't work with
        encryption should be fairly short, mostly around the edges: fallocate
        (not supported well in CephFS to begin with), copy_file_range
        (requires re-encryption), non-default striping patterns.
      
        This was a multi-year effort principally by Jeff Layton with
        assistance from Xiubo Li, Luís Henriques and others, including several
        dependant changes in the MDS, netfs helper library and fscrypt
        framework itself"
      
      * tag 'ceph-for-6.6-rc1' of https://github.com/ceph/ceph-client: (53 commits)
        ceph: make num_fwd and num_retry to __u32
        ceph: make members in struct ceph_mds_request_args_ext a union
        rbd: use list_for_each_entry() helper
        libceph: do not include crypto/algapi.h
        ceph: switch ceph_lookup/atomic_open() to use new fscrypt helper
        ceph: fix updating i_truncate_pagecache_size for fscrypt
        ceph: wait for OSD requests' callbacks to finish when unmounting
        ceph: drop messages from MDS when unmounting
        ceph: update documentation regarding snapshot naming limitations
        ceph: prevent snapshot creation in encrypted locked directories
        ceph: add support for encrypted snapshot names
        ceph: invalidate pages when doing direct/sync writes
        ceph: plumb in decryption during reads
        ceph: add encryption support to writepage and writepages
        ceph: add read/modify/write to ceph_sync_write
        ceph: align data in pages in ceph_sync_write
        ceph: don't use special DIO path for encrypted inodes
        ceph: add truncate size handling support for fscrypt
        ceph: add object version support for sync read
        libceph: allow ceph_osdc_new_request to accept a multi-op read
        ...
      7ba2090c
    • Linus Torvalds's avatar
      Merge tag 'input-for-v6.6-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 744a7594
      Linus Torvalds authored
      Pull input updates from Dmitry Torokhov:
      
       - a new driver for Azoteq IQS7210A/7211A/E touch controllers
      
       - support for Azoteq IQS7222D variant added to iqs7222 driver
      
       - support for touch keys functionality added to Melfas MMS114 driver
      
       - new hardware IDs added to exc3000 and Goodix drivers
      
       - xpad driver gained support for GameSir T4 Kaleid Controller
      
       - a fix for xpad driver to properly support some third-party
         controllers that need a magic packet to start properly
      
       - a fix for psmouse driver to more reliably switch to RMI4 mode on
         devices that use native RMI4/SMbus protocol
      
       - a quirk for i8042 for TUXEDO Gemini 17 Gen1/Clevo PD70PN laptops
      
       - multiple drivers have been updated to make use of devm and other
         newer APIs such as dev_err_probe(), devm_regulator_get_enable(), and
         others.
      
      * tag 'input-for-v6.6-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (83 commits)
        Input: goodix - add support for ACPI ID GDX9110
        Input: rpckbd - fix the return value handle for platform_get_irq()
        Input: tca6416-keypad - switch to using input core's polling features
        Input: tca6416-keypad - convert to use devm_* api
        Input: tca6416-keypad - fix interrupt enable disbalance
        Input: tca6416-keypad - rely on I2C core to set up suspend/resume
        Input: tca6416-keypad - always expect proper IRQ number in i2c client
        Input: lm8323 - convert to use devm_* api
        Input: lm8323 - rely on device core to create kp_disable attribute
        Input: qt2160 - convert to use devm_* api
        Input: qt2160 - do not hard code interrupt trigger
        Input: qt2160 - switch to using threaded interrupt handler
        Input: qt2160 - tweak check for i2c adapter functionality
        Input: psmouse - add delay when deactivating for SMBus mode
        Input: mcs-touchkey - fix uninitialized use of error in mcs_touchkey_probe()
        Input: qt1070 - convert to use devm_* api
        Input: mcs-touchkey - convert to use devm_* api
        Input: amikbd - convert to use devm_* api
        Input: lm8333 - convert to use devm_* api
        Input: mms114 - add support for touch keys
        ...
      744a7594
    • Linus Torvalds's avatar
      Merge tag 'linux-watchdog-6.6-rc1' of git://www.linux-watchdog.org/linux-watchdog · 29057cc5
      Linus Torvalds authored
      Pull watchdog updates from Wim Van Sebroeck:
      
       - add marvell GTI watchdog driver
      
       - add support for Amlogic-T7 SoCs
      
       - document the IPQ5018 watchdog compatible
      
       - enable COMPILE_TEST for more watchdog device drivers
      
       - core: stop watchdog when executing poweroff command
      
       - other small improvements and fixes
      
      * tag 'linux-watchdog-6.6-rc1' of git://www.linux-watchdog.org/linux-watchdog: (21 commits)
        watchdog: Add support for Amlogic-T7 SoCs
        watchdog: Add a new struct for Amlogic-GXBB driver
        dt-bindings: watchdog: Add support for Amlogic-T7 SoCs
        dt-bindings: watchdog: qcom-wdt: document IPQ5018
        watchdog: imx2_wdt: Improve dev_crit() message
        watchdog: stm32: Drop unnecessary of_match_ptr()
        watchdog: sama5d4: readout initial state
        watchdog: intel-mid_wdt: add MODULE_ALIAS() to allow auto-load
        watchdog: core: stop watchdog when executing poweroff command
        watchdog: pm8916_wdt: Remove redundant of_match_ptr()
        watchdog: xilinx_wwdt: Use div_u64() in xilinx_wwdt_start()
        watchdog: starfive: Remove #ifdef guards for PM related functions
        watchdog: s3c2410: Fix potential deadlock on &wdt->lock
        watchdog:rit_wdt: Add support for WDIOF_CARDRESET
        dt-bindings: watchdog: ti,rti-wdt: Add support for WDIOF_CARDRESET
        watchdog: Enable COMPILE_TEST for more drivers
        watchdog: advantech_ec_wdt: fix Kconfig dependencies
        watchdog: Explicitly include correct DT includes
        Watchdog: Add marvell GTI watchdog driver
        dt-bindings: watchdog: marvell GTI system watchdog driver
        ...
      29057cc5
    • Linus Torvalds's avatar
      Merge tag 'backlight-next-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight · 57ac7ff8
      Linus Torvalds authored
      Pull backlight updates from Lee Jones:
       "New Functionality:
      
         - Ensure correct includes are present and remove some that are not
           required
      
         - Drop redundant of_match_ptr() call to cast pointer to NULL
      
        Bug Fixes:
      
         - Revert to old (expected) behaviour of initialising PWM state on
           first brightness change
      
         - Correctly handle / propagate errors
      
         - Fix 'sometimes-uninitialised' issues"
      
      * tag 'backlight-next-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
        backlight: led_bl: Remove redundant of_match_ptr()
        backlight: lp855x: Drop ret variable in brightness change function
        backlight: gpio_backlight: Drop output GPIO direction check for initial power state
        backlight: lp855x: Catch errors when changing brightness
        backlight: lp855x: Initialize PWM state on first brightness change
        backlight: qcom-wled: Explicitly include correct DT includes
      57ac7ff8
  3. 05 Sep, 2023 29 commits
    • Linus Torvalds's avatar
      Merge tag 'gfs2-v6.5-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 65d6e954
      Linus Torvalds authored
      Pull gfs2 updates from Andreas Gruenbacher:
      
       - Fix a glock state (non-)transition bug when a dlm request times out
         and is canceled, and we have locking requests that can now be granted
         immediately
      
       - Various fixes and cleanups in how the logd and quotad daemons are
         woken up and terminated
      
       - Fix several bugs in the quota data reference counting and shrinking.
         Free quota data objects synchronously in put_super() instead of
         letting call_rcu() run wild
      
       - Make sure not to deallocate quota data during a withdraw; rather,
         defer quota data deallocation to put_super(). Withdraws can happen in
         contexts in which callers on the stack are holding quota data
         references
      
       - Many minor quota fixes and cleanups by Bob
      
       - Update the the mailing list address for gfs2 and dlm. (It's the same
         list for both and we are moving it to gfs2@lists.linux.dev)
      
       - Various other minor cleanups
      
      * tag 'gfs2-v6.5-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: (51 commits)
        MAINTAINERS: Update dlm mailing list
        MAINTAINERS: Update gfs2 mailing list
        gfs2: change qd_slot_count to qd_slot_ref
        gfs2: check for no eligible quota changes
        gfs2: Remove useless assignment
        gfs2: simplify slot_get
        gfs2: Simplify qd2offset
        gfs2: introduce qd_bh_get_or_undo
        gfs2: Remove quota allocation info from quota file
        gfs2: use constant for array size
        gfs2: Set qd_sync_gen in do_sync
        gfs2: Remove useless err set
        gfs2: Small gfs2_quota_lock cleanup
        gfs2: move qdsb_put and reduce redundancy
        gfs2: improvements to sysfs status
        gfs2: Don't try to sync non-changes
        gfs2: Simplify function need_sync
        gfs2: remove unneeded pg_oflow variable
        gfs2: remove unneeded variable done
        gfs2: pass sdp to gfs2_write_buf_to_page
        ...
      65d6e954
    • Linus Torvalds's avatar
      Merge tag 'fuse-update-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 9e310ea5
      Linus Torvalds authored
      Pull fuse updates from Miklos Szeredi:
      
       - Revert non-waiting FLUSH due to a regression
      
       - Fix a lookup counter leak in readdirplus
      
       - Add an option to allow shared mmaps in no-cache mode
      
       - Add btime support and statx intrastructure to the protocol
      
       - Invalidate positive/negative dentry on failed create/delete
      
      * tag 'fuse-update-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: conditionally fill kstat in fuse_do_statx()
        fuse: invalidate dentry on EEXIST creates or ENOENT deletes
        fuse: cache btime
        fuse: implement statx
        fuse: add ATTR_TIMEOUT macro
        fuse: add STATX request
        fuse: handle empty request_mask in statx
        fuse: write back dirty pages before direct write in direct_io_relax mode
        fuse: add a new fuse init flag to relax restrictions in no cache mode
        fuse: invalidate page cache pages before direct write
        fuse: nlookup missing decrement in fuse_direntplus_link
        Revert "fuse: in fuse_flush only wait if someone wants the return code"
      9e310ea5
    • Linus Torvalds's avatar
      Merge tag 'ata-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata · 4b3d6e0c
      Linus Torvalds authored
      Pull ata updates from Damien Le Moal:
      
       - Fix OF include file for ata platform drivers (Rob)
      
       - Simplify various ahci, sata and pata platform drivers using the
         function devm_platform_ioremap_resource() (Yangtao)
      
       - Cleanup libata time related argument types (e.g. timeouts values)
         (Sergey)
      
       - Cleanup libata code around error handling as all ata drivers now
         define a error_handler operation (Hannes and Niklas)
      
       - Remove functions intended for libsas that are in fact unused (Niklas)
      
       - Change the remove device callback of platform drivers to a null
         function (Uwe)
      
       - Simplify the pata_imx driver using devm_clk_get_enabled() (Li)
      
       - Remove old and uinused remnants of the ide code in arm, parisc,
         powerpc, sparc and m68k architectures and associated drivers
         (pata_buddha, pata_falcon and pata_gayle) (Geert)
      
       - Add missing MODULE_DESCRIPTION() in the sata_gemini and pata_ftide010
         drivers (me)
      
       - Several fixes for the pata_ep93xx and pata_falcon drivers (Nikita,
         Michael)
      
       - Add Elkhart Lake AHCI controller support to the ahci driver (Werner)
      
       - Disable NCQ trim on Micron 1100 drives (Pawel)
      
      * tag 'ata-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: (60 commits)
        ata: libata-core: Disable NCQ_TRIM on Micron 1100 drives
        ata: ahci: Add Elkhart Lake AHCI controller
        ata: pata_falcon: add data_swab option to byte-swap disk data
        ata: pata_falcon: fix IO base selection for Q40
        ata: pata_ep93xx: use soc_device_match for UDMA modes
        ata: pata_ep93xx: fix error return code in probe
        ata: sata_gemini: Add missing MODULE_DESCRIPTION
        ata: pata_ftide010: Add missing MODULE_DESCRIPTION
        m68k: Remove <asm/ide.h>
        ata: pata_gayle: Remove #include <asm/ide.h>
        ata: pata_falcon: Remove #include <asm/ide.h>
        ata: pata_buddha: Remove #include <asm/ide.h>
        asm-generic: Remove ide_iops.h
        sparc: Remove <asm/ide.h>
        powerpc: Remove <asm/ide.h>
        parisc: Remove <asm/ide.h>
        ARM: Remove <asm/ide.h>
        ata: pata_imx: Use helper function devm_clk_get_enabled()
        ata: sata_rcar: Convert to platform remove callback returning void
        ata: sata_mv: Convert to platform remove callback returning void
        ...
      4b3d6e0c
    • Linus Torvalds's avatar
      Merge tag 'mailbox-v6.6' of git://git.linaro.org/landing-teams/working/fujitsu/integration · 77331719
      Linus Torvalds authored
      Pull mailbox updates from Jassi Brar:
      
       - qcom: fix incorrect num_chans counting
      
       - mhu: Remove redundant dev_err
      
       - bcm: fix comments
      
       - common changes:
          - convert to use devm_platform_get_and_ioremap_resource
          - correct DT includes
      
      * tag 'mailbox-v6.6' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        mailbox: qcom-ipcc: fix incorrect num_chans counting
        mailbox: Explicitly include correct DT includes
        mailbox: ti-msgmgr: Use devm_platform_ioremap_resource_byname()
        mailbox: platform-mhu: Remove redundant dev_err()
        mailbox: bcm-pdc: Fix some kernel-doc comments
        mailbox: mailbox-test: Fix an error check in mbox_test_probe()
        mailbox: tegra-hsp: Convert to devm_platform_ioremap_resource()
        mailbox: rockchip: Use devm_platform_get_and_ioremap_resource()
        mailbox: mailbox-test: Use devm_platform_get_and_ioremap_resource()
        mailbox: bcm-pdc: Use devm_platform_get_and_ioremap_resource()
        mailbox: bcm-ferxrm-mailbox: Use devm_platform_get_and_ioremap_resource()
      77331719
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2023-09-05-11-51' of... · 3c5c9b7c
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2023-09-05-11-51' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull misc fixes from Andrew Morton:
       "Seven hotfixes. Four are cc:stable and the remainder pertain to issues
        which were introduced in the current merge window"
      
      * tag 'mm-hotfixes-stable-2023-09-05-11-51' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        sparc64: add missing initialization of folio in tlb_batch_add()
        mm: memory-failure: use rcu lock instead of tasklist_lock when collect_procs()
        revert "memfd: improve userspace warnings for missing exec-related flags".
        rcu: dump vmalloc memory info safely
        mm/vmalloc: add a safer version of find_vm_area() for debug
        tools/mm: fix undefined reference to pthread_once
        memcontrol: ensure memcg acquired by id is properly set up
      3c5c9b7c
    • Linus Torvalds's avatar
      Merge tag 'tpmdd-v6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd · 6155a3b8
      Linus Torvalds authored
      Pull more tpm updates from Jarkko Sakkinen:
       "Two more bug fixes for tpm_crb, categorically disabling rng for AMD
        CPU's in the tpm_crb driver, discarding the earlier probing approach"
      
      * tag 'tpmdd-v6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
        tpm: Enable hwrng only for Pluton on AMD CPUs
        tpm_crb: Fix an error handling path in crb_acpi_add()
      6155a3b8
    • Alexander Gordeev's avatar
      s390/vmem: do not silently ignore mapping limit · 06fc3b0d
      Alexander Gordeev authored
      The only interface that allows drivers establishing
      liner mappings is vmem_add_mapping(). It does check
      a requested range against allowed limits and a call
      to modify_pagetable() with an invalid mapping range
      is impossible.
      
      Hence, an attempt to map an address range outside of
      the identity mapping or vmemmap array could only be
      kernel bug.
      Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      06fc3b0d
    • Andy Shevchenko's avatar
      s390/zcrypt: utilize dev_set_name() ability to use a formatted string · f59ec04d
      Andy Shevchenko authored
      With the dev_set_name() prototype it's not obvious that it takes
      a formatted string as a parameter. Use its facility instead of
      duplicating the same with strncpy()/snprintf() calls.
      
      With this, also prevent return error code to be shadowed.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Link: https://lore.kernel.org/r/20230831110000.24279-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      f59ec04d
    • Andy Shevchenko's avatar
      s390/zcrypt: don't leak memory if dev_set_name() fails · 6252f47b
      Andy Shevchenko authored
      When dev_set_name() fails, zcdn_create() doesn't free the newly
      allocated resources. Do it.
      
      Fixes: 00fab235 ("s390/zcrypt: multiple zcrypt device nodes support")
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Link: https://lore.kernel.org/r/20230831110000.24279-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      6252f47b
    • Alexander Gordeev's avatar
      s390/mm: fix MAX_DMA_ADDRESS physical vs virtual confusion · 08d90f46
      Alexander Gordeev authored
      MAX_DMA_ADDRESS is defined and treated as a physical address,
      whereas it should be virtual.
      Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      08d90f46
    • Mike Rapoport (IBM)'s avatar
      sparc64: add missing initialization of folio in tlb_batch_add() · f4b4f3ec
      Mike Rapoport (IBM) authored
      Commit 1a10a44d ("sparc64: implement the new page table range API")
      missed initialization of folio variable in tlb_batch_add() which causes
      boot tests to crash.
      
      Add missing initialization.
      
      Link: https://lkml.kernel.org/r/20230904174350.GF3223@kernel.org
      Fixes: 1a10a44d ("sparc64: implement the new page table range API")
      Signed-off-by: default avatarMike Rapoport (IBM) <rppt@kernel.org>
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      f4b4f3ec
    • Tong Tiangen's avatar
      mm: memory-failure: use rcu lock instead of tasklist_lock when collect_procs() · d256d1cd
      Tong Tiangen authored
      We found a softlock issue in our test, analyzed the logs, and found that
      the relevant CPU call trace as follows:
      
      CPU0:
        _do_fork
          -> copy_process()
            -> write_lock_irq(&tasklist_lock)  //Disable irq,waiting for
            					 //tasklist_lock
      
      CPU1:
        wp_page_copy()
          ->pte_offset_map_lock()
            -> spin_lock(&page->ptl);        //Hold page->ptl
          -> ptep_clear_flush()
            -> flush_tlb_others() ...
              -> smp_call_function_many()
                -> arch_send_call_function_ipi_mask()
                  -> csd_lock_wait()         //Waiting for other CPUs respond
      	                               //IPI
      
      CPU2:
        collect_procs_anon()
          -> read_lock(&tasklist_lock)       //Hold tasklist_lock
            ->for_each_process(tsk)
              -> page_mapped_in_vma()
                -> page_vma_mapped_walk()
      	    -> map_pte()
                    ->spin_lock(&page->ptl)  //Waiting for page->ptl
      
      We can see that CPU1 waiting for CPU0 respond IPI,CPU0 waiting for CPU2
      unlock tasklist_lock, CPU2 waiting for CPU1 unlock page->ptl. As a result,
      softlockup is triggered.
      
      For collect_procs_anon(), what we're doing is task list iteration, during
      the iteration, with the help of call_rcu(), the task_struct object is freed
      only after one or more grace periods elapse. the logic as follows:
      
      release_task()
        -> __exit_signal()
          -> __unhash_process()
            -> list_del_rcu()
      
        -> put_task_struct_rcu_user()
          -> call_rcu(&task->rcu, delayed_put_task_struct)
      
      delayed_put_task_struct()
        -> put_task_struct()
        -> if (refcount_sub_and_test())
           	__put_task_struct()
                -> free_task()
      
      Therefore, under the protection of the rcu lock, we can safely use
      get_task_struct() to ensure a safe reference to task_struct during the
      iteration.
      
      By removing the use of tasklist_lock in task list iteration, we can break
      the softlock chain above.
      
      The same logic can also be applied to:
       - collect_procs_file()
       - collect_procs_fsdax()
       - collect_procs_ksm()
      
      Link: https://lkml.kernel.org/r/20230828022527.241693-1-tongtiangen@huawei.comSigned-off-by: default avatarTong Tiangen <tongtiangen@huawei.com>
      Acked-by: default avatarNaoya Horiguchi <naoya.horiguchi@nec.com>
      Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
      Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
      Cc: Miaohe Lin <linmiaohe@huawei.com>
      Cc: Paul E. McKenney <paulmck@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      d256d1cd
    • Andrew Morton's avatar
      revert "memfd: improve userspace warnings for missing exec-related flags". · 2562d67b
      Andrew Morton authored
      This warning is telling userspace developers to pass MFD_EXEC and
      MFD_NOEXEC_SEAL to memfd_create().  Commit 434ed335 ("memfd: improve
      userspace warnings for missing exec-related flags") made the warning more
      frequent and visible in the hope that this would accelerate the fixing of
      errant userspace.
      
      But the overall effect is to generate far too much dmesg noise.
      
      Fixes: 434ed335 ("memfd: improve userspace warnings for missing exec-related flags")
      Reported-by: default avatarDamian Tometzki <dtometzki@fedoraproject.org>
      Closes: https://lkml.kernel.org/r/ZPFzCSIgZ4QuHsSC@fedora.fritz.box
      Cc: Aleksa Sarai <cyphar@cyphar.com>
      Cc: Christian Brauner <brauner@kernel.org>
      Cc: Daniel Verkamp <dverkamp@chromium.org>
      Cc: Jeff Xu <jeffxu@google.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      2562d67b
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 61401a87
      Linus Torvalds authored
      Pull Kbuild updates from Masahiro Yamada:
      
       - Enable -Wenum-conversion warning option
      
       - Refactor the rpm-pkg target
      
       - Fix scripts/setlocalversion to consider annotated tags for rt-kernel
      
       - Add a jump key feature for the search menu of 'make nconfig'
      
       - Support Qt6 for 'make xconfig'
      
       - Enable -Wformat-overflow, -Wformat-truncation, -Wstringop-overflow,
         and -Wrestrict warnings for W=1 builds
      
       - Replace <asm/export.h> with <linux/export.h> for alpha, ia64, and
         sparc
      
       - Support DEB_BUILD_OPTIONS=parallel=N for the debian source package
      
       - Refactor scripts/Makefile.modinst and fix some modules_sign issues
      
       - Add a new Kconfig env variable to warn symbols that are not defined
         anywhere
      
       - Show help messages of config fragments in 'make help'
      
      * tag 'kbuild-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (62 commits)
        kconfig: fix possible buffer overflow
        kbuild: Show marked Kconfig fragments in "help"
        kconfig: add warn-unknown-symbols sanity check
        kbuild: dummy-tools: make MPROFILE_KERNEL checks work on BE
        Documentation/llvm: refresh docs
        modpost: Skip .llvm.call-graph-profile section check
        kbuild: support modules_sign for external modules as well
        kbuild: support 'make modules_sign' with CONFIG_MODULE_SIG_ALL=n
        kbuild: move more module installation code to scripts/Makefile.modinst
        kbuild: reduce the number of mkdir calls during modules_install
        kbuild: remove $(MODLIB)/source symlink
        kbuild: move depmod rule to scripts/Makefile.modinst
        kbuild: add modules_sign to no-{compiler,sync-config}-targets
        kbuild: do not run depmod for 'make modules_sign'
        kbuild: deb-pkg: support DEB_BUILD_OPTIONS=parallel=N in debian/rules
        alpha: remove <asm/export.h>
        alpha: replace #include <asm/export.h> with #include <linux/export.h>
        ia64: remove <asm/export.h>
        ia64: replace #include <asm/export.h> with #include <linux/export.h>
        sparc: remove <asm/export.h>
        ...
      61401a87
    • Linus Torvalds's avatar
      Merge tag 'mm-stable-2023-09-04-14-00' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm · 5eea5820
      Linus Torvalds authored
      Pull more MM updates from Andrew Morton:
      
       - Stefan Roesch has added ksm statistics to /proc/pid/smaps
      
       - Also a number of singleton patches, mainly cleanups and leftovers
      
      * tag 'mm-stable-2023-09-04-14-00' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mm/kmemleak: move up cond_resched() call in page scanning loop
        mm: page_alloc: remove stale CMA guard code
        MAINTAINERS: add rmap.h to mm entry
        rmap: remove anon_vma_link() nommu stub
        proc/ksm: add ksm stats to /proc/pid/smaps
        mm/hwpoison: rename hwp_walk* to hwpoison_walk*
        mm: memory-failure: add PageOffline() check
      5eea5820
    • Linus Torvalds's avatar
      Merge tag 'microblaze-v6.6' of git://git.monstr.eu/linux-2.6-microblaze · 893a259c
      Linus Torvalds authored
      Pull microblaze updates from Michal Simek:
      
       - Cleanup DT headers
      
       - Remove unused zalloc_maybe_bootmem()
      
       - Make virt_to_pfn() a static inline
      
      * tag 'microblaze-v6.6' of git://git.monstr.eu/linux-2.6-microblaze:
        microblaze: Make virt_to_pfn() a static inline
        microblaze: Remove zalloc_maybe_bootmem()
        microblaze: Explicitly include correct DT includes
      893a259c
    • Zqiang's avatar
      rcu: dump vmalloc memory info safely · c83ad36a
      Zqiang authored
      Currently, for double invoke call_rcu(), will dump rcu_head objects memory
      info, if the objects is not allocated from the slab allocator, the
      vmalloc_dump_obj() will be invoke and the vmap_area_lock spinlock need to
      be held, since the call_rcu() can be invoked in interrupt context,
      therefore, there is a possibility of spinlock deadlock scenarios.
      
      And in Preempt-RT kernel, the rcutorture test also trigger the following
      lockdep warning:
      
      BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48
      in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 1, name: swapper/0
      preempt_count: 1, expected: 0
      RCU nest depth: 1, expected: 1
      3 locks held by swapper/0/1:
       #0: ffffffffb534ee80 (fullstop_mutex){+.+.}-{4:4}, at: torture_init_begin+0x24/0xa0
       #1: ffffffffb5307940 (rcu_read_lock){....}-{1:3}, at: rcu_torture_init+0x1ec7/0x2370
       #2: ffffffffb536af40 (vmap_area_lock){+.+.}-{3:3}, at: find_vmap_area+0x1f/0x70
      irq event stamp: 565512
      hardirqs last  enabled at (565511): [<ffffffffb379b138>] __call_rcu_common+0x218/0x940
      hardirqs last disabled at (565512): [<ffffffffb5804262>] rcu_torture_init+0x20b2/0x2370
      softirqs last  enabled at (399112): [<ffffffffb36b2586>] __local_bh_enable_ip+0x126/0x170
      softirqs last disabled at (399106): [<ffffffffb43fef59>] inet_register_protosw+0x9/0x1d0
      Preemption disabled at:
      [<ffffffffb58040c3>] rcu_torture_init+0x1f13/0x2370
      CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W          6.5.0-rc4-rt2-yocto-preempt-rt+ #15
      Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014
      Call Trace:
       <TASK>
       dump_stack_lvl+0x68/0xb0
       dump_stack+0x14/0x20
       __might_resched+0x1aa/0x280
       ? __pfx_rcu_torture_err_cb+0x10/0x10
       rt_spin_lock+0x53/0x130
       ? find_vmap_area+0x1f/0x70
       find_vmap_area+0x1f/0x70
       vmalloc_dump_obj+0x20/0x60
       mem_dump_obj+0x22/0x90
       __call_rcu_common+0x5bf/0x940
       ? debug_smp_processor_id+0x1b/0x30
       call_rcu_hurry+0x14/0x20
       rcu_torture_init+0x1f82/0x2370
       ? __pfx_rcu_torture_leak_cb+0x10/0x10
       ? __pfx_rcu_torture_leak_cb+0x10/0x10
       ? __pfx_rcu_torture_init+0x10/0x10
       do_one_initcall+0x6c/0x300
       ? debug_smp_processor_id+0x1b/0x30
       kernel_init_freeable+0x2b9/0x540
       ? __pfx_kernel_init+0x10/0x10
       kernel_init+0x1f/0x150
       ret_from_fork+0x40/0x50
       ? __pfx_kernel_init+0x10/0x10
       ret_from_fork_asm+0x1b/0x30
       </TASK>
      
      The previous patch fixes this by using the deadlock-safe best-effort
      version of find_vm_area.  However, in case of failure print the fact that
      the pointer was a vmalloc pointer so that we print at least something.
      
      Link: https://lkml.kernel.org/r/20230904180806.1002832-2-joel@joelfernandes.org
      Fixes: 98f18083 ("mm: Make mem_dump_obj() handle vmalloc() memory")
      Signed-off-by: default avatarZqiang <qiang.zhang1211@gmail.com>
      Signed-off-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
      Reported-by: default avatarZhen Lei <thunder.leizhen@huaweicloud.com>
      Reviewed-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      Cc: Paul E. McKenney <paulmck@kernel.org>
      Cc: Uladzislau Rezki (Sony) <urezki@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      c83ad36a
    • Joel Fernandes (Google)'s avatar
      mm/vmalloc: add a safer version of find_vm_area() for debug · 0818e739
      Joel Fernandes (Google) authored
      It is unsafe to dump vmalloc area information when trying to do so from
      some contexts.  Add a safer trylock version of the same function to do a
      best-effort VMA finding and use it from vmalloc_dump_obj().
      
      [applied test robot feedback on unused function fix.]
      [applied Uladzislau feedback on locking.]
      Link: https://lkml.kernel.org/r/20230904180806.1002832-1-joel@joelfernandes.org
      Fixes: 98f18083 ("mm: Make mem_dump_obj() handle vmalloc() memory")
      Signed-off-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
      Reviewed-by: default avatarUladzislau Rezki (Sony) <urezki@gmail.com>
      Reported-by: default avatarZhen Lei <thunder.leizhen@huaweicloud.com>
      Cc: Paul E. McKenney <paulmck@kernel.org>
      Cc: Zqiang <qiang.zhang1211@gmail.com>
      Cc: <stable@vger.kernel.org>
      Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      0818e739
    • Xie XiuQi's avatar
      tools/mm: fix undefined reference to pthread_once · 7f33105c
      Xie XiuQi authored
      Commit 97d5f2e9 ("tools api fs: More thread safety for global
      filesystem variables") introduces pthread_once, so the libpthread
      should be added at link time, or we'll meet the following compile
      error when 'make -C tools/mm':
      
        gcc -Wall -Wextra -I../lib/ -o page-types page-types.c ../lib/api/libapi.a
        ~/linux/tools/lib/api/fs/fs.c:146: undefined reference to `pthread_once'
        ~/linux/tools/lib/api/fs/fs.c:147: undefined reference to `pthread_once'
        ~/linux/tools/lib/api/fs/fs.c:148: undefined reference to `pthread_once'
        ~/linux/tools/lib/api/fs/fs.c:149: undefined reference to `pthread_once'
        ~/linux/tools/lib/api/fs/fs.c:150: undefined reference to `pthread_once'
        /usr/bin/ld: ../lib/api/libapi.a(libapi-in.o):~/linux/tools/lib/api/fs/fs.c:151:
        more undefined references to `pthread_once' follow
        collect2: error: ld returned 1 exit status
        make: *** [Makefile:22: page-types] Error 1
      
      Link: https://lkml.kernel.org/r/20230831034205.2376653-1-xiexiuqi@huaweicloud.com
      Fixes: 97d5f2e9 ("tools api fs: More thread safety for global filesystem variables")
      Signed-off-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      7f33105c
    • Johannes Weiner's avatar
      memcontrol: ensure memcg acquired by id is properly set up · 6f0df8e1
      Johannes Weiner authored
      In the eviction recency check, we attempt to retrieve the memcg to which
      the folio belonged when it was evicted, by the memcg id stored in the
      shadow entry.  However, there is a chance that the retrieved memcg is not
      the original memcg that has been killed, but a new one which happens to
      have the same id.
      
      This is a somewhat unfortunate, but acceptable and rare inaccuracy in the
      heuristics.  However, if we retrieve this new memcg between its allocation
      and when it is properly attached to the memcg hierarchy, we could run into
      the following NULL pointer exception during the memcg hierarchy traversal
      done in mem_cgroup_get_nr_swap_pages():
      
      [ 155757.793456] BUG: kernel NULL pointer dereference, address: 00000000000000c0
      [ 155757.807568] #PF: supervisor read access in kernel mode
      [ 155757.818024] #PF: error_code(0x0000) - not-present page
      [ 155757.828482] PGD 401f77067 P4D 401f77067 PUD 401f76067 PMD 0
      [ 155757.839985] Oops: 0000 [#1] SMP
      [ 155757.887870] RIP: 0010:mem_cgroup_get_nr_swap_pages+0x3d/0xb0
      [ 155757.899377] Code: 29 19 4a 02 48 39 f9 74 63 48 8b 97 c0 00 00 00 48 8b b7 58 02 00 00 48 2b b7 c0 01 00 00 48 39 f0 48 0f 4d c6 48 39 d1 74 42 <48> 8b b2 c0 00 00 00 48 8b ba 58 02 00 00 48 2b ba c0 01 00 00 48
      [ 155757.937125] RSP: 0018:ffffc9002ecdfbc8 EFLAGS: 00010286
      [ 155757.947755] RAX: 00000000003a3b1c RBX: 000007ffffffffff RCX: ffff888280183000
      [ 155757.962202] RDX: 0000000000000000 RSI: 0007ffffffffffff RDI: ffff888bbc2d1000
      [ 155757.976648] RBP: 0000000000000001 R08: 000000000000000b R09: ffff888ad9cedba0
      [ 155757.991094] R10: ffffea0039c07900 R11: 0000000000000010 R12: ffff888b23a7b000
      [ 155758.005540] R13: 0000000000000000 R14: ffff888bbc2d1000 R15: 000007ffffc71354
      [ 155758.019991] FS:  00007f6234c68640(0000) GS:ffff88903f9c0000(0000) knlGS:0000000000000000
      [ 155758.036356] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 155758.048023] CR2: 00000000000000c0 CR3: 0000000a83eb8004 CR4: 00000000007706e0
      [ 155758.062473] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [ 155758.076924] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [ 155758.091376] PKRU: 55555554
      [ 155758.096957] Call Trace:
      [ 155758.102016]  <TASK>
      [ 155758.106502]  ? __die+0x78/0xc0
      [ 155758.112793]  ? page_fault_oops+0x286/0x380
      [ 155758.121175]  ? exc_page_fault+0x5d/0x110
      [ 155758.129209]  ? asm_exc_page_fault+0x22/0x30
      [ 155758.137763]  ? mem_cgroup_get_nr_swap_pages+0x3d/0xb0
      [ 155758.148060]  workingset_test_recent+0xda/0x1b0
      [ 155758.157133]  workingset_refault+0xca/0x1e0
      [ 155758.165508]  filemap_add_folio+0x4d/0x70
      [ 155758.173538]  page_cache_ra_unbounded+0xed/0x190
      [ 155758.182919]  page_cache_sync_ra+0xd6/0x1e0
      [ 155758.191738]  filemap_read+0x68d/0xdf0
      [ 155758.199495]  ? mlx5e_napi_poll+0x123/0x940
      [ 155758.207981]  ? __napi_schedule+0x55/0x90
      [ 155758.216095]  __x64_sys_pread64+0x1d6/0x2c0
      [ 155758.224601]  do_syscall_64+0x3d/0x80
      [ 155758.232058]  entry_SYSCALL_64_after_hwframe+0x46/0xb0
      [ 155758.242473] RIP: 0033:0x7f62c29153b5
      [ 155758.249938] Code: e8 48 89 75 f0 89 7d f8 48 89 4d e0 e8 b4 e6 f7 ff 41 89 c0 4c 8b 55 e0 48 8b 55 e8 48 8b 75 f0 8b 7d f8 b8 11 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 33 44 89 c7 48 89 45 f8 e8 e7 e6 f7 ff 48 8b
      [ 155758.288005] RSP: 002b:00007f6234c5ffd0 EFLAGS: 00000293 ORIG_RAX: 0000000000000011
      [ 155758.303474] RAX: ffffffffffffffda RBX: 00007f628c4e70c0 RCX: 00007f62c29153b5
      [ 155758.318075] RDX: 000000000003c041 RSI: 00007f61d2986000 RDI: 0000000000000076
      [ 155758.332678] RBP: 00007f6234c5fff0 R08: 0000000000000000 R09: 0000000064d5230c
      [ 155758.347452] R10: 000000000027d450 R11: 0000000000000293 R12: 000000000003c041
      [ 155758.362044] R13: 00007f61d2986000 R14: 00007f629e11b060 R15: 000000000027d450
      [ 155758.376661]  </TASK>
      
      This patch fixes the issue by moving the memcg's id publication from the
      alloc stage to online stage, ensuring that any memcg acquired via id must
      be connected to the memcg tree.
      
      Link: https://lkml.kernel.org/r/20230823225430.166925-1-nphamcs@gmail.com
      Fixes: f78dfc7b ("workingset: fix confusion around eviction vs refault container")
      Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Co-developed-by: default avatarNhat Pham <nphamcs@gmail.com>
      Signed-off-by: default avatarNhat Pham <nphamcs@gmail.com>
      Acked-by: default avatarShakeel Butt <shakeelb@google.com>
      Cc: Yosry Ahmed <yosryahmed@google.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Roman Gushchin <roman.gushchin@linux.dev>
      Cc: Muchun Song <songmuchun@bytedance.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      6f0df8e1
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of https://github.com/openrisc/linux · 3dceb8a9
      Linus Torvalds authored
      Pull OpenRISC updates from Stafford Horne:
      
       - Fixes from me to cleanup all compiler warnings reported under
         arch/openrisc
      
       - One cleanup from Linus Walleij to convert pfn macros to static
         inlines
      
      * tag 'for-linus' of https://github.com/openrisc/linux:
        openrisc: Remove kernel-doc marker from ioremap comment
        openrisc: Remove unused tlb_init function
        openriac: Remove unused nommu_dump_state function
        openrisc: Include cpu.h and switch_to.h for prototypes
        openrisc: Add prototype for die to bug.h
        openrisc: Add prototype for show_registers to processor.h
        openrisc: Declare do_signal function as static
        openrisc: Add missing prototypes for assembly called fnctions
        openrisc: Make pfn accessors statics inlines
      3dceb8a9
    • Konstantin Meskhidze's avatar
      kconfig: fix possible buffer overflow · a3b7039b
      Konstantin Meskhidze authored
      Buffer 'new_argv' is accessed without bound check after accessing with
      bound check via 'new_argc' index.
      
      Fixes: e298f3b4 ("kconfig: add built-in function support")
      Co-developed-by: default avatarIvanov Mikhail <ivanov.mikhail1@huawei-partners.com>
      Signed-off-by: default avatarKonstantin Meskhidze <konstantin.meskhidze@huawei.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      a3b7039b
    • Andrew Price's avatar
      MAINTAINERS: Update dlm mailing list · 2938fd75
      Andrew Price authored
      The new gfs2@ list will also be used for dlm development.
      Signed-off-by: default avatarAndrew Price <anprice@redhat.com>
      Acked-by: default avatarDavid Teigland <teigland@redhat.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      2938fd75
    • Andrew Price's avatar
      7b7e3ed7
    • Jonathan Marek's avatar
      mailbox: qcom-ipcc: fix incorrect num_chans counting · a4932080
      Jonathan Marek authored
      Breaking out early when a match is found leads to an incorrect num_chans
      value when more than one ipcc mailbox channel is used by the same device.
      
      Fixes: e9d50e4b ("mailbox: qcom-ipcc: Dynamic alloc for channel arrangement")
      Signed-off-by: default avatarJonathan Marek <jonathan@marek.ca>
      Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
      a4932080
    • Rob Herring's avatar
      mailbox: Explicitly include correct DT includes · e9803aac
      Rob Herring authored
      The DT of_device.h and of_platform.h date back to the separate
      of_platform_bus_type before it as merged into the regular platform bus.
      As part of that merge prepping Arm DT support 13 years ago, they
      "temporarily" include each other. They also include platform_device.h
      and of.h. As a result, there's a pretty much random mix of those include
      files used throughout the tree. In order to detangle these headers and
      replace the implicit includes with struct declarations, users need to
      explicitly include the correct includes.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
      e9803aac
    • Li Zetao's avatar
      mailbox: ti-msgmgr: Use devm_platform_ioremap_resource_byname() · 4aac24c1
      Li Zetao authored
      Convert platform_get_resource_byname() + devm_ioremap_resource() to a
      single call to devm_platform_ioremap_resource_byname(), as this is
      exactly what this function does.
      Signed-off-by: default avatarLi Zetao <lizetao1@huawei.com>
      Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
      4aac24c1
    • Ruan Jinjie's avatar
      mailbox: platform-mhu: Remove redundant dev_err() · 65d9aa31
      Ruan Jinjie authored
      There is no need to call the dev_err() function directly to print a custom
      message when handling an error from platform_get_irq() function as
      it is going to display an appropriate error message in case of a failure.
      Signed-off-by: default avatarRuan Jinjie <ruanjinjie@huawei.com>
      Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
      65d9aa31
    • Yang Li's avatar
      mailbox: bcm-pdc: Fix some kernel-doc comments · ad495a52
      Yang Li authored
      Fix some kernel-doc comments to silence the warnings:
      
      drivers/mailbox/bcm-pdc-mailbox.c:707: warning: Function parameter or member 'pdcs' not described in 'pdc_tx_list_sg_add'
      drivers/mailbox/bcm-pdc-mailbox.c:707: warning: Excess function parameter 'spu_idx' description in 'pdc_tx_list_sg_add'
      drivers/mailbox/bcm-pdc-mailbox.c:875: warning: Function parameter or member 'pdcs' not described in 'pdc_rx_list_sg_add'
      drivers/mailbox/bcm-pdc-mailbox.c:875: warning: Excess function parameter 'spu_idx' description in 'pdc_rx_list_sg_add'
      drivers/mailbox/bcm-pdc-mailbox.c:966: warning: Function parameter or member 't' not described in 'pdc_tasklet_cb'
      drivers/mailbox/bcm-pdc-mailbox.c:966: warning: Excess function parameter 'data' description in 'pdc_tasklet_cb'
      Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
      Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
      ad495a52