1. 06 Aug, 2021 4 commits
  2. 30 Jul, 2021 2 commits
    • Yifan Zhang's avatar
      drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir. · 1c0539a6
      Yifan Zhang authored
      If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC.
      Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround this issue.
      Signed-off-by: default avatarYifan Zhang <yifan1.zhang@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      1c0539a6
    • xinhui pan's avatar
      drm/amdgpu: Fix out-of-bounds read when update mapping · 4d77f36f
      xinhui pan authored
      If one GTT BO has been evicted/swapped out, it should sit in CPU domain.
      TTM only alloc struct ttm_resource instead of struct ttm_range_mgr_node
      for sysMem.
      
      Now when we update mapping for such invalidated BOs, we might walk out
      of bounds of struct ttm_resource.
      
      Three possible fix:
      1) Let sysMem manager alloc struct ttm_range_mgr_node, like
      ttm_range_manager does.
      2) Pass pages_addr to update_mapping function too, but need memset
      pages_addr[] to zero when unpopulate.
      3) Init amdgpu_res_cursor directly.
      
      bug is detected by kfence.
      ==================================================================
      BUG: KFENCE: out-of-bounds read in amdgpu_vm_bo_update_mapping+0x564/0x6e0
      
      Out-of-bounds read at 0x000000008ea93fe9 (64B right of kfence-#167):
       amdgpu_vm_bo_update_mapping+0x564/0x6e0 [amdgpu]
       amdgpu_vm_bo_update+0x282/0xa40 [amdgpu]
       amdgpu_vm_handle_moved+0x19e/0x1f0 [amdgpu]
       amdgpu_cs_vm_handling+0x4e4/0x640 [amdgpu]
       amdgpu_cs_ioctl+0x19e7/0x23c0 [amdgpu]
       drm_ioctl_kernel+0xf3/0x180 [drm]
       drm_ioctl+0x2cb/0x550 [drm]
       amdgpu_drm_ioctl+0x5e/0xb0 [amdgpu]
      
      kfence-#167 [0x000000008e11c055-0x000000001f676b3e
       ttm_sys_man_alloc+0x35/0x80 [ttm]
       ttm_resource_alloc+0x39/0x50 [ttm]
       ttm_bo_swapout+0x252/0x5a0 [ttm]
       ttm_device_swapout+0x107/0x180 [ttm]
       ttm_global_swapout+0x6f/0x130 [ttm]
       ttm_tt_populate+0xb1/0x2a0 [ttm]
       ttm_bo_handle_move_mem+0x17e/0x1d0 [ttm]
       ttm_mem_evict_first+0x59d/0x9c0 [ttm]
       ttm_bo_mem_space+0x39f/0x400 [ttm]
       ttm_bo_validate+0x13c/0x340 [ttm]
       ttm_bo_init_reserved+0x269/0x540 [ttm]
       amdgpu_bo_create+0x1d1/0xa30 [amdgpu]
       amdgpu_bo_create_user+0x40/0x80 [amdgpu]
       amdgpu_gem_object_create+0x71/0xc0 [amdgpu]
       amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x2f2/0xcd0 [amdgpu]
       kfd_ioctl_alloc_memory_of_gpu+0xe2/0x330 [amdgpu]
       kfd_ioctl+0x461/0x690 [amdgpu]
      Signed-off-by: default avatarxinhui pan <xinhui.pan@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      4d77f36f
  3. 29 Jul, 2021 4 commits
  4. 27 Jul, 2021 13 commits
  5. 26 Jul, 2021 5 commits
  6. 25 Jul, 2021 10 commits
  7. 24 Jul, 2021 2 commits
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 6498f615
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - properly set the memory size, which fixes 32-bit systems
      
       - allow initrd to load anywhere in memory, rather that restricting it
         to the first 256MiB
      
       - fix the 'mem=' parameter on 64-bit systems to properly account for
         the maximum supported memory now that the kernel is outside the
         linear map
      
       - avoid installing mappings into the last 4KiB of memory, which
         conflicts with error values
      
       - avoid the stack from being freed while it is being walked
      
       - a handful of fixes to the new copy to/from user routines
      
      * tag 'riscv-for-linus-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: __asm_copy_to-from_user: Fix: Typos in comments
        riscv: __asm_copy_to-from_user: Remove unnecessary size check
        riscv: __asm_copy_to-from_user: Fix: fail on RV32
        riscv: __asm_copy_to-from_user: Fix: overrun copy
        riscv: stacktrace: pin the task's stack in get_wchan
        riscv: Make sure the kernel mapping does not overlap with IS_ERR_VALUE
        riscv: Make sure the linear mapping does not use the kernel mapping
        riscv: Fix memory_limit for 64-bit kernel
        RISC-V: load initrd wherever it fits into memory
        riscv: Fix 32-bit RISC-V boot failure
      6498f615
    • Linus Torvalds's avatar
      ACPI: fix NULL pointer dereference · fc68f42a
      Linus Torvalds authored
      Commit 71f64283 ("ACPI: utils: Fix reference counting in
      for_each_acpi_dev_match()") started doing "acpi_dev_put()" on a pointer
      that was possibly NULL.  That fails miserably, because that helper
      inline function is not set up to handle that case.
      
      Just make acpi_dev_put() silently accept a NULL pointer, rather than
      calling down to put_device() with an invalid offset off that NULL
      pointer.
      
      Link: https://lore.kernel.org/lkml/a607c149-6bf6-0fd0-0e31-100378504da2@kernel.dk/Reported-and-tested-by: default avatarJens Axboe <axboe@kernel.dk>
      Tested-by: default avatarDaniel Scally <djrscally@gmail.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fc68f42a