Bruce, As mentioned in previous mail, this has two problems,
1) Running via_verify_command_stream on an AGP buffer is dead slow. 2) User-space could sneak in and modify the buffer after the security check. /Thomas. [email protected] wrote: > Hello All: > This is patch 5 of the 5 patches. It's based on > 2.6.32-rc3+patch1+patch2+patch3+patch4. It adds verification for video > command flush. > > 1 file has been modified for this patch. > > Sign-off by Bruce C. Chang <[email protected]> > diff -Nur linux-2.6.32-rc3-old/drivers/gpu/drm/via/via_dma.c > linux-2.6.32-rc3-new/drivers/gpu/drm/via/via_dma.c > --- linux-2.6.32-rc3-old/drivers/gpu/drm/via/via_dma.c 2009-10-08 > 10:19:59.000000000 +0800 > +++ linux-2.6.32-rc3-new/drivers/gpu/drm/via/via_dma.c 2009-10-08 > 10:20:08.000000000 +0800 > @@ -419,7 +419,7 @@ > u32 pause_addr, pause_addr_hi, pause_addr_lo; > u32 *cur_virtual; > u32 command; > - int i = 0; > + int i = 0, ret; > struct drm_local_map map; > > LOCK_TEST_WITH_RETURN(dev, file_priv); > @@ -499,6 +499,10 @@ > } > } > > + ret = via_verify_command_stream((uint32_t *) map.handle, > + cmdbuf_info.cmd_size, dev, 1); > + if (ret) > + return ret; > cur_virtual = map.handle + cmdbuf_info.cmd_size; > > VIA_OUT_VIDEO_AGP_BUFFER(HC_HEADER2 | ((VIA_REG_TRANSET >> 2) << 12) | > > Thanks and Best regards > ================================================= > Bruce C. Chang(張祖明) > VIA Technologies, Inc. > Address: 1F, 531, Chung-Cheng Road, Hsin-Tien, 231 Taipei > Tel: +886-2-22185452 Ext 7323 > Mobile: +886-968343824 > Fax: +886-2-22186282 > Skype: Bruce.C.Chang > Email: [email protected] > ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
