Re: [PATCH 2/5] drm/i915: fix intel_dp_aux_native_read's reply array size

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

 



2013/9/13 Damien Lespiau <damien.lespiau@xxxxxxxxx>:
> On Fri, Sep 13, 2013 at 04:41:42PM +0300, Jani Nikula wrote:
>> On Fri, 13 Sep 2013, Damien Lespiau <damien.lespiau@xxxxxxxxx> wrote:
>> > On Fri, Sep 13, 2013 at 12:21:21PM +0300, Jani Nikula wrote:
>> >> On Fri, 13 Sep 2013, Paulo Zanoni <przanoni@xxxxxxxxx> wrote:
>> >> > From: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
>> >> >
>> >> > So far we control all the reads an none of them exceeds the current
>> >> > limit of 20 bytes, but we never think about this when reviewing
>> >> > patches, so we may at some point in the future overflow the buffer.
>> >> >
>> >> > My initial patch just added a WARN in case we were about to overflow
>> >> > the buffer, but Chris suggested to make the size of the array dynamic.
>> >>
>> >> VLA on stack in kernel gives me an uneasy feeling, but I'll survive.
>> >
>> > IIRC sparse will complain about this. Might worth double checking.
>>
>> True.
>>
>>   CHECK   drivers/gpu/drm/i915/intel_dp.c
>> drivers/gpu/drm/i915/intel_dp.c:567:34: error: bad constant expression
>
> Also,
>
> https://lkml.org/lkml/2013/3/8/486

I just realized 20 bytes is really the maximum since we only have 5
data registers, so I'll bring back v1 of the patch, but with 2
additional checks: one spotted by Jani and one in intel_dp_aux_ch.

>
> --
> Damein



-- 
Paulo Zanoni
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux