Re: [PATCH v6.6] drm/amd/display: Wake DMCUB before executing GPINT commands

2024-04-18 Thread Alex Deucher
On Wed, Apr 17, 2024 at 11:14 PM wangzhu  wrote:
>
> The CVE-2023-52624 is fixed in linux-6.7 stable, while it is not fixed in 
> 6.6, this commit is presented to fix it in linux-6.6 stable.

Why is there a CVE in the first place?  Is this actually an issue you
have seen?  It seems like you just picked a random patch and opened a
CVE.

Alex


>
> -邮件原件-
> 发件人: Alex Deucher [mailto:alexdeuc...@gmail.com]
> 发送时间: 2024年4月18日 9:58
> 收件人: wangzhu 
> 抄送: Greg KH ; harry.wentl...@amd.com; 
> sunpeng...@amd.com; rodrigo.sique...@amd.com; alexander.deuc...@amd.com; 
> christian.koe...@amd.com; airl...@linux.ie; dan...@ffwll.ch; 
> qingqing.z...@amd.com; stylon.w...@amd.com; josip.pa...@amd.com; 
> t...@redhat.com; cruise.h...@amd.com; eric.ya...@amd.com; 
> mario.limoncie...@amd.com; alvin.l...@amd.com; jun@amd.com; 
> austin.zh...@amd.com; sung...@amd.com; paul.hs...@amd.com; 
> hanghong...@amd.com; jinze...@amd.com; lewis.hu...@amd.com; Zhengzengkai 
> ; alex.h...@amd.com; syed.has...@amd.com; 
> wayne@amd.com; nicholas.kazlaus...@amd.com; chiahsuan.ch...@amd.com; 
> aurabindo.pil...@amd.com; aric@amd.com; amd-...@lists.freedesktop.org; 
> dri-devel@lists.freedesktop.org; linux-ker...@vger.kernel.org
> 主题: Re: [PATCH v6.6] drm/amd/display: Wake DMCUB before executing GPINT 
> commands
>
> On Wed, Apr 17, 2024 at 9:51 PM wangzhu  wrote:
> >
> > Hi Greg, thanks for your reply. Since there is no patch to fix 
> > CVE-2023-52624 in linux-5.10, there is a patch in the linux-6.7 branch, its 
> > commit is 2ef98c6d753a744e333b7e34b9cf687040fba57d ("drm/amd/display: Wake 
> > DMCUB before executing GPINT commands"). When we apply this patch to 
> > linux-5.10, there are lots of conflicts, and we found there are lots of 
> > dependent patches, and lots of patches are not proposed to fix the cve, 
> > they are presented to add new functions of the kernel.
> >
>
> Why is there a CVE?  Have you uncovered some specific issue?
>
> Alex
>
> > My commit comes from nearly 20 patches. For each patch, not all of its 
> > content is meant to fix the cve, so I just get the part which is helpful to 
> > fix. It is why I don't present the patches one by one instead of merging 
> > them into one big patch.
> >
> >
> > -邮件原件-
> > 发件人: Greg KH [mailto:gre...@linuxfoundation.org]
> > 发送时间: 2024年4月16日 12:54
> > 收件人: wangzhu 
> > 抄送: harry.wentl...@amd.com; sunpeng...@amd.com;
> > rodrigo.sique...@amd.com; alexander.deuc...@amd.com;
> > christian.koe...@amd.com; airl...@linux.ie; dan...@ffwll.ch;
> > qingqing.z...@amd.com; stylon.w...@amd.com; josip.pa...@amd.com;
> > t...@redhat.com; cruise.h...@amd.com; eric.ya...@amd.com;
> > mario.limoncie...@amd.com; alvin.l...@amd.com; jun@amd.com;
> > austin.zh...@amd.com; sung...@amd.com; paul.hs...@amd.com;
> > hanghong...@amd.com; jinze...@amd.com; lewis.hu...@amd.com;
> > Zhengzengkai ; alex.h...@amd.com;
> > syed.has...@amd.com; wayne@amd.com; nicholas.kazlaus...@amd.com;
> > chiahsuan.ch...@amd.com; aurabindo.pil...@amd.com; aric@amd.com;
> > amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org;
> > linux-ker...@vger.kernel.org
> > 主题: Re: [PATCH v6.6] drm/amd/display: Wake DMCUB before executing
> > GPINT commands
> >
> > On Tue, Apr 16, 2024 at 03:52:40AM +, Zhu Wang wrote:
> > > From: Nicholas Kazlauskas 
> > >
> > > stable inclusion
> > > from stable-v6.7.3
> > > commit 2ef98c6d753a744e333b7e34b9cf687040fba57d
> > > category: bugfix
> > > bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9BV4C
> > > CVE: CVE-2023-52624
> > >
> > > Reference:
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/c
> > > om mit/?id=2ef98c6d753a744e333b7e34b9cf687040fba57d
> > >
> > > 
> > >
> > > [ Upstream commit e5ffd1263dd5b44929c676171802e7b6af483f21 ]
> > >
> > > [Why]
> > > DMCUB can be in idle when we attempt to interface with the HW
> > > through the GPINT mailbox resulting in a system hang.
> > >
> > > [How]
> > > Add dc_wake_and_execute_gpint() to wrap the wake, execute, sleep
> > > sequence.
> > >
> > > If the GPINT executes successfully then DMCUB will be put back into
> > > sleep after the optional response is returned.
> > >
> > > It functions similar to the inbox command interface.
> > >
> > > Cc: Mario Limonciello 
> > > Cc: Alex Deucher 
> > > Cc: sta...@vger.kernel.org
> &

Re: [PATCH v6.6] drm/amd/display: Wake DMCUB before executing GPINT commands

2024-04-17 Thread Alex Deucher
On Wed, Apr 17, 2024 at 9:51 PM wangzhu  wrote:
>
> Hi Greg, thanks for your reply. Since there is no patch to fix CVE-2023-52624 
> in linux-5.10, there is a patch in the linux-6.7 branch, its commit is 
> 2ef98c6d753a744e333b7e34b9cf687040fba57d ("drm/amd/display: Wake DMCUB before 
> executing GPINT commands"). When we apply this patch to linux-5.10, there are 
> lots of conflicts, and we found there are lots of dependent patches, and lots 
> of patches are not proposed to fix the cve, they are presented to add new 
> functions of the kernel.
>

Why is there a CVE?  Have you uncovered some specific issue?

Alex

> My commit comes from nearly 20 patches. For each patch, not all of its 
> content is meant to fix the cve, so I just get the part which is helpful to 
> fix. It is why I don't present the patches one by one instead of merging them 
> into one big patch.
>
>
> -邮件原件-
> 发件人: Greg KH [mailto:gre...@linuxfoundation.org]
> 发送时间: 2024年4月16日 12:54
> 收件人: wangzhu 
> 抄送: harry.wentl...@amd.com; sunpeng...@amd.com; rodrigo.sique...@amd.com; 
> alexander.deuc...@amd.com; christian.koe...@amd.com; airl...@linux.ie; 
> dan...@ffwll.ch; qingqing.z...@amd.com; stylon.w...@amd.com; 
> josip.pa...@amd.com; t...@redhat.com; cruise.h...@amd.com; 
> eric.ya...@amd.com; mario.limoncie...@amd.com; alvin.l...@amd.com; 
> jun@amd.com; austin.zh...@amd.com; sung...@amd.com; paul.hs...@amd.com; 
> hanghong...@amd.com; jinze...@amd.com; lewis.hu...@amd.com; Zhengzengkai 
> ; alex.h...@amd.com; syed.has...@amd.com; 
> wayne@amd.com; nicholas.kazlaus...@amd.com; chiahsuan.ch...@amd.com; 
> aurabindo.pil...@amd.com; aric@amd.com; amd-...@lists.freedesktop.org; 
> dri-devel@lists.freedesktop.org; linux-ker...@vger.kernel.org
> 主题: Re: [PATCH v6.6] drm/amd/display: Wake DMCUB before executing GPINT 
> commands
>
> On Tue, Apr 16, 2024 at 03:52:40AM +, Zhu Wang wrote:
> > From: Nicholas Kazlauskas 
> >
> > stable inclusion
> > from stable-v6.7.3
> > commit 2ef98c6d753a744e333b7e34b9cf687040fba57d
> > category: bugfix
> > bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9BV4C
> > CVE: CVE-2023-52624
> >
> > Reference:
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/com
> > mit/?id=2ef98c6d753a744e333b7e34b9cf687040fba57d
> >
> > 
> >
> > [ Upstream commit e5ffd1263dd5b44929c676171802e7b6af483f21 ]
> >
> > [Why]
> > DMCUB can be in idle when we attempt to interface with the HW through
> > the GPINT mailbox resulting in a system hang.
> >
> > [How]
> > Add dc_wake_and_execute_gpint() to wrap the wake, execute, sleep
> > sequence.
> >
> > If the GPINT executes successfully then DMCUB will be put back into
> > sleep after the optional response is returned.
> >
> > It functions similar to the inbox command interface.
> >
> > Cc: Mario Limonciello 
> > Cc: Alex Deucher 
> > Cc: sta...@vger.kernel.org
> > Reviewed-by: Hansen Dsouza 
> > Acked-by: Wayne Lin 
> > Signed-off-by: Nicholas Kazlauskas 
> > Tested-by: Daniel Wheeler 
> > Signed-off-by: Alex Deucher 
> >
> > This commit comes from following commits:
> >
> >  8774029f76b9 ("drm/amd/display: Add DCN35 CLK_MGR")  65138eb72e1f
> > ("drm/amd/display: Add DCN35 DMUB")  dc01c4b79bfe ("drm/amd/display:
> > Update driver and IPS interop")
> >  820c3870c491 ("drm/amd/display: Refactor DMCUB enter/exit idle
> > interface")  2ef98c6d753a ("drm/amd/display: Wake DMCUB before
> > executing GPINT commands")
>
> Why are you putting multiple commits together and not just submitting the 
> individual ones?  And what is this for?
>
> confused,
>
> greg k-h


Re: [PATCH v6.6] drm/amd/display: Wake DMCUB before executing GPINT commands

2024-04-15 Thread Greg KH
On Tue, Apr 16, 2024 at 03:52:40AM +, Zhu Wang wrote:
> From: Nicholas Kazlauskas 
> 
> stable inclusion
> from stable-v6.7.3
> commit 2ef98c6d753a744e333b7e34b9cf687040fba57d
> category: bugfix
> bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9BV4C
> CVE: CVE-2023-52624
> 
> Reference: 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2ef98c6d753a744e333b7e34b9cf687040fba57d
> 
> 
> 
> [ Upstream commit e5ffd1263dd5b44929c676171802e7b6af483f21 ]
> 
> [Why]
> DMCUB can be in idle when we attempt to interface with the HW through
> the GPINT mailbox resulting in a system hang.
> 
> [How]
> Add dc_wake_and_execute_gpint() to wrap the wake, execute, sleep
> sequence.
> 
> If the GPINT executes successfully then DMCUB will be put back into
> sleep after the optional response is returned.
> 
> It functions similar to the inbox command interface.
> 
> Cc: Mario Limonciello 
> Cc: Alex Deucher 
> Cc: sta...@vger.kernel.org
> Reviewed-by: Hansen Dsouza 
> Acked-by: Wayne Lin 
> Signed-off-by: Nicholas Kazlauskas 
> Tested-by: Daniel Wheeler 
> Signed-off-by: Alex Deucher 
> 
> This commit comes from following commits:
> 
>  8774029f76b9 ("drm/amd/display: Add DCN35 CLK_MGR")
>  65138eb72e1f ("drm/amd/display: Add DCN35 DMUB")
>  dc01c4b79bfe ("drm/amd/display: Update driver and IPS interop")
>  820c3870c491 ("drm/amd/display: Refactor DMCUB enter/exit idle interface")
>  2ef98c6d753a ("drm/amd/display: Wake DMCUB before executing GPINT commands")

Why are you putting multiple commits together and not just submitting
the individual ones?  And what is this for?

confused,

greg k-h