1. 12 Jul, 2022 9 commits
  2. 11 Jul, 2022 5 commits
    • Greg Kroah-Hartman's avatar
      Merge tag 'coresight-next-v5.20' of... · 7e724422
      Greg Kroah-Hartman authored
      Merge tag 'coresight-next-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next
      
      Suzuki writes:
      
      CoreSight self-hosted tracing changes for v5.20.
      
       - Fixes LOCKDEP warnings on module unload with configfs
       - Conversion of DT bindings to DT schema
       - Branch broadcast support for perf cs_etm
       - Etm4x driver fixes for build failures with Clang and unrolled loops
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      
      * tag 'coresight-next-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux:
        coresight: etm4x: avoid build failure with unrolled loops
        Documentation: coresight: Expand branch broadcast documentation
        Documentation: coresight: Link config options to existing documentation
        Documentation: coresight: Turn numbered subsections into real subsections
        coresight: Add config flag to enable branch broadcast
        Documentation: coresight: Escape coresight bindings file wildcard
        dt-bindings: arm: Convert CoreSight CPU debug to DT schema
        dt-bindings: arm: Convert CoreSight bindings to DT schema
        dt-bindings: arm: Rename Coresight filenames to match compatible
        coresight: syscfg: Update load and unload operations
        coresight: configfs: Fix unload of configurations on module exit
        coresight: Clear the connection field properly
      7e724422
    • Greg Kroah-Hartman's avatar
      Merge tag 'fpga-late-for-5.20-rc1' of... · 4682f213
      Greg Kroah-Hartman authored
      Merge tag 'fpga-late-for-5.20-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next
      
      Xu writes:
      
      Here is the second set of FPGA changes for 5.20-rc1
      
      FPGA Manager core:
      - Ivan's change to support image offset and data size setting for
      reprograming. A parse_header() callback is introduced for drivers to
      specify these info.
      - Colin's immediate spelling fix for Ivan's patch.
      
      Microchip:
      - Ivan's change to add Microchip MPF FPGA manager driver. And MAINTAINERS
      entry added for the driver.
      
      All patches have been reviewed on the mailing list, and have been in the
      last linux-next releases (as part of our for-next branch).
      Signed-off-by: default avatarXu Yilun <yilun.xu@intel.com>
      
      * tag 'fpga-late-for-5.20-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga:
        fpga: fpga-mgr: Fix spelling mistake "bitsream" -> "bitstream"
        MAINTAINERS: add Microchip PolarFire FPGA drivers entry
        dt-bindings: fpga: add binding doc for microchip-spi fpga mgr
        fpga: microchip-spi: add Microchip MPF FPGA manager
        docs: fpga: mgr: document parse_header() callback
        fpga: fpga-mgr: support bitstream offset in image buffer
      4682f213
    • Greg Kroah-Hartman's avatar
      Merge tag 'mhi-for-v5.20' of... · f5fd903b
      Greg Kroah-Hartman authored
      Merge tag 'mhi-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next
      
      Manivannan writes:
      
      MHI Host
      --------
      
      Support for new modems:
      
       - Quectel EM120 FCCL based on SDX24. This product MHI configuration is same
         as EM120R-GL modem.
       - Foxconn Cinterion MV31-W. This product is same as the existing MV31-W
         modem but sold as a separate product as it uses a different firmware
         baseline.
       - Foxconn T99W175 based on SDX55.
      
      Core changes:
      
       - Moved the IRQ allocation to MHI controller registration phase. Since the
         MHI endpoint may be powered up/down several times during runtime, it
         makes sense to move the IRQ allocation to registration phase and just
         enable/disable IRQs during endpoint power up/down.
      
      MHI endpoint
      ------------
      
      Core changes:
      
       - Added error check for dev_set_name()
      
      * tag 'mhi-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi:
        bus: mhi: ep: Check dev_set_name() return value
        bus: mhi: host: pci_generic: Add another Foxconn T99W175
        bus: mhi: host: Move IRQ allocation to controller registration phase
        bus: mhi: host: pci_generic: Add Cinterion MV31-W with new baseline
        bus: mhi: host: pci_generic: Add support for Quectel EM120 FCCL modem
      f5fd903b
    • Nick Desaulniers's avatar
      coresight: etm4x: avoid build failure with unrolled loops · 4d45bc82
      Nick Desaulniers authored
      When the following configs are enabled:
      * CORESIGHT
      * CORESIGHT_SOURCE_ETM4X
      * UBSAN
      * UBSAN_TRAP
      
      Clang fails assemble the kernel with the error:
      <instantiation>:1:7: error: expected constant expression in '.inst' directive
      .inst (0xd5200000|((((2) << 19) | ((1) << 16) | (((((((((((0x160 + (i * 4))))) >> 2))) >> 7) & 0x7)) << 12) | ((((((((((0x160 + (i * 4))))) >> 2))) & 0xf)) << 8) | (((((((((((0x160 + (i * 4))))) >> 2))) >> 4) & 0x7)) << 5)))|(.L__reg_num_x8))
            ^
      drivers/hwtracing/coresight/coresight-etm4x-core.c:702:4: note: while in
      macro instantiation
      etm4x_relaxed_read32(csa, TRCCNTVRn(i));
      ^
      drivers/hwtracing/coresight/coresight-etm4x.h:403:4: note: expanded from
      macro 'etm4x_relaxed_read32'
      read_etm4x_sysreg_offset((offset), false)))
      ^
      drivers/hwtracing/coresight/coresight-etm4x.h:383:12: note: expanded
      from macro 'read_etm4x_sysreg_offset'
      __val = read_etm4x_sysreg_const_offset((offset));       \
              ^
      drivers/hwtracing/coresight/coresight-etm4x.h:149:2: note: expanded from
      macro 'read_etm4x_sysreg_const_offset'
      READ_ETM4x_REG(ETM4x_OFFSET_TO_REG(offset))
      ^
      drivers/hwtracing/coresight/coresight-etm4x.h:144:2: note: expanded from
      macro 'READ_ETM4x_REG'
      read_sysreg_s(ETM4x_REG_NUM_TO_SYSREG((reg)))
      ^
      arch/arm64/include/asm/sysreg.h:1108:15: note: expanded from macro
      'read_sysreg_s'
      asm volatile(__mrs_s("%0", r) : "=r" (__val));                  \
                   ^
      arch/arm64/include/asm/sysreg.h:1074:2: note: expanded from macro '__mrs_s'
      "       mrs_s " v ", " __stringify(r) "\n"                      \
       ^
      
      Consider the definitions of TRCSSCSRn and TRCCNTVRn:
      drivers/hwtracing/coresight/coresight-etm4x.h:56
       #define TRCCNTVRn(n)      (0x160 + (n * 4))
      drivers/hwtracing/coresight/coresight-etm4x.h:81
       #define TRCSSCSRn(n)      (0x2A0 + (n * 4))
      
      Where the macro parameter is expanded to i; a loop induction variable
      from etm4_disable_hw.
      
      When any compiler can determine that loops may be unrolled, then the
      __builtin_constant_p check in read_etm4x_sysreg_offset() defined in
      drivers/hwtracing/coresight/coresight-etm4x.h may evaluate to true. This
      can lead to the expression `(0x160 + (i * 4))` being passed to
      read_etm4x_sysreg_const_offset. Via the trace above, this is passed
      through READ_ETM4x_REG, read_sysreg_s, and finally to __mrs_s where it
      is string-ified and used directly in inline asm.
      
      Regardless of which compiler or compiler options determine whether a
      loop can or can't be unrolled, which determines whether
      __builtin_constant_p evaluates to true when passed an expression using a
      loop induction variable, it is NEVER safe to allow the preprocessor to
      construct inline asm like:
        asm volatile (".inst (0x160 + (i * 4))" : "=r"(__val));
                                       ^ expected constant expression
      
      Instead of read_etm4x_sysreg_offset() using __builtin_constant_p(), use
      __is_constexpr from include/linux/const.h instead to ensure only
      expressions that are valid integer constant expressions get passed
      through to read_sysreg_s().
      
      This is not a bug in clang; it's a potentially unsafe use of the macro
      arguments in read_etm4x_sysreg_offset dependent on __builtin_constant_p.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/1310Reported-by: default avatarArnd Bergmann <arnd@kernel.org>
      Reported-by: default avatarTao Zhang <quic_taozha@quicinc.com>
      Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20220708231520.3958391-1-ndesaulniers@google.com
      4d45bc82
    • Greg Kroah-Hartman's avatar
      Merge 5.19-rc6 into char-misc-next · 14facbc1
      Greg Kroah-Hartman authored
      We need the misc driver fixes in here as well.
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      14facbc1
  3. 10 Jul, 2022 12 commits
    • Linus Torvalds's avatar
      Linux 5.19-rc6 · 32346491
      Linus Torvalds authored
      32346491
    • Linus Torvalds's avatar
      Merge branch 'hot-fixes' (fixes for rc6) · 24f4b40e
      Linus Torvalds authored
      This is a collection of three fixes for small annoyances.
      
      Two of these are already pending in other trees, but I really don't want
      to release another -rc with these issues pending, so I picked up the
      patches for these things directly.  We'll end up with duplicate commits
      eventually, I prefer that over having these issues pending.
      
      The third one is just me getting rid of another BUG_ON() just because it
      was reported and I dislike those things so much.
      
      * merge 'hot-fixes' branch:
        ida: don't use BUG_ON() for debugging
        drm/aperture: Run fbdev removal before internal helpers
        ptrace: fix clearing of JOBCTL_TRACED in ptrace_unfreeze_traced()
      24f4b40e
    • Linus Torvalds's avatar
      ida: don't use BUG_ON() for debugging · fc82bbf4
      Linus Torvalds authored
      This is another old BUG_ON() that just shouldn't exist (see also commit
      a382f8fe: "signal handling: don't use BUG_ON() for debugging").
      
      In fact, as Matthew Wilcox points out, this condition shouldn't really
      even result in a warning, since a negative id allocation result is just
      a normal allocation failure:
      
        "I wonder if we should even warn here -- sure, the caller is trying to
         free something that wasn't allocated, but we don't warn for
         kfree(NULL)"
      
      and goes on to point out how that current error check is only causing
      people to unnecessarily do their own index range checking before freeing
      it.
      
      This was noted by Itay Iellin, because the bluetooth HCI socket cookie
      code does *not* do that range checking, and ends up just freeing the
      error case too, triggering the BUG_ON().
      
      The HCI code requires CAP_NET_RAW, and seems to just result in an ugly
      splat, but there really is no reason to BUG_ON() here, and we have
      generally striven for allocation models where it's always ok to just do
      
          free(alloc());
      
      even if the allocation were to fail for some random reason (usually
      obviously that "random" reason being some resource limit).
      
      Fixes: 88eca020 ("ida: simplified functions for id allocation")
      Reported-by: default avatarItay Iellin <ieitayie@gmail.com>
      Suggested-by: default avatarMatthew Wilcox <willy@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fc82bbf4
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine · 952c53cd
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
       "One core fix for DMA_INTERRUPT and rest driver fixes.
      
        Core:
      
         - Revert verification of DMA_INTERRUPT capability as that was
           incorrect
      
        Bunch of driver fixes for:
      
         - ti: refcount and put_device leak
      
         - qcom_bam: runtime pm overflow
      
         - idxd: force wq context cleanup and call idxd_enable_system_pasid()
           on success
      
         - dw-axi-dmac: RMW on channel suspend register
      
         - imx-sdma: restart cyclic channel when enabled
      
         - at_xdma: error handling for at_xdmac_alloc_desc
      
         - pl330: lockdep warning
      
         - lgm: error handling path in probe
      
         - allwinner: Fix min/max typo in binding"
      
      * tag 'dmaengine-fix-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
        dt-bindings: dma: allwinner,sun50i-a64-dma: Fix min/max typo
        dmaengine: lgm: Fix an error handling path in intel_ldma_probe()
        dmaengine: pl330: Fix lockdep warning about non-static key
        dmaengine: idxd: Only call idxd_enable_system_pasid() if succeeded in enabling SVA feature
        dmaengine: at_xdma: handle errors of at_xdmac_alloc_desc() correctly
        dmaengine: imx-sdma: only restart cyclic channel when enabled
        dmaengine: dw-axi-dmac: Fix RMW on channel suspend register
        dmaengine: idxd: force wq context cleanup on device disable path
        dmaengine: qcom: bam_dma: fix runtime PM underflow
        dmaengine: imx-sdma: Allow imx8m for imx7 FW revs
        dmaengine: Revert "dmaengine: add verification of DMA_INTERRUPT capability for dmatest"
        dmaengine: ti: Add missing put_device in ti_dra7_xbar_route_allocate
        dmaengine: ti: Fix refcount leak in ti_dra7_xbar_route_allocate
      952c53cd
    • Linus Torvalds's avatar
      Merge tag 'staging-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 5867f3b8
      Linus Torvalds authored
      Pull staging driver fix from Greg KH:
       "Here is a single staging driver fix for a reported problem that showed
        up in 5.19-rc1 in the wlan-ng driver. It has been in linux-next for a
        week with no reported problems"
      
      * tag 'staging-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging/wlan-ng: get the correct struct hfa384x in work callback
      5867f3b8
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · b41362fd
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are four small char/misc driver fixes for 5.19-rc6 to resolve
        some reported issues. They only affect two drivers:
      
         - rtsx_usb: fix for of-reported DMA warning error, the driver was
           handling memory buffers in odd ways, it has now been fixed up to be
           much simpler and correct by Shuah.
      
         - at25 eeprom driver bugfix for reported problem
      
        All of these have been in linux-next for a week with no reported
        problems"
      
      * tag 'char-misc-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        misc: rtsx_usb: set return value in rsp_buf alloc err path
        misc: rtsx_usb: use separate command and response buffers
        misc: rtsx_usb: fix use of dma mapped buffer for usb bulk transfer
        eeprom: at25: Rework buggy read splitting
      b41362fd
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.19-2022-07-09' of git://git.kernel.dk/linux-block · d9919d43
      Linus Torvalds authored
      Pull io_uring fix from Jens Axboe:
       "A single fix for an issue that came up yesterday that we should plug
        for -rc6.
      
        This is a regression introduced in this cycle"
      
      * tag 'io_uring-5.19-2022-07-09' of git://git.kernel.dk/linux-block:
        io_uring: check that we have a file table when allocating update slots
      d9919d43
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.19-3' of... · 2fbd36df
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Adjust gen_compile_commands.py to the format change of *.mod files
      
       - Remove unused macro in scripts/Makefile.modinst
      
      * tag 'kbuild-fixes-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: remove unused cmd_none in scripts/Makefile.modinst
        gen_compile_commands: handle multiple lines per .mod file
      2fbd36df
    • Linus Torvalds's avatar
      Merge tag 'irq_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2b9b31ce
      Linus Torvalds authored
      Pull irq fixes from Borislav Petkov:
      
       - Gracefully handle failure to request MMIO resources in the GICv3
         driver
      
       - Make a static key static in the Apple AIC driver
      
       - Fix the Xilinx intc driver dependency on OF_ADDRESS
      
      * tag 'irq_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/apple-aic: Make symbol 'use_fast_ipi' static
        irqchip/xilinx: Add explicit dependency on OF_ADDRESS
        irqchip/gicv3: Handle resource request failure consistently
      2b9b31ce
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 74a0032b
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Prepare for and clear .brk early in order to address XenPV guests
         failures where the hypervisor verifies page tables and uninitialized
         data in that range leads to bogus failures in those checks
      
       - Add any potential setup_data entries supplied at boot to the identity
         pagetable mappings to prevent kexec kernel boot failures. Usually,
         this is not a problem for the normal kernel as those mappings are
         part of the initially mapped 2M pages but if kexec gets to allocate
         the second kernel somewhere else, those setup_data entries need to be
         mapped there too.
      
       - Fix objtool not to discard text references from the __tracepoints
         section so that ENDBR validation still works
      
       - Correct the setup_data types limit as it is user-visible, before 5.19
         releases
      
      * tag 'x86_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot: Fix the setup data types max limit
        x86/ibt, objtool: Don't discard text references from tracepoint section
        x86/compressed/64: Add identity mappings for setup_data entries
        x86: Fix .brk attribute in linker script
        x86: Clear .brk area at early boot
        x86/xen: Use clear_bss() for Xen PV guests
      74a0032b
    • Masahiro Yamada's avatar
      kbuild: remove unused cmd_none in scripts/Makefile.modinst · f5a46185
      Masahiro Yamada authored
      Commit 65ce9c38 ("kbuild: move module strip/compression code into
      scripts/Makefile.modinst") added this unused code.
      
      Perhaps, I thought cmd_none was useful for CONFIG_MODULE_COMPRESS_NONE,
      but I did not use it after all.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      f5a46185
    • Borislav Petkov's avatar
      x86/boot: Fix the setup data types max limit · cb8a4bea
      Borislav Petkov authored
      Commit in Fixes forgot to change the SETUP_TYPE_MAX definition which
      contains the highest valid setup data type.
      
      Correct that.
      
      Fixes: 5ea98e01 ("x86/boot: Add Confidential Computing type to setup_data")
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Link: https://lore.kernel.org/r/ddba81dd-cc92-699c-5274-785396a17fb5@zytor.com
      cb8a4bea
  4. 09 Jul, 2022 6 commits
  5. 08 Jul, 2022 8 commits