Re: [PATCH] drm/amdkfd: Fix some issues at userptr buffer validation process.

2023-04-18 Thread Felix Kuehling
On 2023-04-13 23:27, Chen, Xiaogang wrote: On 4/13/2023 3:08 PM, Felix Kuehling wrote: Am 2023-04-12 um 02:14 schrieb Xiaogang.Chen: From: Xiaogang Chen Notice userptr buffer restore process has following issues: 1: amdgpu_ttm_tt_get_user_pages can fail(-EFAULT). If it failed we should

Re: [PATCH] drm/amdkfd: Fix potential deallocation of previously deallocated memory.

2023-04-18 Thread Andi Shyti
> Daniil will you look into this? and, because this is a bug fix, if you do want to send a real fix, plase add to the commit message: Fixes: d1f8f0d17d40 ("drm/amdkfd: Move non-sdma mqd allocation out of init_mqd") Cc: Oak Zeng Cc: # v5.3+ Andi PS: please note that Oak's e-mail has changed.

[PATCH v4 1/6] mm/gup: remove unused vmas parameter from get_user_pages()

2023-04-18 Thread Lorenzo Stoakes
No invocation of get_user_pages() uses the vmas parameter, so remove it. The GUP API is confusing and caveated. Recent changes have done much to improve that, however there is more we can do. Exporting vmas is a prime target as the caller has to be extremely careful to preclude their use after

RE: [PATCH] drm/dp_mst: Clear MSG_RDY flag before sending new message

2023-04-18 Thread Jani Nikula
On Tue, 18 Apr 2023, "Lin, Wayne" wrote: > [Public] > > Hi Jani Nikula, > > Appreciate your time and feedback! Will adjust the patch. > Some comments inline. > >> -Original Message- >> From: Jani Nikula >> Sent: Tuesday, April 18, 2023 4:53 PM >> To: Lin, Wayne ;

Re: [PATCH] drm/dp_mst: Clear MSG_RDY flag before sending new message

2023-04-18 Thread Jani Nikula
On Tue, 18 Apr 2023, Wayne Lin wrote: > [Why & How] > The sequence for collecting down_reply/up_request from source > perspective should be: > > Request_n->repeat (get partial reply of Request_n->clear message ready > flag to ack DPRX that the message is received) till all partial > replies for

Re: [PATCH] [v2] drm/amd/display: fix is_timing_changed() prototype

2023-04-18 Thread Hamza Mahfooz
On 4/17/23 18:07, Arnd Bergmann wrote: From: Arnd Bergmann Three functions in the amdgpu display driver cause -Wmissing-prototype warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1858:6: error: no previous prototype for 'is_timing_changed' [-Werror=missing-prototypes]

Re: [PATCH] drm/dp_mst: Clear MSG_RDY flag before sending new message

2023-04-18 Thread Ville Syrjälä
On Tue, Apr 18, 2023 at 02:09:05PM +0800, Wayne Lin wrote: > [Why & How] > The sequence for collecting down_reply/up_request from source > perspective should be: > > Request_n->repeat (get partial reply of Request_n->clear message ready > flag to ack DPRX that the message is received) till all

Re: [PATCH] [v2] drm/amd/display: fix is_timing_changed() prototype

2023-04-18 Thread Aurabindo Pillai
On 4/17/2023 6:07 PM, Arnd Bergmann wrote: From: Arnd Bergmann Three functions in the amdgpu display driver cause -Wmissing-prototype warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1858:6: error: no previous prototype for 'is_timing_changed'

Re: [PATCH v3] drm/amdgpu: Fix desktop freezed after gpu-reset

2023-04-18 Thread Christian König
Am 18.04.23 um 13:29 schrieb Alan Liu: [Why] After gpu-reset, sometimes the driver fails to enable vblank irq, causing flip_done timed out and the desktop freezed. During gpu-reset, we disable and enable vblank irq in dm_suspend() and dm_resume(). Later on in

[PATCH v3] drm/amdgpu: Fix desktop freezed after gpu-reset

