Re: [PATCH 1/8] drm/edid: Check the number of detailed timing descriptors in the CEA ext block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 28, 2020 at 04:17:58PM +0100, Daniel Vetter wrote:
> On Fri, Jan 24, 2020 at 10:02:24PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > 
> > CEA-861 says :
> > "d = offset for the byte following the reserved data block.
> >  If no data is provided in the reserved data block, then d=4.
> >  If no DTDs are provided, then d=0."
> > 
> > So let's not look for DTDs when d==0. In fact let's just make that
> > <4 since those values would just mean that he DTDs overlap the block
> > header. And let's also check that d isn't so big as to declare
> > the descriptors to live past the block end, although the code
> > does already survive that case as we'd just end up with a negative
> > number of descriptors and the loop would not do anything.
> > 
> > Cc: Allen Chen <allen.chen@xxxxxxxxxx>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> Hm I think edid parsing is like the perfect use-case for some in-kernel
> unit tests ... In case anyone feels motivated?

Another idea I've been putting off is simply shoving the parser into
userspace. Kinda looks like with fork_usermode_blob() we could embed
the executable into the kernel/module and thus avoid the problem of
actually shipping the binary somehow.

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux