Re: sna: buffer overrun

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

 



On Sun, Nov 03, 2013 at 11:06:55PM +0100, Mark Kettenis wrote:
> Fixed it the same way here, and things seem stable enough.  So I guess
> that's a:
> 
> Tested-by: Mark Kettenis <kettenis@xxxxxxxxxxx>
> Reviewed-by: Mark Kettenis <kettenis@xxxxxxxxxxx>

Thanks very much,

commit 7050c8da56676b60a602dce9abbdb61a7c4fa61e
Author: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Date:   Mon Nov 4 09:31:05 2013 +0000

    sna: Use the unoptimized pwrite for general buffers
    
    When we call kgem_bo_write() we have less control over the allocation of
    the buffer, and do not ensure it meets the alignment criteria required
    for the cacheline optimisation. So use the simple pwrite routine to
    avoid reading beyond the end of the allocation.
    
    Reported-and-tested-by: Mark Kettenis <mark.kettenis@xxxxxxxxx>
    Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

commit 8d067e961920e19fda7e9990440ac2be1a2e1760
Author: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Date:   Mon Nov 4 09:34:25 2013 +0000

    sna: Rename the two variants of pwrite so their relative dangers are obvious
    
    Since we extend the write in the cache-aligned routine, it runs the risk
    of reading from beyond the end of the allocation. As such, callers
    should be carefully vetted to make sure that their allocations are
    already cache-aligned (typically page-aligned). To make it obvious that
    this complexity exists, rename the routine.
    
    Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
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