[Intel-gfx] [PATCH 1/2] drm/i915: Allow parsing of variable size child device entries from VBT

Daniel Vetter daniel at ffwll.ch
Tue Jul 14 01:01:07 PDT 2015


On Tue, Jul 14, 2015 at 10:11:37AM +0300, David Weinehall wrote:
> On Mon, Jul 13, 2015 at 11:24:46AM +0200, Daniel Vetter wrote:
> > On Fri, Jul 10, 2015 at 02:10:54PM +0300, Antti Koskipaa wrote:
> > > VBT version 196 increased the size of common_child_dev_config. The parser
> > > code assumed that the size of this structure would not change.
> > > 
> > > So now, instead of checking for smaller size, check that the VBT entry is
> > > not too large and memcpy only child_dev_size amount of data, leaving any
> > > trailing entries as zero. If this is not good enough for the future,
> > > we can always sprinkle extra version checks in there.
> > > 
> > > Signed-off-by: Antti Koskipaa <antti.koskipaa at linux.intel.com>
> > 
> > As I mentioned in the other threads I think with vbt it's not too paranoid
> > to double-check our assumptions. So for each vbt version range I'd like us
> > to check what size we exactly expect. Being super paranoid with vbt is imo
> > good practice since otherwise the hw teams will sneak in another update
> > without us realizing it.
> 
> Antti's on vacation now for the next few weeks.  Do you need these
> modifications as a pre-requisite for merging his patch, or can further
> improvements be submitted separately?

This patch starts to make our vbt checking lax. I don't want to walk down
this road really, so yes I prefer if we just keep on having really strict
checks.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list