2023-04-18 Thread Alan Liu
[Why] After gpu-reset, sometimes the driver fails to enable vblank irq, causing flip_done timed out and the desktop freezed. During gpu-reset, we disable and enable vblank irq in dm_suspend() and dm_resume(). Later on in amdgpu_irq_gpu_reset_resume_helper(), we check irqs' refcount and decide to

RE: [PATCH] drm/dp_mst: Clear MSG_RDY flag before sending new message

2023-04-18 Thread Lin, Wayne
[Public] Hi Jani Nikula, Appreciate your time and feedback! Will adjust the patch. Some comments inline. > -Original Message- > From: Jani Nikula > Sent: Tuesday, April 18, 2023 4:53 PM > To: Lin, Wayne ; dri-de...@lists.freedesktop.org; > amd-gfx@lists.freedesktop.org > Cc:

[PATCH] drm/amd/display: Fix a test CalculatePrefetchSchedule()

2023-04-18 Thread Christophe JAILLET
It is likely Height was expected here, instead of Width. Test the correct variable. Fixes: 17529ea2acfa ("drm/amd/display: Optimizations for DML math") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: Integer overflow leads to uninitialization vulnerability in amdgpu_cs_parser_init

2023-04-18 Thread whitehat002 whitehat002
Sorry, I found that the latest code function has become amdgpu_cs_pass1, and radeon_cs_parser_init has the same problem.And i will send the patch. whitehat002 whitehat002 于2023年4月18日周二 11:39写道: > Hello, > > I am going to file a security bug. > > VULNERABILITY DETAILS > > ioctl$AMDGPU_CS will

Integer overflow leads to uninitialization vulnerability in amdgpu_cs_parser_init

2023-04-18 Thread whitehat002 whitehat002
Hello, I am going to file a security bug. VULNERABILITY DETAILS ioctl$AMDGPU_CS will call amdgpu_cs_ioctl which will call amdgpu_cs_parser_init. The type of size is unsigned(4 bytes)[1]. And size is assigned from p->chunks[i].length_dw[2] which is assigned from user_chunk.length_dw[3], which

[PATCH] drm/amd/display: Fix a test dml32_rq_dlg_get_rq_reg()

2023-04-18 Thread Christophe JAILLET
It is likely p1_min_meta_chunk_bytes was expected here, instead of min_meta_chunk_bytes. Test the correct variable. Fixes: dda4fb85e433 ("drm/amd/display: DML changes for DCN32/321") Signed-off-by: Christophe JAILLET --- .../gpu/drm/amd/display/dc/dml/dcn32/display_rq_dlg_calc_32.c | 2 +- 1

Re: [PATCH 2/2] drm/amd/display: fix missing=prototypes warnings

2023-04-18 Thread Arnd Bergmann
On Mon, Apr 17, 2023, at 23:17, Hamza Mahfooz wrote: > On 4/17/23 17:05, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> Three functions in the amdgpu display driver cause -Wmissing-prototype >> warnings: >> >> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1858:6: error: >> no

[linux-next:master] BUILD REGRESSION 4aa1da8d99724f6c0b762b58a71cee7c5e2e109b

2023-04-18 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 4aa1da8d99724f6c0b762b58a71cee7c5e2e109b Add linux-next specific files for 20230417 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202304102354.q4voxgte-...@intel.com

[PATCH] drm/amdgpu: Enable doorbell selfring if resize BAR successfully

2023-04-18 Thread Shane Xiao
[Why] The selfring doorbell aperture will change when we resize FB BAR successfully during gmc sw init, we should reorder the sequence of enabling doorbell selfring aperture. [How] Move enable_doorbell_selfring_aperture from *_common_hw_init to *_common_late_init. This fixes the potential issue

[PATCH] drm/dp_mst: Clear MSG_RDY flag before sending new message

2023-04-18 Thread Wayne Lin
[Why & How] The sequence for collecting down_reply/up_request from source perspective should be: Request_n->repeat (get partial reply of Request_n->clear message ready flag to ack DPRX that the message is received) till all partial replies for Request_n are received->new Request_n+1. While