RE: [bug/bisected] commit a2848d08742c8e8494675892c02c0d22acbe3cf8 cause general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI

2023-07-18 Thread Chen, Guchun
[Public]

Thank for your test, Mike. After getting RB for this patch, I will ask 
Christian to apply it to corresponding branches like drm-misc-next.

Regards,
Guchun

> -Original Message-
> From: Mikhail Gavrilov 
> Sent: Tuesday, July 18, 2023 5:17 PM
> To: Chen, Guchun 
> Cc: Koenig, Christian ; Pelloux-Prayer, Pierre-
> Eric ; Deucher, Alexander
> ; amd-gfx list  g...@lists.freedesktop.org>; Linux List Kernel Mailing  ker...@vger.kernel.org>
> Subject: Re: [bug/bisected] commit
> a2848d08742c8e8494675892c02c0d22acbe3cf8 cause general protection
> fault, probably for non-canonical address 0xdffffc00:  [#1]
> PREEMPT SMP KASAN NOPTI
>
> On Tue, Jul 18, 2023 at 7:13 AM Chen, Guchun 
> wrote:
> >
> > [Public]
> >
> > Hello Mike,
> >
> > I guess this patch can resolve your problem.
> > https://patchwork.freedesktop.org/patch/547897/
> >
> > Regards,
> > Guchun
> >
>
> Tested-by: Mikhail Gavrilov  Thanks, the
> issue was gone with this patch.
>
> I didn't say anything above about how to reproduce this problem.
> Case was like this:
> On a dual GPU laptop, I ran Google Chrome on a discrete graphics card.
> I used for it this command:
> $ DRI_PRIME=1 google-chrome-unstable --disable-features=Vulkan
>
> --
> Best Regards,
> Mike Gavrilov.


Re: [bug/bisected] commit a2848d08742c8e8494675892c02c0d22acbe3cf8 cause general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI

2023-07-18 Thread Mikhail Gavrilov
On Tue, Jul 18, 2023 at 7:13 AM Chen, Guchun  wrote:
>
> [Public]
>
> Hello Mike,
>
> I guess this patch can resolve your problem.
> https://patchwork.freedesktop.org/patch/547897/
>
> Regards,
> Guchun
>

Tested-by: Mikhail Gavrilov 
Thanks, the issue was gone with this patch.

I didn't say anything above about how to reproduce this problem.
Case was like this:
On a dual GPU laptop, I ran Google Chrome on a discrete graphics card.
I used for it this command:
$ DRI_PRIME=1 google-chrome-unstable --disable-features=Vulkan

-- 
Best Regards,
Mike Gavrilov.


RE: [bug/bisected] commit a2848d08742c8e8494675892c02c0d22acbe3cf8 cause general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI

2023-07-17 Thread Chen, Guchun
[Public]

Hello Mike,

I guess this patch can resolve your problem.
https://patchwork.freedesktop.org/patch/547897/

Regards,
Guchun

> -Original Message-
> From: amd-gfx  On Behalf Of
> Mikhail Gavrilov
> Sent: Tuesday, July 18, 2023 3:34 AM
> To: Koenig, Christian ; Pelloux-Prayer, Pierre-
> Eric ; Deucher, Alexander
> ; amd-gfx list  g...@lists.freedesktop.org>; Linux List Kernel Mailing  ker...@vger.kernel.org>
> Subject: [bug/bisected] commit
> a2848d08742c8e8494675892c02c0d22acbe3cf8 cause general protection
> fault, probably for non-canonical address 0xdc00:  [#1]
> PREEMPT SMP KASAN NOPTI
>
> Hi,
> at weekend I catched another problem.
> I noted my computer starts hang after launching Steam and Google Chrome.
> In the kernel log I saw such backtrace:
> [   90.002283] general protection fault, probably for non-canonical
> address 0xdc00:  [#1] PREEMPT SMP KASAN NOPTI
> [   90.002292] KASAN: null-ptr-deref in range
> [0x-0x0007]
> [   90.002296] CPU: 12 PID: 3499 Comm: chrome:cs0 Tainted: GB   W
>   L 6.4.0-rc7-07-a2848d08742c8e8494675892c02c0d22acbe3cf8+ #124
> [   90.002299] Hardware name: ASUSTeK COMPUTER INC. ROG Strix
> G513QY_G513QY/G513QY, BIOS G513QY.331 02/24/2023
> [   90.002301] RIP: 0010:ttm_bo_evict_swapout_allowable+0x322/0x5e0 [ttm]
> [   90.002313] Code: b6 04 02 48 89 ea 83 e2 07 38 d0 7f 08 84 c0 0f
> 85 e8 01 00 00 4c 89 e2 c6 45 00 00 48 b8 00 00 00 00 00 fc ff df 48
> c1 ea 03 <0f> b6 04 02 4c 89 e2 83 e2 07 38 d0 7f 08 84 c0 0f 85 ca 01
> 00 00
> [   90.002316] RSP: 0018:c9000703ee08 EFLAGS: 00010256
> [   90.002319] RAX: dc00 RBX: 888180ac1858 RCX:
> c9000703ee90
> [   90.002321] RDX:  RSI: c9000703f228 RDI:
> 888180ac1ab4
> [   90.002323] RBP: c9000703ee90 R08:  R09:
> c9000703eed0
> [   90.002324] R10: f52000e07db3 R11: b17dde80 R12:
> 
> [   90.002326] R13: c9000703f228 R14: c9000703eed0 R15:
> 888180ac1858
> [   90.002328] FS:  7f77461fe6c0() GS:888f9c80()
> knlGS:
> [   90.002330] CS:  0010 DS:  ES:  CR0: 80050033
> [   90.002332] CR2: 7f773549c000 CR3: 00024213e000 CR4:
> 00750ee0
> [   90.002334] PKRU: 5554
> [   90.002335] Call Trace:
> [   90.002337]  
> [   90.002339]  ? die_addr+0x40/0xa0
> [   90.002346]  ? exc_general_protection+0x159/0x240
> [   90.002352]  ? asm_exc_general_protection+0x26/0x30
> [   90.002357]  ? ttm_bo_evict_swapout_allowable+0x322/0x5e0 [ttm]
> [   90.002365]  ? ttm_bo_evict_swapout_allowable+0x42e/0x5e0 [ttm]
> [   90.002373]  ttm_bo_swapout+0x134/0x7f0 [ttm]
> [   90.002383]  ? __pfx_ttm_bo_swapout+0x10/0x10 [ttm]
> [   90.002391]  ? lock_acquire+0x44d/0x4f0
> [   90.002398]  ? ttm_device_swapout+0xa5/0x260 [ttm]
> [   90.002412]  ? lock_acquired+0x355/0xa00
> [   90.002416]  ? do_raw_spin_trylock+0xb6/0x190
> [   90.002421]  ? __pfx_lock_acquired+0x10/0x10
> [   90.002426]  ? ttm_global_swapout+0x25/0x210 [ttm]
> [   90.002442]  ttm_device_swapout+0x198/0x260 [ttm]
> [   90.002456]  ? __pfx_ttm_device_swapout+0x10/0x10 [ttm]
> [   90.002472]  ttm_global_swapout+0x75/0x210 [ttm]
> [   90.002486]  ttm_tt_populate+0x187/0x3f0 [ttm]
> [   90.002501]  ttm_bo_handle_move_mem+0x437/0x590 [ttm]
> [   90.002517]  ttm_bo_validate+0x275/0x430 [ttm]
> [   90.002530]  ? __pfx_ttm_bo_validate+0x10/0x10 [ttm]
> [   90.002544]  ? kasan_save_stack+0x33/0x60
> [   90.002550]  ? kasan_set_track+0x25/0x30
> [   90.002554]  ? __kasan_kmalloc+0x8f/0xa0
> [   90.002558]  ? amdgpu_gtt_mgr_new+0x81/0x420 [amdgpu]
> [   90.003023]  ? ttm_resource_alloc+0xf6/0x220 [ttm]
> [   90.003038]  amdgpu_bo_pin_restricted+0x2dd/0x8b0 [amdgpu]
> [   90.003210]  ? __x64_sys_ioctl+0x131/0x1a0
> [   90.003210]  ? do_syscall_64+0x60/0x90
> [   90.003210]  ? __pfx_amdgpu_bo_pin_restricted+0x10/0x10 [amdgpu]
> [   90.003210]  ? unmap_mapping_range+0xb6/0x250
> [   90.003210]  ? __pfx___might_resched+0x10/0x10
> [   90.003210]  ? lock_acquired+0x355/0xa00
> [   90.003210]  ? __down_read_trylock+0x1be/0x3a0
> [   90.003210]  dma_buf_map_attachment+0x1dd/0x560
> [   90.003210]  ? rcu_is_watching+0x15/0xb0
> [   90.003210]  amdgpu_bo_move+0x1227/0x1830 [amdgpu]
> [   90.003210]  ? lock_release+0x4ec/0xba0
> [   90.003210]  ? ttm_bo_add_move_fence.isra.0+0x22/0x290 [ttm]
> [   90.003210]  ? rcu_is_watching+0x15/0xb0
> [   90.003210]  ? __pfx_amdgpu_bo_move+0x10/0x10 [amdgpu]
> [   90.003210]  ? dma_resv_reserve_fences+0xe8/0x7f0
> [   90.003210]  ? unmap_mapping_range+0xe3/0x250
> [   90.003210]  ? __pfx_dma_resv_reserve_fences+0x10/0x10
> [   90.003210]  ? _raw_spin_unlock+0x2d/0x50
> [   90.003210]  ? ttm_bo_add_move_fence.isra.0+0x12b/0x290 [ttm]
> [   90.003210]  ttm_bo_handle_move_mem+0x244/0x590 [ttm]
> [   90.003210]  ttm_bo_validate+0x275/0x430 [ttm]
> [   90.003210]  ? __pfx_ttm_bo_validate+0x10/0x10 [ttm]
> [   90.003210]