1. 13 Apr, 2024 1 commit
  2. 05 Apr, 2024 1 commit
    • Damien Le Moal's avatar
      ata: ahci: Add mask_port_map module parameter · 24cfd864
      Damien Le Moal authored
      Commits 0077a504 ("ahci: asm1166: correct count of reported ports")
      and 9815e396 ("ahci: asm1064: correct count of reported ports")
      attempted to limit the ports of the ASM1166 and ASM1064 AHCI controllers
      to avoid long boot times caused by the fact that these adapters report
      a port map larger than the number of physical ports. The excess ports
      are "virtual" to hide port multiplier devices and probing these ports
      takes time. However, these commits caused a regression for users that do
      use PMP devices, as the ATA devices connected to the PMP cannot be
      scanned. These commits have thus been reverted by commit 6cd8adc3
      ("ahci: asm1064: asm1166: don't limit reported ports") to allow the
      discovery of devices connected through a port multiplier. But this
      revert re-introduced the long boot times for users that do not use a
      port multiplier setup.
      
      This patch adds the mask_port_map ahci module parameter to allow users
      to manually specify port map masks for controllers. In the case of the
      ASMedia 1166 and 1064 controllers, users that do not have port
      multiplier devices can mask the excess virtual ports exposed by the
      controller to speedup port scanning, thus reducing boot time.
      
      The mask_port_map parameter accepts 2 different formats:
       - mask_port_map=<mask>
         This applies the same mask to all AHCI controllers
         present in the system. This format is convenient for small systems
         that have only a single AHCI controller.
       - mask_port_map=<pci_dev>=<mask>,<pci_dev>=mask,...
         This applies the specified masks only to the PCI device listed. The
         <pci_dev> field is a regular PCI device ID (domain:bus:dev.func).
         This ID can be seen following "ahci" in the kernel messages. E.g.
         for "ahci 0000:01:00.0: 2/2 ports implemented (port mask 0x3)", the
         <pci_dev> field is "0000:01:00.0".
      
      When used, the function ahci_save_initial_config() indicates that a
      port map mask was applied with the message "masking port_map ...".
      E.g.: without a mask:
      modprobe ahci
      dmesg | grep ahci
      ...
      ahci 0000:00:17.0: AHCI vers 0001.0301, 32 command slots, 6 Gbps, SATA mode
      ahci 0000:00:17.0: (0000:00:17.0) 8/8 ports implemented (port mask 0xff)
      
      With a mask:
      modprobe ahci mask_port_map=0000:00:17.0=0x1
      dmesg | grep ahci
      ...
      ahci 0000:00:17.0: masking port_map 0xff -> 0x1
      ahci 0000:00:17.0: AHCI vers 0001.0301, 32 command slots, 6 Gbps, SATA mode
      ahci 0000:00:17.0: (0000:00:17.0) 1/8 ports implemented (port mask 0x1)
      Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Reviewed-by: default avatarNiklas Cassel <cassel@kernel.org>
      24cfd864
  3. 04 Apr, 2024 2 commits
  4. 02 Apr, 2024 1 commit
  5. 31 Mar, 2024 14 commits
    • Krzysztof Kozlowski's avatar
      ata: pata_macio: drop driver owner assignment · 7d899947
      Krzysztof Kozlowski authored
      PCI core in pci_register_driver() already sets the .owner, so driver
      does not need to.
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Reviewed-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
      Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      7d899947
    • Arnd Bergmann's avatar
      ata: sata_sx4: fix pdc20621_get_from_dimm() on 64-bit · 52f80bb1
      Arnd Bergmann authored
      gcc warns about a memcpy() with overlapping pointers because of an
      incorrect size calculation:
      
      In file included from include/linux/string.h:369,
                       from drivers/ata/sata_sx4.c:66:
      In function 'memcpy_fromio',
          inlined from 'pdc20621_get_from_dimm.constprop' at drivers/ata/sata_sx4.c:962:2:
      include/linux/fortify-string.h:97:33: error: '__builtin_memcpy' accessing 4294934464 bytes at offsets 0 and [16, 16400] overlaps 6442385281 bytes at offset -2147450817 [-Werror=restrict]
         97 | #define __underlying_memcpy     __builtin_memcpy
            |                                 ^
      include/linux/fortify-string.h:620:9: note: in expansion of macro '__underlying_memcpy'
        620 |         __underlying_##op(p, q, __fortify_size);                        \
            |         ^~~~~~~~~~~~~
      include/linux/fortify-string.h:665:26: note: in expansion of macro '__fortify_memcpy_chk'
        665 | #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
            |                          ^~~~~~~~~~~~~~~~~~~~
      include/asm-generic/io.h:1184:9: note: in expansion of macro 'memcpy'
       1184 |         memcpy(buffer, __io_virt(addr), size);
            |         ^~~~~~
      
      The problem here is the overflow of an unsigned 32-bit number to a
      negative that gets converted into a signed 'long', keeping a large
      positive number.
      
      Replace the complex calculation with a more readable min() variant
      that avoids the warning.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      52f80bb1
    • Linus Torvalds's avatar
      Linux 6.9-rc2 · 39cd87c4
      Linus Torvalds authored
      39cd87c4
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v6.9' of... · 7e40c210
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Deduplicate Kconfig entries for CONFIG_CXL_PMU
      
       - Fix unselectable choice entry in MIPS Kconfig, and forbid this
         structure
      
       - Remove unused include/asm-generic/export.h
      
       - Fix a NULL pointer dereference bug in modpost
      
       - Enable -Woverride-init warning consistently with W=1
      
       - Drop KCSAN flags from *.mod.c files
      
      * tag 'kbuild-fixes-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kconfig: Fix typo HEIGTH to HEIGHT
        Documentation/llvm: Note s390 LLVM=1 support with LLVM 18.1.0 and newer
        kbuild: Disable KCSAN for autogenerated *.mod.c intermediaries
        kbuild: make -Woverride-init warnings more consistent
        modpost: do not make find_tosym() return NULL
        export.h: remove include/asm-generic/export.h
        kconfig: do not reparent the menu inside a choice block
        MIPS: move unselectable FIT_IMAGE_FDT_EPM5 out of the "System type" choice
        cxl: remove CONFIG_CXL_PMU entry in drivers/cxl/Kconfig
      7e40c210
    • Linus Torvalds's avatar
      Merge tag 'edac_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras · 18737353
      Linus Torvalds authored
      Pull EDAC fixes from Borislav Petkov:
      
       - Fix more issues in the AMD FMPM driver
      
      * tag 'edac_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
        RAS: Avoid build errors when CONFIG_DEBUG_FS=n
        RAS/AMD/FMPM: Safely handle saved records of various sizes
        RAS/AMD/FMPM: Avoid NULL ptr deref in get_saved_records()
      18737353
    • Linus Torvalds's avatar
      Merge tag 'irq_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5dad2623
      Linus Torvalds authored
      Pull irq fixes from Borislav Petkov:
      
       - Fix an unused function warning on irqchip/irq-armada-370-xp
      
       - Fix the IRQ sharing with pinctrl-amd and ACPI OSL
      
      * tag 'irq_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/armada-370-xp: Suppress unused-function warning
        genirq: Introduce IRQF_COND_ONESHOT and use it in pinctrl-amd
      5dad2623
    • Linus Torvalds's avatar
      Merge tag 'perf_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 448f828f
      Linus Torvalds authored
      Pull x86 perf fixes from Borislav Petkov:
      
       - Define the correct set of default hw events on AMD Zen4
      
       - Use the correct stalled cycles PMCs on AMD Zen2 and newer
      
       - Fix detection of the LBR freeze feature on AMD
      
      * tag 'perf_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/amd/core: Define a proper ref-cycles event for Zen 4 and later
        perf/x86/amd/core: Update and fix stalled-cycles-* events for Zen 2 and later
        perf/x86/amd/lbr: Use freeze based on availability
        x86/cpufeatures: Add new word for scattered features
      448f828f
    • Linus Torvalds's avatar
      Merge tag 'timers_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8d338df7
      Linus Torvalds authored
      Pull timers update from Borislav Petkov:
      
       - Volunteer in Anna-Maria and Frederic as timers co-maintainers so that
         tglx can relax more :-P
      
      * tag 'timers_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        MAINTAINERS: Add co-maintainers for time[rs]
      8d338df7
    • Linus Torvalds's avatar
      Merge tag 'objtool_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8d7e7684
      Linus Torvalds authored
      Pull objtool fix from Borislav Petkov:
      
       - Fix a format specifier build error in objtool during an x32 build
      
      * tag 'objtool_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        objtool: Fix compile failure when using the x32 compiler
      8d7e7684
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1aac9cb7
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Make sure single object builds in arch/x86/virt/ ala
            make ... arch/x86/virt/vmx/tdx/seamcall.o
         work again
      
       - Do not do ROM range scans and memory validation when the kernel is
         running as a SEV-SNP guest as those can get problematic and, before
         that, are not really needed in such a guest
      
       - Exclude the build-time generated vdso-image-x32.o object from objtool
         validation and in particular the return sites in there due to a
         warning which fires when an unpatched return thunk is being used
      
       - Improve the NMI CPUs stall message to show additional information
         about the state of each CPU wrt the NMI handler
      
       - Enable gcc named address spaces support only on !KCSAN configs due to
         compiler options incompatibility
      
       - Revert a change which was trying to use GB pages for mapping regions
         only when the regions would be large enough but that change lead to
         kexec failing
      
       - A documentation fixlet
      
      * tag 'x86_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/build: Use obj-y to descend into arch/x86/virt/
        x86/sev: Skip ROM range scans and validation for SEV-SNP guests
        x86/vdso: Fix rethunk patching for vdso-image-x32.o too
        x86/nmi: Upgrade NMI backtrace stall checks & messages
        x86/percpu: Disable named address spaces for KCSAN
        Revert "x86/mm/ident_map: Use gbpages only where full GB page should be mapped."
        Documentation/x86: Fix title underline length
      1aac9cb7
    • Isak Ellmer's avatar
      kconfig: Fix typo HEIGTH to HEIGHT · 89e5462b
      Isak Ellmer authored
      Fixed a typo in some variables where height was misspelled as heigth.
      Signed-off-by: default avatarIsak Ellmer <isak01@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      89e5462b
    • Nathan Chancellor's avatar
      Documentation/llvm: Note s390 LLVM=1 support with LLVM 18.1.0 and newer · 978fa00e
      Nathan Chancellor authored
      As of the first s390 pull request during the 6.9 merge window,
      commit 691632f0 ("Merge tag 's390-6.9-1' of
      git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux"), s390 can be
      built with LLVM=1 when using LLVM 18.1.0, which is the first version
      that has SystemZ support implemented in ld.lld and llvm-objcopy.
      
      Update the supported architectures table in the Kbuild LLVM
      documentation to note this explicitly to make it more discoverable by
      users and other developers. Additionally, this brings s390 in line with
      the rest of the architectures in the table, which all support LLVM=1.
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      978fa00e
    • Borislav Petkov (AMD)'s avatar
      kbuild: Disable KCSAN for autogenerated *.mod.c intermediaries · 54babdc0
      Borislav Petkov (AMD) authored
      When KCSAN and CONSTRUCTORS are enabled, one can trigger the
      
        "Unpatched return thunk in use. This should not happen!"
      
      catch-all warning.
      
      Usually, when objtool runs on the .o objects, it does generate a section
      .return_sites which contains all offsets in the objects to the return
      thunks of the functions present there. Those return thunks then get
      patched at runtime by the alternatives.
      
      KCSAN and CONSTRUCTORS add this to the object file's .text.startup
      section:
      
        -------------------
        Disassembly of section .text.startup:
      
        ...
      
        0000000000000010 <_sub_I_00099_0>:
          10:   f3 0f 1e fa             endbr64
          14:   e8 00 00 00 00          call   19 <_sub_I_00099_0+0x9>
                                15: R_X86_64_PLT32      __tsan_init-0x4
          19:   e9 00 00 00 00          jmp    1e <__UNIQUE_ID___addressable_cryptd_alloc_aead349+0x6>
                                1a: R_X86_64_PLT32      __x86_return_thunk-0x4
        -------------------
      
      which, if it is built as a module goes through the intermediary stage of
      creating a <module>.mod.c file which, when translated, receives a second
      constructor:
      
        -------------------
        Disassembly of section .text.startup:
      
        0000000000000010 <_sub_I_00099_0>:
          10:   f3 0f 1e fa             endbr64
          14:   e8 00 00 00 00          call   19 <_sub_I_00099_0+0x9>
                                15: R_X86_64_PLT32      __tsan_init-0x4
          19:   e9 00 00 00 00          jmp    1e <_sub_I_00099_0+0xe>
                                1a: R_X86_64_PLT32      __x86_return_thunk-0x4
      
        ...
      
        0000000000000030 <_sub_I_00099_0>:
          30:   f3 0f 1e fa             endbr64
          34:   e8 00 00 00 00          call   39 <_sub_I_00099_0+0x9>
                                35: R_X86_64_PLT32      __tsan_init-0x4
          39:   e9 00 00 00 00          jmp    3e <__ksymtab_cryptd_alloc_ahash+0x2>
                                3a: R_X86_64_PLT32      __x86_return_thunk-0x4
        -------------------
      
      in the .ko file.
      
      Objtool has run already so that second constructor's return thunk cannot
      be added to the .return_sites section and thus the return thunk remains
      unpatched and the warning rightfully fires.
      
      Drop KCSAN flags from the mod.c generation stage as those constructors
      do not contain data races one would be interested about.
      
      Debugged together with David Kaplan <David.Kaplan@amd.com> and Nikolay
      Borisov <nik.borisov@suse.com>.
      Reported-by: default avatarPaul Menzel <pmenzel@molgen.mpg.de>
      Closes: https://lore.kernel.org/r/0851a207-7143-417e-be31-8bf2b3afb57d@molgen.mpg.deSigned-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
      Tested-by: Paul Menzel <pmenzel@molgen.mpg.de> # Dell XPS 13
      Reviewed-by: default avatarNikolay Borisov <nik.borisov@suse.com>
      Reviewed-by: default avatarMarco Elver <elver@google.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      54babdc0
    • Arnd Bergmann's avatar
      kbuild: make -Woverride-init warnings more consistent · c40845e3
      Arnd Bergmann authored
      The -Woverride-init warn about code that may be intentional or not,
      but the inintentional ones tend to be real bugs, so there is a bit of
      disagreement on whether this warning option should be enabled by default
      and we have multiple settings in scripts/Makefile.extrawarn as well as
      individual subsystems.
      
      Older versions of clang only supported -Wno-initializer-overrides with
      the same meaning as gcc's -Woverride-init, though all supported versions
      now work with both. Because of this difference, an earlier cleanup of
      mine accidentally turned the clang warning off for W=1 builds and only
      left it on for W=2, while it's still enabled for gcc with W=1.
      
      There is also one driver that only turns the warning off for newer
      versions of gcc but not other compilers, and some but not all the
      Makefiles still use a cc-disable-warning conditional that is no
      longer needed with supported compilers here.
      
      Address all of the above by removing the special cases for clang
      and always turning the warning off unconditionally where it got
      in the way, using the syntax that is supported by both compilers.
      
      Fixes: 2cd3271b ("kbuild: avoid duplicate warning options")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
      Acked-by: default avatarJani Nikula <jani.nikula@intel.com>
      Acked-by: default avatarAndrew Jeffery <andrew@codeconstruct.com.au>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      c40845e3
  6. 30 Mar, 2024 8 commits
    • Mikulas Patocka's avatar
      objtool: Fix compile failure when using the x32 compiler · 6205125b
      Mikulas Patocka authored
      When compiling the v6.9-rc1 kernel with the x32 compiler, the following
      errors are reported. The reason is that we take an "unsigned long"
      variable and print it using "PRIx64" format string.
      
      	In file included from check.c:16:
      	check.c: In function ‘add_dead_ends’:
      	/usr/src/git/linux-2.6/tools/objtool/include/objtool/warn.h:46:17: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘long unsigned int’ [-Werror=format=]
      	   46 |                 "%s: warning: objtool: " format "\n",   \
      	      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
      	check.c:613:33: note: in expansion of macro ‘WARN’
      	  613 |                                 WARN("can't find unreachable insn at %s+0x%" PRIx64,
      	      |                                 ^~~~
      	...
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: linux-kernel@vger.kernel.org
      6205125b
    • Linus Torvalds's avatar
      Merge tag 'xfs-6.9-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 712e1425
      Linus Torvalds authored
      Pull xfs fixes from Chandan Babu:
      
       - Allow stripe unit/width value passed via mount option to be written
         over existing values in the super block
      
       - Do not set current->journal_info to avoid its value from being miused
         by another filesystem context
      
      * tag 'xfs-6.9-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: don't use current->journal_info
        xfs: allow sunit mount option to repair bad primary sb stripe values
      712e1425
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · fe764a75
      Linus Torvalds authored
      Pull SCSI fixes and updates from James Bottomley:
       "Fully half this pull is updates to lpfc and qla2xxx which got
        committed just as the merge window opened. A sizeable fraction of the
        driver updates are simple bug fixes (and lock reworks for bug fixes in
        the case of lpfc), so rather than splitting the few actual
        enhancements out, we're just adding the drivers to the -rc1 pull.
      
        The enhancements for lpfc are log message removals, copyright updates
        and three patches redefining types. For qla2xxx it's just removing a
        debug message on module removal and the manufacturer detail update.
      
        The two major fixes are the sg teardown race and a core error leg
        problem with the procfs directory not being removed if we destroy a
        created host that never got to the running state. The rest are minor
        fixes and constifications"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (41 commits)
        scsi: bnx2fc: Remove spin_lock_bh while releasing resources after upload
        scsi: core: Fix unremoved procfs host directory regression
        scsi: mpi3mr: Avoid memcpy field-spanning write WARNING
        scsi: sd: Fix TCG OPAL unlock on system resume
        scsi: sg: Avoid sg device teardown race
        scsi: lpfc: Copyright updates for 14.4.0.1 patches
        scsi: lpfc: Update lpfc version to 14.4.0.1
        scsi: lpfc: Define types in a union for generic void *context3 ptr
        scsi: lpfc: Define lpfc_dmabuf type for ctx_buf ptr
        scsi: lpfc: Define lpfc_nodelist type for ctx_ndlp ptr
        scsi: lpfc: Use a dedicated lock for ras_fwlog state
        scsi: lpfc: Release hbalock before calling lpfc_worker_wake_up()
        scsi: lpfc: Replace hbalock with ndlp lock in lpfc_nvme_unregister_port()
        scsi: lpfc: Update lpfc_ramp_down_queue_handler() logic
        scsi: lpfc: Remove IRQF_ONESHOT flag from threaded IRQ handling
        scsi: lpfc: Move NPIV's transport unregistration to after resource clean up
        scsi: lpfc: Remove unnecessary log message in queuecommand path
        scsi: qla2xxx: Update version to 10.02.09.200-k
        scsi: qla2xxx: Delay I/O Abort on PCI error
        scsi: qla2xxx: Change debug message during driver unload
        ...
      fe764a75
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · ac672718
      Linus Torvalds authored
      Pull i2c fix from Wolfram Sang:
       "A fix from Andi for I2C host drivers"
      
      * tag 'i2c-for-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: i801: Fix a refactoring that broke a touchpad on Lenovo P1
      ac672718
    • Linus Torvalds's avatar
      Merge tag 'usb-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · ff789a26
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a bunch of small USB fixes for reported problems and
        regressions for 6.9-rc2. Included in here are:
      
         - deadlock fixes for long-suffering issues
      
         - USB phy driver revert for reported problem
      
         - typec fixes for reported problems
      
         - duplicate id in dwc3 dropped
      
         - dwc2 driver fixes
      
         - udc driver warning fix
      
         - cdc-wdm race bugfix
      
         - other tiny USB bugfixes
      
        All of these have been in linux-next this past week with no reported
        issues"
      
      * tag 'usb-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits)
        USB: core: Fix deadlock in port "disable" sysfs attribute
        USB: core: Add hub_get() and hub_put() routines
        usb: typec: ucsi: Check capabilities before cable and identity discovery
        usb: typec: ucsi: Clear UCSI_CCI_RESET_COMPLETE before reset
        usb: typec: ucsi_acpi: Refactor and fix DELL quirk
        usb: typec: ucsi: Ack unsupported commands
        usb: typec: ucsi: Check for notifications after init
        usb: typec: ucsi: Clear EVENT_PENDING under PPM lock
        usb: typec: Return size of buffer if pd_set operation succeeds
        usb: udc: remove warning when queue disabled ep
        usb: dwc3: pci: Drop duplicate ID
        usb: dwc3: Properly set system wakeup
        Revert "usb: phy: generic: Get the vbus supply"
        usb: cdc-wdm: close race between read and workqueue
        usb: dwc2: gadget: LPM flow fix
        usb: dwc2: gadget: Fix exiting from clock gating
        usb: dwc2: host: Fix ISOC flow in DDMA mode
        usb: dwc2: host: Fix remote wakeup from hibernation
        usb: dwc2: host: Fix hibernation flow
        USB: core: Fix deadlock in usb_deauthorize_interface()
        ...
      ff789a26
    • Linus Torvalds's avatar
      Merge tag 'staging-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 4e6e4229
      Linus Torvalds authored
      Pull staging driver fixes from Greg KH:
       "Here are two small staging driver fixes for the vc04_services driver
        that resolve reported problems:
      
         - strncpy fix for information leak
      
         - another information leak discovered by the previous strncpy fix
      
        Both of these have been in linux-next all this past week with no
        reported issues"
      
      * tag 'staging-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: vc04_services: fix information leak in create_component()
        staging: vc04_services: changen strncpy() to strscpy_pad()
      4e6e4229
    • Wolfram Sang's avatar
      Merge tag 'i2c-host-fixes-6.9-rc2' of... · 2953eb02
      Wolfram Sang authored
      Merge tag 'i2c-host-fixes-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current
      
      One fix in the i801 driver where a bug caused touchpad
      malfunctions on some Lenovo P1 models by incorrectly overwriting
      a status variable during successful SMBUS transactions.
      2953eb02
    • Masahiro Yamada's avatar
      x86/build: Use obj-y to descend into arch/x86/virt/ · 3f1a9bc5
      Masahiro Yamada authored
      Commit c33621b4 ("x86/virt/tdx: Wire up basic SEAMCALL functions")
      introduced a new instance of core-y instead of the standardized obj-y
      syntax.
      
      X86 Makefiles descend into subdirectories of arch/x86/virt inconsistently;
      into arch/x86/virt/ via core-y defined in arch/x86/Makefile, but into
      arch/x86/virt/svm/ via obj-y defined in arch/x86/Kbuild.
      
      This is problematic when you build a single object in parallel because
      multiple threads attempt to build the same file.
      
        $ make -j$(nproc) arch/x86/virt/vmx/tdx/seamcall.o
          [ snip ]
          AS      arch/x86/virt/vmx/tdx/seamcall.o
          AS      arch/x86/virt/vmx/tdx/seamcall.o
        fixdep: error opening file: arch/x86/virt/vmx/tdx/.seamcall.o.d: No such file or directory
        make[4]: *** [scripts/Makefile.build:362: arch/x86/virt/vmx/tdx/seamcall.o] Error 2
      
      Use the obj-y syntax, as it works correctly.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Link: https://lore.kernel.org/r/20240330060554.18524-1-masahiroy@kernel.org
      3f1a9bc5
  7. 29 Mar, 2024 13 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2024-03-30' of https://gitlab.freedesktop.org/drm/kernel · 486291a0
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Regular fixes for rc2, quite a few i915/amdgpu as usual, some xe, and
        then mostly scattered around. rc3 might be quieter with the holidays
        but we shall see.
      
        bridge:
         - select DRM_KMS_HELPER
      
        dma-buf:
         - fix NULL-pointer deref
      
        dp:
         - fix div-by-zero in DP MST unplug code
      
        fbdev:
         - select FB_IOMEM_FOPS for SBus
      
        sched:
         - fix NULL-pointer deref
      
        xe:
         - Fix build on mips
         - Fix wrong bound checks
         - Fix use of msec rather than jiffies
         - Remove dead code
      
        amdgpu:
         - SMU 14.0.1 updates
         - DCN 3.5.x updates
         - VPE fix
         - eDP panel flickering fix
         - Suspend fix
         - PSR fix
         - DCN 3.0+ fix
         - VCN 4.0.6 updates
         - debugfs fix
      
        amdkfd:
         - DMA-Buf fix
         - GFX 9.4.2 TLB flush fix
         - CP interrupt fix
      
        i915:
         - Fix for BUG_ON/BUILD_BUG_ON IN I915_memcpy.c
         - Update a MTL workaround
         - Fix locking inversion in hwmon's sysfs
         - Remove a bogus error message around PXP
         - Fix UAF on VMA
         - Reset queue_priority_hint on parking
         - Display Fixes:
         - Remove duplicated audio enable/disable on SDVO and DP
         - Disable AuxCCS for Xe driver
         - Revert init order of MIPI DSI
         - DRRS debugfs fix with an extra refactor patch
         - VRR related fixes
         - Fix a JSL eDP corruption
         - Fix the cursor physical dma address
         - BIOS VBT related fix
      
        nouveau:
         - dmem: handle kcalloc() allocation failures
      
        qxl:
         - remove unused variables
      
        rockchip:
         - vop2: remove support for AR30 and AB30 formats
      
        vmwgfx:
         - debugfs: create ttm_resource_manager entry only if needed"
      
      * tag 'drm-fixes-2024-03-30' of https://gitlab.freedesktop.org/drm/kernel: (55 commits)
        drm/i915/bios: Tolerate devdata==NULL in intel_bios_encoder_supports_dp_dual_mode()
        drm/i915: Pre-populate the cursor physical dma address
        drm/i915/gt: Reset queue_priority_hint on parking
        drm/i915/vma: Fix UAF on destroy against retire race
        drm/i915: Do not print 'pxp init failed with 0' when it succeed
        drm/i915: Do not match JSL in ehl_combo_pll_div_frac_wa_needed()
        drm/i915/hwmon: Fix locking inversion in sysfs getter
        drm/i915/dsb: Fix DSB vblank waits when using VRR
        drm/i915/vrr: Generate VRR "safe window" for DSB
        drm/i915/display/debugfs: Fix duplicate checks in i915_drrs_status
        drm/i915/drrs: Refactor CPU transcoder DRRS check
        drm/i915/mtl: Update workaround 14018575942
        drm/i915/dsi: Go back to the previous INIT_OTP/DISPLAY_ON order, mostly
        drm/i915/display: Disable AuxCCS framebuffers if built for Xe
        drm/i915: Stop doing double audio enable/disable on SDVO and g4x+ DP
        drm/i915: Add includes for BUG_ON/BUILD_BUG_ON in i915_memcpy.c
        drm/qxl: remove unused variable from `qxl_process_single_command()`
        drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()`
        drm/i915: add bug.h include to i915_memcpy.c
        drm/vmwgfx: Create debugfs ttm_resource_manager entry only if needed
        ...
      486291a0
    • Linus Torvalds's avatar
      Merge tag 'linux_kselftest-fixes-6.9-rc2' of... · 1ab5c8a3
      Linus Torvalds authored
      Merge tag 'linux_kselftest-fixes-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fixes from Shuah Khan:
       "Fixes to seccomp and ftrace tests and a change to add config file for
        dmabuf-heap test to increase coverage"
      
      * tag 'linux_kselftest-fixes-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: dmabuf-heap: add config file for the test
        selftests/seccomp: Try to fit runtime of benchmark into timeout
        selftests/ftrace: Fix event filter target_func selection
      1ab5c8a3
    • Linus Torvalds's avatar
      Merge tag 'linux_kselftest-kunit-fixes-6.9-rc2' of... · a2ad5d9e
      Linus Torvalds authored
      Merge tag 'linux_kselftest-kunit-fixes-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull KUnit fixes from Shuah Khan:
       "One urgent fix for --alltests build failure related to renaming of
        CONFIG_DAMON_DBGFS to DAMON_DBGFS_DEPRECATED to the missing config
        option"
      
      * tag 'linux_kselftest-kunit-fixes-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        kunit: configs: Enable CONFIG_DAMON_DBGFS_DEPRECATED for --alltests
      a2ad5d9e
    • Muhammad Usama Anjum's avatar
      selftests: dmabuf-heap: add config file for the test · 224fe424
      Muhammad Usama Anjum authored
      The config fragment enlists all the config options needed for the test.
      This config is merged into the kernel's config on which this test is
      run.
      
      Fixed whitespace errors during commit:
      Shuah Khan <skhan@linuxfoundation.org>
      Reviewed-by: default avatarT.J. Mercier <tjmercier@google.com>
      Signed-off-by: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      224fe424
    • Mark Brown's avatar
      selftests/seccomp: Try to fit runtime of benchmark into timeout · 7155cc45
      Mark Brown authored
      The seccomp benchmark runs five scenarios, one calibration run with no
      seccomp filters enabled then four further runs each adding a filter. The
      calibration run times itself for 15s and then each additional run executes
      for the same number of times.
      
      Currently the seccomp tests, including the benchmark, run with an extended
      120s timeout but this is not sufficient to robustly run the tests on a lot
      of platforms. Sample timings from some recent runs:
      
         Platform          Run 1  Run 2  Run 3  Run 4
         ---------         -----  -----  -----  -----
         PowerEdge R200    16.6s  16.6s  31.6s  37.4s
         BBB (arm)         20.4s  20.4s  54.5s
         Synquacer (arm64) 20.7s  23.7s  40.3s
      
      The x86 runs from the PowerEdge are quite marginal and routinely fail, for
      the successful run reported here the timed portions of the run are at
      117.2s leaving less than 3s of margin which is frequently breached. The
      added overhead of adding filters on the other platforms is such that there
      is no prospect of their runs fitting into the 120s timeout, especially
      on 32 bit arm where there is no BPF JIT.
      
      While we could lower the time we calibrate for I'm also already seeing the
      currently completing runs reporting issues with the per filter overheads
      not matching expectations:
      
      Let's instead raise the timeout to 180s which is only a 50% increase on the
      current timeout which is itself not *too* large given that there's only two
      tests in this suite.
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      7155cc45
    • Mark Rutland's avatar
      selftests/ftrace: Fix event filter target_func selection · 8ecab2e6
      Mark Rutland authored
      The event filter function test has been failing in our internal test
      farm:
      
      | # not ok 33 event filter function - test event filtering on functions
      
      Running the test in verbose mode indicates that this is because the test
      erroneously determines that kmem_cache_free() is the most common caller
      of kmem_cache_free():
      
        # # + cut -d: -f3 trace
        # # + sed s/call_site=([^+]*)+0x.*/1/
        # # + sort
        # # + uniq -c
        # # + sort
        # # + tail -n 1
        # # + sed s/^[ 0-9]*//
        # # + target_func=kmem_cache_free
      
      ... and as kmem_cache_free() doesn't call itself, setting this as the
      filter function for kmem_cache_free() results in no hits, and
      consequently the test fails:
      
        # # + grep kmem_cache_free trace
        # # + grep kmem_cache_free
        # # + wc -l
        # # + hitcnt=0
        # # + grep kmem_cache_free trace
        # # + grep -v kmem_cache_free
        # # + wc -l
        # # + misscnt=0
        # # + [ 0 -eq 0 ]
        # # + exit_fail
      
      This seems to be because the system in question has tasks with ':' in
      their name (which a number of kernel worker threads have). These show up
      in the trace, e.g.
      
        test:.sh-1299    [004] .....  2886.040608: kmem_cache_free: call_site=putname+0xa4/0xc8 ptr=000000000f4d22f4 name=names_cache
      
      ... and so when we try to extact the call_site with:
      
        cut -d: -f3 trace | sed 's/call_site=\([^+]*\)+0x.*/\1/'
      
      ... the 'cut' command will extrace the column containing
      'kmem_cache_free' rather than the column containing 'call_site=...', and
      the 'sed' command will leave this unchanged. Consequently, the test will
      decide to use 'kmem_cache_free' as the filter function, resulting in the
      failure seen above.
      
      Fix this by matching the 'call_site=<func>' part specifically to extract
      the function name.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Reported-by: default avatarAishwarya TCV <aishwarya.tcv@arm.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-kselftest@vger.kernel.org
      Cc: linux-trace-kernel@vger.kernel.org
      Acked-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      8ecab2e6
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2024-03-28' of... · b01f596a
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2024-03-28' of https://anongit.freedesktop.org/git/drm/drm-intel into drm-fixes
      
      Core/GT Fixes:
      - Fix for BUG_ON/BUILD_BUG_ON IN I915_memcpy.c (Joonas)
      - Update a MTL workaround (Tejas)
      - Fix locking inversion in hwmon's sysfs (Janusz)
      - Remove a bogus error message around PXP (Jose)
      - Fix UAF on VMA (Janusz)
      - Reset queue_priority_hint on parking (Chris)
      
      Display Fixes:
      - Remove duplicated audio enable/disable on SDVO and DP (Ville)
      - Disable AuxCCS for Xe driver (Juha-Pekka)
      - Revert init order of MIPI DSI (Ville)
      - DRRS debugfs fix with an extra refactor patch (Bhanuprakash)
      - VRR related fixes (Ville)
      - Fix a JSL eDP corruption (Jonathon)
      - Fix the cursor physical dma address (Ville)
      - BIOS VBT related fix (Ville)
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/ZgYaIVgjIs30mIvS@intel.com
      b01f596a
    • Borislav Petkov (AMD)'s avatar
      x86/bugs: Fix the SRSO mitigation on Zen3/4 · 4535e1a4
      Borislav Petkov (AMD) authored
      The original version of the mitigation would patch in the calls to the
      untraining routines directly.  That is, the alternative() in UNTRAIN_RET
      will patch in the CALL to srso_alias_untrain_ret() directly.
      
      However, even if commit e7c25c44 ("x86/cpu: Cleanup the untrain
      mess") meant well in trying to clean up the situation, due to micro-
      architectural reasons, the untraining routine srso_alias_untrain_ret()
      must be the target of a CALL instruction and not of a JMP instruction as
      it is done now.
      
      Reshuffle the alternative macros to accomplish that.
      
      Fixes: e7c25c44 ("x86/cpu: Cleanup the untrain mess")
      Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
      Reviewed-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4535e1a4
    • Linus Torvalds's avatar
      Merge tag '6.9-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 091619ba
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
      
       - Add missing trace point (noticed when debugging the recent mknod LSM
         regression)
      
       - fscache fix
      
      * tag '6.9-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: Fix duplicate fscache cookie warnings
        smb3: add trace event for mknod
      091619ba
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 3a3c0de6
      Linus Torvalds authored
      Pull thermal control fixes from Rafael Wysocki:
       "These revert a problematic optimization commit and address a devfreq
        cooling device issue.
      
        Specifics:
      
         - Revert thermal core optimization that introduced a functional issue
           causing a critical trip point to be crossed in some cases (Daniel
           Lezcano)
      
         - Add missing conversion between different state ranges to the
           devfreq cooling device driver (Ye Zhang)"
      
      * tag 'thermal-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal: devfreq_cooling: Fix perf state when calculate dfc res_util
        Revert "thermal: core: Don't update trip points inside the hysteresis range"
      3a3c0de6
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · ab317b32
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These fix two issues that may lead to attempts to use memory that has
        been freed already.
      
        Specifics:
      
         - Drop __exit annotation from einj_remove() in the ACPI APEI code
           because this function can be called during runtime (Arnd Bergmann)
      
         - Make acpi_db_walk_for_fields() check acpi_evaluate_object() return
           value to avoid accessing memory that has been freed (Nikita
           Kiryushin)"
      
      * tag 'acpi-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPICA: debugger: check status of acpi_evaluate_object() in acpi_db_walk_for_fields()
        ACPI: APEI: EINJ: mark remove callback as non-__exit
      ab317b32
    • Linus Torvalds's avatar
      mm: clean up populate_vma_page_range() FOLL_* flag handling · 1096bc93
      Linus Torvalds authored
      The code wasn't exactly wrong, but it was very odd, and it used
      FOLL_FORCE together with FOLL_WRITE when it really didn't need to (it
      only set FOLL_WRITE for writable mappings, so then the FOLL_FORCE was
      pointless).
      
      It also pointlessly called __get_user_pages() even when it knew it
      wouldn't populate anything because the vma wasn't accessible and it
      explicitly tested for and did *not* set FOLL_FORCE for inaccessible
      vma's.
      
      This code does need to use FOLL_FORCE, because we want to do fault in
      writable shared mappings, but then the mapping may not actually be
      readable.  And we don't want to use FOLL_WRITE (which would match the
      permission of the vma), because that would also dirty the pages, which
      we don't want to do.
      
      For very similar reasons, FOLL_FORCE populates a executable-only mapping
      with no read permissions. We don't have a FOLL_EXEC flag.
      
      Yes, it would probably be cleaner to split FOLL_WRITE into two bits (for
      separate permission and dirty bit handling), and add a FOLL_EXEC flag
      for the "GUP executable page" case.  That would allow us to avoid
      FOLL_FORCE entirely here.
      
      But that's not how our FOLL_xyz bits have traditionally worked, and that
      would be a much bigger patch.
      
      So this at least avoids the FOLL_FORCE | FOLL_WRITE combination that
      made one of my experimental validation patches trigger a warning.  That
      warning was a false positive (and my experimental patch was incomplete
      anyway), but it all made me look at this and decide to clean at least
      this small case up.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1096bc93
    • Rafael J. Wysocki's avatar
      Merge branch 'acpica' · 6af71633
      Rafael J. Wysocki authored
      * acpica:
        ACPICA: debugger: check status of acpi_evaluate_object() in acpi_db_walk_for_fields()
      6af71633