1. 08 Apr, 2022 15 commits
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · c0aa5338
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "The two main things to note are:
      
         (1) The bulk of the diffstat is us reverting a horrible bodge we had
             in place to ease the merging of maple tree during the merge
             window (which turned out not to be needed, but anyway)
      
         (2) The TLB invalidation fix is done in core code, as suggested by
             (and Acked-by) Peter.
      
        Summary:
      
         - Revert temporary bodge in MTE coredumping to ease maple tree integration
      
         - Fix stack frame size warning reported with 64k pages
      
         - Fix stop_machine() race with instruction text patching
      
         - Ensure alternatives patching routines are not instrumented
      
         - Enable Spectre-BHB mitigation for Cortex-A78AE
      
         - Fix hugetlb TLB invalidation when contiguous hint is used
      
         - Minor perf driver fixes
      
         - Fix some typos"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        perf/imx_ddr: Fix undefined behavior due to shift overflowing the constant
        arm64: Add part number for Arm Cortex-A78AE
        arm64: patch_text: Fixup last cpu should be master
        tlb: hugetlb: Add more sizes to tlb_remove_huge_tlb_entry
        arm64: alternatives: mark patch_alternative() as `noinstr`
        perf: MARVELL_CN10K_DDR_PMU should depend on ARCH_THUNDER
        perf: qcom_l2_pmu: fix an incorrect NULL check on list iterator
        arm64: Fix comments in macro __init_el2_gicv3
        arm64: fix typos in comments
        arch/arm64: Fix topology initialization for core scheduling
        arm64: mte: Fix the stack frame size warning in mte_dump_tag_range()
        Revert "arm64: Change elfcore for_each_mte_vma() to use VMA iterator"
      c0aa5338
    • Linus Torvalds's avatar
      Merge tag 'folio-5.18e' of git://git.infradead.org/users/willy/pagecache · d66b6985
      Linus Torvalds authored
      Pull folio fixes from Matthew Wilcox:
       "Fewer bug reports than I was expecting from enabling large folios.
      
        One that doesn't show up on x86 but does on arm64, one that shows up
        with hugetlbfs memory failure testing and one that shows up with page
        migration, which it turns out I wasn't testing because my last NUMA
        machine died. Need to set up a qemu fake NUMA machine so I don't skip
        testing that in future.
      
        Summary:
      
         - Remove the migration code's assumptions about large pages being PMD
           sized
      
         - Don't call pmd_page() on a non-leaf PMD
      
         - Fix handling of hugetlbfs pages in page_vma_mapped_walk"
      
      * tag 'folio-5.18e' of git://git.infradead.org/users/willy/pagecache:
        mm/rmap: Fix handling of hugetlbfs pages in page_vma_mapped_walk
        mm/mempolicy: Use vma_alloc_folio() in new_page()
        mm: Add vma_alloc_folio()
        mm/migrate: Use a folio in migrate_misplaced_transhuge_page()
        mm/migrate: Use a folio in alloc_migration_target()
        mm/huge_memory: Avoid calling pmd_page() on a non-leaf PMD
      d66b6985
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · d00c50b3
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A small collection of fixes that have arrived since the merge window,
        the most noticable one is a fix for unmapping messages when the
        mapping was done with the struct device supplied to do the mapping
        overridden"
      
      * tag 'spi-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: bcm-qspi: fix MSPI only access with bcm_qspi_exec_mem_op()
        spi: cadence-quadspi: fix protocol setup for non-1-1-X operations
        spi: core: add dma_map_dev for __spi_unmap_msg()
        spi: mxic: Fix an error handling path in mxic_spi_probe()
        spi: rpc-if: Fix RPM imbalance in probe error path
      d00c50b3
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v5.18-rc1' of... · 98849765
      Linus Torvalds authored
      Merge tag 'regulator-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fixes from Mark Brown:
       "A few small driver specific fixes for v5.18, plus an update to the
        MAINTAINERS file"
      
      * tag 'regulator-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        MAINTAINERS: Fix reviewer info for a few ROHM ICs
        regulator: atc260x: Fix missing active_discharge_on setting
        regulator: rtq2134: Fix missing active_discharge_on setting
        regulator: wm8994: Add an off-on delay for WM8994 variant
      98849765
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 0ccab014
      Linus Torvalds authored
      Pull MMC updates from Ulf Hansson:
       "MMC core:
         - Improve API to make it clear that mmc_hw_reset() is for cards
         - Fixup support for writeback-cache for eMMC and SD
         - Check for errors after writes on SPI
      
        MMC host:
         - renesas_sdhi: A couple of fixes of TAP settings for eMMC HS400 mode
         - mmci_stm32: Fixup check of all elements in sg list
         - sdhci-xenon: Revert unnecessary fix for annoying 1.8V regulator warning"
      
      * tag 'mmc-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: core: improve API to make clear mmc_hw_reset is for cards
        mmc: renesas_sdhi: don't overwrite TAP settings when HS400 tuning is complete
        mmc: renesas_sdhi: special 4tap settings only apply to HS400
        mmc: core: Fixup support for writeback-cache for eMMC and SD
        mmc: block: Check for errors after write on SPI
        mmc: mmci: stm32: correctly check all elements of sg list
        Revert "mmc: sdhci-xenon: fix annoying 1.8V regulator warning"
      0ccab014
    • Linus Torvalds's avatar
      Merge tag 'iommu-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 02994fd2
      Linus Torvalds authored
      Pull iommu fix from Joerg Roedel:
      
       - Fix boot regression due to a NULL-ptr dereference on OMAP machines
      
      * tag 'iommu-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/omap: Fix regression in probe for NULL pointer dereference
      02994fd2
    • Borislav Petkov's avatar
      perf/imx_ddr: Fix undefined behavior due to shift overflowing the constant · d02b4dd8
      Borislav Petkov authored
      Fix:
      
        In file included from <command-line>:0:0:
        In function ‘ddr_perf_counter_enable’,
            inlined from ‘ddr_perf_irq_handler’ at drivers/perf/fsl_imx8_ddr_perf.c:651:2:
        ././include/linux/compiler_types.h:352:38: error: call to ‘__compiletime_assert_729’ \
      	declared with attribute error: FIELD_PREP: mask is not constant
          _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
      ...
      
      See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory
      details as to why it triggers with older gccs only.
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Frank Li <Frank.li@nxp.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: NXP Linux Team <linux-imx@nxp.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Acked-by: default avatarWill Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20220405151517.29753-10-bp@alien8.deSigned-off-by: default avatarWill Deacon <will@kernel.org>
      d02b4dd8
    • Matti Vaittinen's avatar
      MAINTAINERS: Fix reviewer info for a few ROHM ICs · 908b768f
      Matti Vaittinen authored
      The email backend used by ROHM keeps labeling patches as spam.
      Additionally, there have been reports of some emails been completely
      dropped. Finally also the email list (or shared inbox)
      linux-power@fi.rohmeurope.com inadvertly stopped working and has not
      been reviwed during the past few weeks.
      
      Remove no longer working list 'linux-power' list-entry and switch my
      email to use the personal gmail account instead of the company account.
      Signed-off-by: default avatarMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
      Link: https://lore.kernel.org/r/Yk/zAHusOdf4+h06@dc73szyh141qn5ck3nwqy-3.rev.dnainternet.fiSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      908b768f
    • Chanho Park's avatar
      arm64: Add part number for Arm Cortex-A78AE · 83bea32a
      Chanho Park authored
      Add the MIDR part number info for the Arm Cortex-A78AE[1] and add it to
      spectre-BHB affected list[2].
      
      [1]: https://developer.arm.com/Processors/Cortex-A78AE
      [2]: https://developer.arm.com/Arm%20Security%20Center/Spectre-BHB
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: James Morse <james.morse@arm.com>
      Signed-off-by: default avatarChanho Park <chanho61.park@samsung.com>
      Link: https://lore.kernel.org/r/20220407091128.8700-1-chanho61.park@samsung.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
      83bea32a
    • Guo Ren's avatar
      arm64: patch_text: Fixup last cpu should be master · 31a099db
      Guo Ren authored
      These patch_text implementations are using stop_machine_cpuslocked
      infrastructure with atomic cpu_count. The original idea: When the
      master CPU patch_text, the others should wait for it. But current
      implementation is using the first CPU as master, which couldn't
      guarantee the remaining CPUs are waiting. This patch changes the
      last CPU as the master to solve the potential risk.
      
      Fixes: ae164807 ("arm64: introduce interfaces to hotpatch kernel and module code")
      Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
      Signed-off-by: default avatarGuo Ren <guoren@kernel.org>
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20220407073323.743224-2-guoren@kernel.orgSigned-off-by: default avatarWill Deacon <will@kernel.org>
      31a099db
    • Tony Lindgren's avatar
      iommu/omap: Fix regression in probe for NULL pointer dereference · 71ff461c
      Tony Lindgren authored
      Commit 3f6634d9 ("iommu: Use right way to retrieve iommu_ops") started
      triggering a NULL pointer dereference for some omap variants:
      
      __iommu_probe_device from probe_iommu_group+0x2c/0x38
      probe_iommu_group from bus_for_each_dev+0x74/0xbc
      bus_for_each_dev from bus_iommu_probe+0x34/0x2e8
      bus_iommu_probe from bus_set_iommu+0x80/0xc8
      bus_set_iommu from omap_iommu_init+0x88/0xcc
      omap_iommu_init from do_one_initcall+0x44/0x24
      
      This is caused by omap iommu probe returning 0 instead of ERR_PTR(-ENODEV)
      as noted by Jason Gunthorpe <jgg@ziepe.ca>.
      
      Looks like the regression already happened with an earlier commit
      6785eb91 ("iommu/omap: Convert to probe/release_device() call-backs")
      that changed the function return type and missed converting one place.
      
      Cc: Drew Fustini <dfustini@baylibre.com>
      Cc: Lu Baolu <baolu.lu@linux.intel.com>
      Cc: Suman Anna <s-anna@ti.com>
      Suggested-by: default avatarJason Gunthorpe <jgg@ziepe.ca>
      Fixes: 6785eb91 ("iommu/omap: Convert to probe/release_device() call-backs")
      Fixes: 3f6634d9 ("iommu: Use right way to retrieve iommu_ops")
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      Tested-by: default avatarDrew Fustini <dfustini@baylibre.com>
      Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      Link: https://lore.kernel.org/r/20220331062301.24269-1-tony@atomide.comSigned-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      71ff461c
    • Wolfram Sang's avatar
      mmc: core: improve API to make clear mmc_hw_reset is for cards · b71597ed
      Wolfram Sang authored
      To make it unambiguous that mmc_hw_reset() is for cards and not for
      controllers, we make the function argument mmc_card instead of mmc_host.
      Also, all users are converted.
      Suggested-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
      Acked-by: default avatarKalle Valo <kvalo@kernel.org>
      Link: https://lore.kernel.org/r/20220408080045.6497-2-wsa+renesas@sang-engineering.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      b71597ed
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-04-08' of git://anongit.freedesktop.org/drm/drm · 1831fed5
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Main set of fixes for rc2, mostly amdgpu, but some dma-fence fixups as
        well, along with some other misc ones.
      
        dma-fence:
         - fix warning about fence containers
         - fix logic error in new fence merge code
         - handle empty dma_fence_arrays gracefully
      
        bridge:
         - Try all possible cases for bridge/panel detection.
      
        bindings:
         - Don't require input port for MIPI-DSI, and make width/height mandatory.
      
        fbdev:
         - Fix unregistering of framebuffers without device.
      
        nouveau:
         - Fix a crash when booting with nouveau on tegra.
      
        amdgpu:
         - GFX 10.3.7 fixes
         - noretry updates
         - VCN fixes
         - TMDS fix
         - zstate fix for freesync video
         - DCN 3.1.5 fix
         - Display stack size fix
         - Audio fix
         - DCN 3.1 pstate fix
         - TMZ VCN fix
         - APU passthrough fix
         - Misc other fixes
         - VCN 3.0 fixes
         - Misc display fixes
         - GC 10.3 golden register fix
         - Suspend fix
         - SMU 10 fix
      
        amdkfd:
         - Error handling fix
         - xgmi p2p fix
         - HWS VMIDs fix
         - Event fix
      
        panel:
         - ili9341: Fix optional regulator handling
      
        imx:
         - Catch an EDID allocation failure in imx-ldb
         - fix a leaked drm display mode on DT parsing error in parallel-display
         - properly remove the dw_hdmi bridge in case the component_add fails in dw_hdmi-imx
         - fix the IPU clock frequency debug printout in ipu-di"
      
      * tag 'drm-fixes-2022-04-08' of git://anongit.freedesktop.org/drm/drm: (61 commits)
        dt-bindings: display: panel: mipi-dbi-spi: Make width-mm/height-mm mandatory
        fbdev: Fix unregistering of framebuffers without device
        drm/amdgpu/smu10: fix SoC/fclk units in auto mode
        drm/amd/display: update dcn315 clock table read
        drm/amdgpu/display: change pipe policy for DCN 2.1
        drm/amd/display: Add configuration options for AUX wake work around.
        drm/amd/display: remove assert for odm transition case
        drm/amdgpu: don't use BACO for reset in S3
        drm/amd/display: Fix by adding FPU protection for dcn30_internal_validate_bw
        drm/amdkfd: Create file descriptor after client is added to smi_clients list
        drm/amdgpu: Sync up header and implementation to use the same parameter names
        drm/amdgpu: fix incorrect GCR_GENERAL_CNTL address
        amd/display: set backlight only if required
        drm/amd/display: Fix allocate_mst_payload assert on resume
        drm/amd/display: Revert FEC check in validation
        drm/amd/display: Add work around for AUX failure on wake.
        drm/amd/display: Clear optc false state when disable otg
        drm/amd/display: Enable power gating before init_pipes
        drm/amd/display: Remove redundant dsc power gating from init_hw
        drm/amd/display: Correct Slice reset calculation
        ...
      1831fed5
    • Linus Torvalds's avatar
      Merge tag '5.18-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 5a5dcfd1
      Linus Torvalds authored
      Pull cifs client fixes from Steve French:
      
       - reconnect fixes: one for DFS and one to avoid a reconnect race
      
       - small change to deal with upcoming behavior change of list iterators
      
      * tag '5.18-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: update internal module number
        cifs: force new session setup and tcon for dfs
        cifs: remove check of list iterator against head past the loop body
        cifs: fix potential race with cifsd thread
      5a5dcfd1
    • Linus Torvalds's avatar
      Merge tag 'net-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 73b193f2
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from bpf and netfilter.
      
        Current release - new code bugs:
      
         - mctp: correct mctp_i2c_header_create result
      
         - eth: fungible: fix reference to __udivdi3 on 32b builds
      
         - eth: micrel: remove latencies support lan8814
      
        Previous releases - regressions:
      
         - bpf: resolve to prog->aux->dst_prog->type only for BPF_PROG_TYPE_EXT
      
         - vrf: fix packet sniffing for traffic originating from ip tunnels
      
         - rxrpc: fix a race in rxrpc_exit_net()
      
         - dsa: revert "net: dsa: stop updating master MTU from master.c"
      
         - eth: ice: fix MAC address setting
      
        Previous releases - always broken:
      
         - tls: fix slab-out-of-bounds bug in decrypt_internal
      
         - bpf: support dual-stack sockets in bpf_tcp_check_syncookie
      
         - xdp: fix coalescing for page_pool fragment recycling
      
         - ovs: fix leak of nested actions
      
         - eth: sfc:
            - add missing xdp queue reinitialization
            - fix using uninitialized xdp tx_queue
      
         - eth: ice:
            - clear default forwarding VSI during VSI release
            - fix broken IFF_ALLMULTI handling
            - synchronize_rcu() when terminating rings
      
         - eth: qede: confirm skb is allocated before using
      
         - eth: aqc111: fix out-of-bounds accesses in RX fixup
      
         - eth: slip: fix NPD bug in sl_tx_timeout()"
      
      * tag 'net-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (61 commits)
        drivers: net: slip: fix NPD bug in sl_tx_timeout()
        bpf: Adjust bpf_tcp_check_syncookie selftest to test dual-stack sockets
        bpf: Support dual-stack sockets in bpf_tcp_check_syncookie
        myri10ge: fix an incorrect free for skb in myri10ge_sw_tso
        net: usb: aqc111: Fix out-of-bounds accesses in RX fixup
        qede: confirm skb is allocated before using
        net: ipv6mr: fix unused variable warning with CONFIG_IPV6_PIMSM_V2=n
        net: phy: mscc-miim: reject clause 45 register accesses
        net: axiemac: use a phandle to reference pcs_phy
        dt-bindings: net: add pcs-handle attribute
        net: axienet: factor out phy_node in struct axienet_local
        net: axienet: setup mdio unconditionally
        net: sfc: fix using uninitialized xdp tx_queue
        rxrpc: fix a race in rxrpc_exit_net()
        net: openvswitch: fix leak of nested actions
        net: ethernet: mv643xx: Fix over zealous checking of_get_mac_address()
        net: openvswitch: don't send internal clone attribute to the userspace.
        net: micrel: Fix KS8851 Kconfig
        ice: clear cmd_type_offset_bsz for TX rings
        ice: xsk: fix VSI state check in ice_xsk_wakeup()
        ...
      73b193f2
  2. 07 Apr, 2022 19 commits
  3. 06 Apr, 2022 6 commits
    • Jason A. Donenfeld's avatar
      random: check for signals every PAGE_SIZE chunk of /dev/[u]random · e3c1c4fd
      Jason A. Donenfeld authored
      In 1448769c ("random: check for signal_pending() outside of
      need_resched() check"), Jann pointed out that we previously were only
      checking the TIF_NOTIFY_SIGNAL and TIF_SIGPENDING flags if the process
      had TIF_NEED_RESCHED set, which meant in practice, super long reads to
      /dev/[u]random would delay signal handling by a long time. I tried this
      using the below program, and indeed I wasn't able to interrupt a
      /dev/urandom read until after several megabytes had been read. The bug
      he fixed has always been there, and so code that reads from /dev/urandom
      without checking the return value of read() has mostly worked for a long
      time, for most sizes, not just for <= 256.
      
      Maybe it makes sense to keep that code working. The reason it was so
      small prior, ignoring the fact that it didn't work anyway, was likely
      because /dev/random used to block, and that could happen for pretty
      large lengths of time while entropy was gathered. But now, it's just a
      chacha20 call, which is extremely fast and is just operating on pure
      data, without having to wait for some external event. In that sense,
      /dev/[u]random is a lot more like /dev/zero.
      
      Taking a page out of /dev/zero's read_zero() function, it always returns
      at least one chunk, and then checks for signals after each chunk. Chunk
      sizes there are of length PAGE_SIZE. Let's just copy the same thing for
      /dev/[u]random, and check for signals and cond_resched() for every
      PAGE_SIZE amount of data. This makes the behavior more consistent with
      expectations, and should mitigate the impact of Jann's fix for the
      age-old signal check bug.
      
      ---- test program ----
      
        #include <unistd.h>
        #include <signal.h>
        #include <stdio.h>
        #include <sys/random.h>
      
        static unsigned char x[~0U];
      
        static void handle(int) { }
      
        int main(int argc, char *argv[])
        {
          pid_t pid = getpid(), child;
          signal(SIGUSR1, handle);
          if (!(child = fork())) {
            for (;;)
              kill(pid, SIGUSR1);
          }
          pause();
          printf("interrupted after reading %zd bytes\n", getrandom(x, sizeof(x), 0));
          kill(child, SIGTERM);
          return 0;
        }
      
      Cc: Jann Horn <jannh@google.com>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      e3c1c4fd
    • Thomas Zimmermann's avatar
      fbdev: Fix unregistering of framebuffers without device · 0f525289
      Thomas Zimmermann authored
      OF framebuffers do not have an underlying device in the Linux
      device hierarchy. Do a regular unregister call instead of hot
      unplugging such a non-existing device. Fixes a NULL dereference.
      An example error message on ppc64le is shown below.
      
        BUG: Kernel NULL pointer dereference on read at 0x00000060
        Faulting instruction address: 0xc00000000080dfa4
        Oops: Kernel access of bad area, sig: 11 [#1]
        LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
        [...]
        CPU: 2 PID: 139 Comm: systemd-udevd Not tainted 5.17.0-ae085d7f #1
        NIP:  c00000000080dfa4 LR: c00000000080df9c CTR: c000000000797430
        REGS: c000000004132fe0 TRAP: 0300   Not tainted  (5.17.0-ae085d7f)
        MSR:  8000000002009033 <SF,VEC,EE,ME,IR,DR,RI,LE>  CR: 28228282  XER: 20000000
        CFAR: c00000000000c80c DAR: 0000000000000060 DSISR: 40000000 IRQMASK: 0
        GPR00: c00000000080df9c c000000004133280 c00000000169d200 0000000000000029
        GPR04: 00000000ffffefff c000000004132f90 c000000004132f88 0000000000000000
        GPR08: c0000000015658f8 c0000000015cd200 c0000000014f57d0 0000000048228283
        GPR12: 0000000000000000 c00000003fffe300 0000000020000000 0000000000000000
        GPR16: 0000000000000000 0000000113fc4a40 0000000000000005 0000000113fcfb80
        GPR20: 000001000f7283b0 0000000000000000 c000000000e4a588 c000000000e4a5b0
        GPR24: 0000000000000001 00000000000a0000 c008000000db0168 c0000000021f6ec0
        GPR28: c0000000016d65a8 c000000004b36460 0000000000000000 c0000000016d64b0
        NIP [c00000000080dfa4] do_remove_conflicting_framebuffers+0x184/0x1d0
        [c000000004133280] [c00000000080df9c] do_remove_conflicting_framebuffers+0x17c/0x1d0 (unreliable)
        [c000000004133350] [c00000000080e4d0] remove_conflicting_framebuffers+0x60/0x150
        [c0000000041333a0] [c00000000080e6f4] remove_conflicting_pci_framebuffers+0x134/0x1b0
        [c000000004133450] [c008000000e70438] drm_aperture_remove_conflicting_pci_framebuffers+0x90/0x100 [drm]
        [c000000004133490] [c008000000da0ce4] bochs_pci_probe+0x6c/0xa64 [bochs]
        [...]
        [c000000004133db0] [c00000000002aaa0] system_call_exception+0x170/0x2d0
        [c000000004133e10] [c00000000000c3cc] system_call_common+0xec/0x250
      
      The bug [1] was introduced by commit 27599aac ("fbdev: Hot-unplug
      firmware fb devices on forced removal"). Most firmware framebuffers
      have an underlying platform device, which can be hot-unplugged
      before loading the native graphics driver. OF framebuffers do not
      (yet) have that device. Fix the code by unregistering the framebuffer
      as before without a hot unplug.
      
      Tested with 5.17 on qemu ppc64le emulation.
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Fixes: 27599aac ("fbdev: Hot-unplug firmware fb devices on forced removal")
      Reported-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
      Tested-by: default avatarSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
      Cc: Zack Rusin <zackr@vmware.com>
      Cc: Javier Martinez Canillas <javierm@redhat.com>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: stable@vger.kernel.org # v5.11+
      Cc: Helge Deller <deller@gmx.de>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Zheyu Ma <zheyuma97@gmail.com>
      Cc: Xiyu Yang <xiyuyang19@fudan.edu.cn>
      Cc: Zhen Lei <thunder.leizhen@huawei.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: linux-fbdev@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Link: https://lore.kernel.org/all/YkHXO6LGHAN0p1pq@debian/ # [1]
      Link: https://patchwork.freedesktop.org/patch/msgid/20220404194402.29974-1-tzimmermann@suse.de
      0f525289
    • Maxim Mikityanskiy's avatar
      bpf: Adjust bpf_tcp_check_syncookie selftest to test dual-stack sockets · 53968daf
      Maxim Mikityanskiy authored
      The previous commit fixed support for dual-stack sockets in
      bpf_tcp_check_syncookie. This commit adjusts the selftest to verify the
      fixed functionality.
      Signed-off-by: default avatarMaxim Mikityanskiy <maximmi@nvidia.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Acked-by: default avatarArthur Fabre <afabre@cloudflare.com>
      Link: https://lore.kernel.org/bpf/20220406124113.2795730-2-maximmi@nvidia.com
      53968daf
    • Maxim Mikityanskiy's avatar
      bpf: Support dual-stack sockets in bpf_tcp_check_syncookie · 2e8702cc
      Maxim Mikityanskiy authored
      bpf_tcp_gen_syncookie looks at the IP version in the IP header and
      validates the address family of the socket. It supports IPv4 packets in
      AF_INET6 dual-stack sockets.
      
      On the other hand, bpf_tcp_check_syncookie looks only at the address
      family of the socket, ignoring the real IP version in headers, and
      validates only the packet size. This implementation has some drawbacks:
      
      1. Packets are not validated properly, allowing a BPF program to trick
         bpf_tcp_check_syncookie into handling an IPv6 packet on an IPv4
         socket.
      
      2. Dual-stack sockets fail the checks on IPv4 packets. IPv4 clients end
         up receiving a SYNACK with the cookie, but the following ACK gets
         dropped.
      
      This patch fixes these issues by changing the checks in
      bpf_tcp_check_syncookie to match the ones in bpf_tcp_gen_syncookie. IP
      version from the header is taken into account, and it is validated
      properly with address family.
      
      Fixes: 39904084 ("bpf: add helper to check for a valid SYN cookie")
      Signed-off-by: default avatarMaxim Mikityanskiy <maximmi@nvidia.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
      Acked-by: default avatarArthur Fabre <afabre@cloudflare.com>
      Link: https://lore.kernel.org/bpf/20220406124113.2795730-1-maximmi@nvidia.com
      2e8702cc
    • Alex Deucher's avatar
      drm/amdgpu/smu10: fix SoC/fclk units in auto mode · 2f25d8ce
      Alex Deucher authored
      SMU takes clock limits in Mhz units.  socclk and fclk were
      using 10 khz units in some cases.  Switch to Mhz units.
      Fixes higher than required SoC clocks.
      
      Fixes: 97cf3299 ("drm/amd/pm: Removed fixed clock in auto mode DPM")
      Reviewed-by: default avatarPaul Menzel <pmenzel@molgen.mpg.de>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      2f25d8ce
    • Dmytro Laktyushkin's avatar
      drm/amd/display: update dcn315 clock table read · 28c25238
      Dmytro Laktyushkin authored
      [Why & How]
      Make dcn315 base its clock table off dcfclk rather than fclk.
      
      This change also adds some sanity checking to make sure an
      empty pmfw table does not result in invalid dal clocks.
      Reviewed-by: default avatarCharlene Liu <Charlene.Liu@amd.com>
      Acked-by: default avatarQingqing Zhuo <qingqing.zhuo@amd.com>
      Signed-off-by: default avatarDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      28c25238