lkml.org 
[lkml]   [2022]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/1] video: hyperv_fb: Fix validation of screen resolution
From
On 1/24/22 14:31, Wei Liu wrote:
> On Mon, Jan 24, 2022 at 10:52:22AM +0100, Helge Deller wrote:
>> On 1/23/22 23:30, Wei Liu wrote:
>>> On Sun, Jan 23, 2022 at 10:27:56PM +0000, Michael Kelley (LINUX) wrote:
>>>> From: Wei Liu <wei.liu@kernel.org> Sent: Sunday, January 23, 2022 1:56 PM
>>>>>
>>>>> On Sun, Jan 16, 2022 at 09:53:06PM +0000, Haiyang Zhang wrote:
>>>>>>
>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Michael Kelley (LINUX) <mikelley@microsoft.com>
>>>>>>> Sent: Sunday, January 16, 2022 2:19 PM
>>>>>>> To: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
>>>>> <haiyangz@microsoft.com>; Stephen
>>>>>>> Hemminger <sthemmin@microsoft.com>; wei.liu@kernel.org; Wei Hu
>>>>> <weh@microsoft.com>; Dexuan
>>>>>>> Cui <decui@microsoft.com>; drawat.floss@gmail.com; hhei <hhei@redhat.com>;
>>>>> linux-
>>>>>>> kernel@vger.kernel.org; linux-hyperv@vger.kernel.org; linux-
>>>>> fbdev@vger.kernel.org; dri-
>>>>>>> devel@lists.freedesktop.org
>>>>>>> Cc: Michael Kelley (LINUX) <mikelley@microsoft.com>
>>>>>>> Subject: [PATCH 1/1] video: hyperv_fb: Fix validation of screen resolution
>>>>>>>
>>>>>>> In the WIN10 version of the Synthetic Video protocol with Hyper-V,
>>>>>>> Hyper-V reports a list of supported resolutions as part of the protocol
>>>>>>> negotiation. The driver calculates the maximum width and height from
>>>>>>> the list of resolutions, and uses those maximums to validate any screen
>>>>>>> resolution specified in the video= option on the kernel boot line.
>>>>>>>
>>>>>>> This method of validation is incorrect. For example, the list of
>>>>>>> supported resolutions could contain 1600x1200 and 1920x1080, both of
>>>>>>> which fit in an 8 Mbyte frame buffer. But calculating the max width
>>>>>>> and height yields 1920 and 1200, and 1920x1200 resolution does not fit
>>>>>>> in an 8 Mbyte frame buffer. Unfortunately, this resolution is accepted,
>>>>>>> causing a kernel fault when the driver accesses memory outside the
>>>>>>> frame buffer.
>>>>>>>
>>>>>>> Instead, validate the specified screen resolution by calculating
>>>>>>> its size, and comparing against the frame buffer size. Delete the
>>>>>>> code for calculating the max width and height from the list of
>>>>>>> resolutions, since these max values have no use. Also add the
>>>>>>> frame buffer size to the info message to aid in understanding why
>>>>>>> a resolution might be rejected.
>>>>>>>
>>>>>>> Fixes: 67e7cdb4829d ("video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V
>>>>>>> host")
>>>>>>> Signed-off-by: Michael Kelley <mikelley@microsoft.com>
>>>>> [...]
>>>>>>
>>>>>> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
>>>>>>
>>>>>
>>>>> Applied to hyperv-fixes. Thanks.
>>>>
>>>> This fix got pulled into the fbdev/for-next tree by a new maintainer, Helge Deller.
>>>> See https://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git/commit/?h=for-next&id=bcc48f8d980b12e66a3d59dfa1041667db971d86
>>>
>>> OK. I will drop it from hyperv-fixes. Thanks for letting me know!
>>
>> Linus hasn't pulled my tree yet, and he will probably not before the
>> next merge window. So, if this is an urgent bugfix for you, I can offer
>> to drop it from the fbdev tree and that you take it through the hyperv-fixes tree.
>> In that case you may add an Acked-by: Helge Deller <deller@gmx.de>.
>> Just let me know what you prefer.
>
> Hi Helge
>
> Yes, I would like to upstream it as soon as possible so that it can
> propagate to stable trees and be backported by downstream vendors.
>
> I will pick it up in hyperv-fixes. Please drop it from your for-next
> tree.

Dropped now from fbdev tree.

Thanks!
Helge

\
 
 \ /
  Last update: 2022-01-24 14:51    [W:0.068 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site