Skip to content
  1. Feb 27, 2022
  2. Feb 26, 2022
  3. Feb 25, 2022
    • Changbin Du's avatar
      riscv: fix oops caused by irqsoff latency tracer · 22e2100b
      Changbin Du authored
      
      
      The trace_hardirqs_{on,off}() require the caller to setup frame pointer
      properly. This because these two functions use macro 'CALLER_ADDR1' (aka.
      __builtin_return_address(1)) to acquire caller info. If the $fp is used
      for other purpose, the code generated this macro (as below) could trigger
      memory access fault.
      
         0xffffffff8011510e <+80>:    ld      a1,-16(s0)
         0xffffffff80115112 <+84>:    ld      s2,-8(a1)  # <-- paging fault here
      
      The oops message during booting if compiled with 'irqoff' tracer enabled:
      [    0.039615][    T0] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000f8
      [    0.041925][    T0] Oops [#1]
      [    0.042063][    T0] Modules linked in:
      [    0.042864][    T0] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.17.0-rc1-00233-g9a20c48d1ed2 #29
      [    0.043568][    T0] Hardware name: riscv-virtio,qemu (DT)
      [    0.044343][    T0] epc : trace_hardirqs_on+0x56/0xe2
      [    0.044601][    T0]  ra : restore_all+0x12/0x6e
      [    0.044721][    T0] epc : ffffffff80126a5c ra : ffffffff80003b94 sp : ffffffff81403db0
      [    0.044801][    T0]  gp : ffffffff8163acd8 tp : ffffffff81414880 t0 : 0000000000000020
      [    0.044882][    T0]  t1 : 0098968000000000 t2 : 0000000000000000 s0 : ffffffff81403de0
      [    0.044967][    T0]  s1 : 0000000000000000 a0 : 0000000000000001 a1 : 0000000000000100
      [    0.045046][    T0]  a2 : 0000000000000000 a3 : 0000000000000000 a4 : 0000000000000000
      [    0.045124][    T0]  a5 : 0000000000000000 a6 : 0000000000000000 a7 : 0000000054494d45
      [    0.045210][    T0]  s2 : ffffffff80003b94 s3 : ffffffff81a8f1b0 s4 : ffffffff80e27b50
      [    0.045289][    T0]  s5 : ffffffff81414880 s6 : ffffffff8160fa00 s7 : 00000000800120e8
      [    0.045389][    T0]  s8 : 0000000080013100 s9 : 000000000000007f s10: 0000000000000000
      [    0.045474][    T0]  s11: 0000000000000000 t3 : 7fffffffffffffff t4 : 0000000000000000
      [    0.045548][    T0]  t5 : 0000000000000000 t6 : ffffffff814aa368
      [    0.045620][    T0] status: 0000000200000100 badaddr: 00000000000000f8 cause: 000000000000000d
      [    0.046402][    T0] [<ffffffff80003b94>] restore_all+0x12/0x6e
      
      This because the $fp(aka. $s0) register is not used as frame pointer in the
      assembly entry code.
      
      	resume_kernel:
      		REG_L s0, TASK_TI_PREEMPT_COUNT(tp)
      		bnez s0, restore_all
      		REG_L s0, TASK_TI_FLAGS(tp)
                      andi s0, s0, _TIF_NEED_RESCHED
                      beqz s0, restore_all
                      call preempt_schedule_irq
                      j restore_all
      
      To fix above issue, here we add one extra level wrapper for function
      trace_hardirqs_{on,off}() so they can be safely called by low level entry
      code.
      
      Signed-off-by: default avatarChangbin Du <changbin.du@gmail.com>
      Fixes: 3c469798
      
       ("riscv: Enable LOCKDEP_SUPPORT & fixup TRACE_IRQFLAGS_SUPPORT")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      22e2100b
    • Damien Le Moal's avatar
      riscv: fix nommu_k210_sdcard_defconfig · 762e52f7
      Damien Le Moal authored
      
      
      Instead of an arbitrary delay, use the "rootwait" kernel option to wait
      for the mmc root device to be ready.
      
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      Fixes: 7e09fd39
      
       ("riscv: Add Canaan Kendryte K210 SD card defconfig")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      762e52f7
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 53ab78cd
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "A couple driver fixes in the clk subsystem
      
         - Fix a hang due to bad clk parent in the Ingenic jz4725b driver
      
         - Fix SD controllers on Qualcomm MSM8994 SoCs by removing clks that
           shouldn't be touched"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: jz4725b: fix mmc0 clock gating
        clk: qcom: gcc-msm8994: Remove NoC clocks
      53ab78cd
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-02-25' of git://anongit.freedesktop.org/drm/drm · 5ee3d001
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Regular drm fixes pull, i915, amdgpu and tegra mostly, all pretty
        small.
      
        core:
         - edid: Always set RGB444
      
        tegra:
         - tegra186 suspend/resume fixes
         - syncpoint wait fix
         - build warning fix
         - eDP on older devices fix
      
        amdgpu:
         - Display FP fix
         - PCO powergating fix
         - RDNA2 OEM SKU stability fixes
         - Display PSR fix
         - PCI ASPM fix
         - Display link encoder fix for TEST_COMMIT
         - Raven2 suspend/resume fix
         - Fix a regression in virtual display support
         - GPUVM eviction fix
      
        i915:
         - Fix QGV handling on ADL-P+
         - Fix bw atomic check when switching between SAGV vs. no SAGV
         - Disconnect PHYs left connected by BIOS on disabled ports
         - Fix SAVG to no SAGV transitions on TGL+
         - Print PHY name properly on calibration error (DG2)
      
        imx:
         - dcss: Select GEM CMA helpers
      
        radeon:
         - Fix some variables's type
      
        vc4:
         - Fix codec cleanup
         - Fix PM reference counting"
      
      * tag 'drm-fixes-2022-02-25' of git://anongit.freedesktop.org/drm/drm: (24 commits)
        drm/amdgpu: check vm ready by amdgpu_vm->evicting flag
        drm/amdgpu: bypass tiling flag check in virtual display case (v2)
        Revert "drm/amdgpu: add modifiers in amdgpu_vkms_plane_init()"
        drm/amdgpu: do not enable asic reset for raven2
        drm/amd/display: Fix stream->link_enc unassigned during stream removal
        drm/amd: Check if ASPM is enabled from PCIe subsystem
        drm/edid: Always set RGB444
        drm/tegra: dpaux: Populate AUX bus
        drm/radeon: fix variable type
        drm/amd/display: For vblank_disable_immediate, check PSR is really used
        drm/amd/pm: fix some OEM SKU specific stability issues
        drm/amdgpu: disable MMHUB PG for Picasso
        drm/amd/display: Protect update_bw_bounding_box FPU code.
        drm/i915/dg2: Print PHY name properly on calibration error
        drm/i915: Fix bw atomic check when switching between SAGV vs. no SAGV
        drm/i915: Correctly populate use_sagv_wm for all pipes
        drm/i915: Disconnect PHYs left connected by BIOS on disabled ports
        drm/i915: Widen the QGV point mask
        drm/imx/dcss: i.MX8MQ DCSS select DRM_GEM_CMA_HELPER
        drm/vc4: crtc: Fix runtime_pm reference counting
        ...
      5ee3d001
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.17-2022-02-24' of... · 7ee02256
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.17-2022-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix double free in in the error path when opening perf.data from
         multiple files in a directory instead of from a single file
      
       - Sync the msr-index.h copy with the kernel sources
      
       - Fix error when printing 'weight' field in 'perf script'
      
       - Skip failing sigtrap test for arm+aarch64 in 'perf test'
      
       - Fix failure to use a cpu list for uncore events in hybrid systems,
         e.g. Intel Alder Lake
      
      * tag 'perf-tools-fixes-for-v5.17-2022-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf script: Fix error when printing 'weight' field
        tools arch x86: Sync the msr-index.h copy with the kernel sources
        perf data: Fix double free in perf_session__delete()
        perf evlist: Fix failed to use cpu list for uncore events
        perf test: Skip failing sigtrap test for arm+aarch64
      7ee02256
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 1f840c0e
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "x86 host:
      
         - Expose KVM_CAP_ENABLE_CAP since it is supported
      
         - Disable KVM_HC_CLOCK_PAIRING in TSC catchup mode
      
         - Ensure async page fault token is nonzero
      
         - Fix lockdep false negative
      
         - Fix FPU migration regression from the AMX changes
      
        x86 guest:
      
         - Don't use PV TLB/IPI/yield on uniprocessor guests
      
        PPC:
      
         - reserve capability id (topic branch for ppc/kvm)"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: nSVM: disallow userspace setting of MSR_AMD64_TSC_RATIO to non default value when tsc scaling disabled
        KVM: x86/mmu: make apf token non-zero to fix bug
        KVM: PPC: reserve capability 210 for KVM_CAP_PPC_AIL_MODE_3
        x86/kvm: Don't use pv tlb/ipi/sched_yield if on 1 vCPU
        x86/kvm: Fix compilation warning in non-x86_64 builds
        x86/kvm/fpu: Remove kvm_vcpu_arch.guest_supported_xcr0
        x86/kvm/fpu: Limit guest user_xfeatures to supported bits of XCR0
        kvm: x86: Disable KVM_HC_CLOCK_PAIRING if tsc is in always catchup mode
        KVM: Fix lockdep false negative during host resume
        KVM: x86: Add KVM_CAP_ENABLE_CAP to x86
      1f840c0e
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.17-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · d8152cfe
      Linus Torvalds authored
      Pull pci fixes from Bjorn Helgaas:
      
       - Fix a merge error that broke PCI device enumeration on mvebu
         platforms, including Turris Omnia (Armada 385) (Pali Rohár)
      
       - Avoid using ATS on all AMD Navi10 and Navi14 GPUs because some
         VBIOSes don't account for "harvested" (disabled) parts of the chip
         when initializing caches (Alex Deucher)
      
      * tag 'pci-v5.17-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: Mark all AMD Navi10 and Navi14 GPU ATS as broken
        PCI: mvebu: Fix device enumeration regression
      d8152cfe
    • Linus Torvalds's avatar
      Merge tag 'net-5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · f672ff91
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from bpf and netfilter.
      
        Current release - regressions:
      
         - bpf: fix crash due to out of bounds access into reg2btf_ids
      
         - mvpp2: always set port pcs ops, avoid null-deref
      
         - eth: marvell: fix driver load from initrd
      
         - eth: intel: revert "Fix reset bw limit when DCB enabled with 1 TC"
      
        Current release - new code bugs:
      
         - mptcp: fix race in overlapping signal events
      
        Previous releases - regressions:
      
         - xen-netback: revert hotplug-status changes causing devices to not
           be configured
      
         - dsa:
            - avoid call to __dev_set_promiscuity() while rtnl_mutex isn't
              held
            - fix panic when removing unoffloaded port from bridge
      
         - dsa: microchip: fix bridging with more than two member ports
      
        Previous releases - always broken:
      
         - bpf:
            - fix crash due to incorrect copy_map_value when both spin lock
              and timer are present in a single value
            - fix a bpf_timer initialization issue with clang
            - do not try bpf_msg_push_data with len 0
            - add schedule points in batch ops
      
         - nf_tables:
            - unregister flowtable hooks on netns exit
            - correct flow offload action array size
            - fix a couple of memory leaks
      
         - vsock: don't check owner in vhost_vsock_stop() while releasing
      
         - gso: do not skip outer ip header in case of ipip and net_failover
      
         - smc: use a mutex for locking "struct smc_pnettable"
      
         - openvswitch: fix setting ipv6 fields causing hw csum failure
      
         - mptcp: fix race in incoming ADD_ADDR option processing
      
         - sysfs: add check for netdevice being present to speed_show
      
         - sched: act_ct: fix flow table lookup after ct clear or switching
           zones
      
         - eth: intel: fixes for SR-IOV forwarding offloads
      
         - eth: broadcom: fixes for selftests and error recovery
      
         - eth: mellanox: flow steering and SR-IOV forwarding fixes
      
        Misc:
      
         - make __pskb_pull_tail() & pskb_carve_frag_list() drop_monitor
           friends not report freed skbs as drops
      
         - force inlining of checksum functions in net/checksum.h"
      
      * tag 'net-5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (85 commits)
        net: mv643xx_eth: process retval from of_get_mac_address
        ping: remove pr_err from ping_lookup
        Revert "i40e: Fix reset bw limit when DCB enabled with 1 TC"
        openvswitch: Fix setting ipv6 fields causing hw csum failure
        ipv6: prevent a possible race condition with lifetimes
        net/smc: Use a mutex for locking "struct smc_pnettable"
        bnx2x: fix driver load from initrd
        Revert "xen-netback: Check for hotplug-status existence before watching"
        Revert "xen-netback: remove 'hotplug-status' once it has served its purpose"
        net/mlx5e: Fix VF min/max rate parameters interchange mistake
        net/mlx5e: Add missing increment of count
        net/mlx5e: MPLSoUDP decap, fix check for unsupported matches
        net/mlx5e: Fix MPLSoUDP encap to use MPLS action information
        net/mlx5e: Add feature check for set fec counters
        net/mlx5e: TC, Skip redundant ct clear actions
        net/mlx5e: TC, Reject rules with forward and drop actions
        net/mlx5e: TC, Reject rules with drop and modify hdr action
        net/mlx5e: kTLS, Use CHECKSUM_UNNECESSARY for device-offloaded packets
        net/mlx5e: Fix wrong return value on ioctl EEPROM query failure
        net/mlx5: Fix possible deadlock on rule deletion
        ...
      f672ff91