Re: [PATCH] target/user: Fix possible overwrite of t_data_sg's lastiov[]

2017-03-09 Thread Ilias Tsitsimpis
Hi Andy, Xiubo, On Fri, Mar 03, 2017 at 11:00AM, Andy Grover wrote: > On 02/27/2017 09:47 PM, lixi...@cmss.chinamobile.com wrote: > > From: Xiubo Li > > > > If there has BIDI data, its first iov[] will overwrite the last > > iov[] for se_cmd->t_data_sg. > >

Re: [PATCH] target/user: Fix possible overwrite of t_data_sg's lastiov[]

2017-03-06 Thread Andy Grover
On 03/05/2017 09:48 PM, Xiubo Li wrote: Maybe fix this by exiting aasda() with iov pointing at the next unused iov in the array? May it shouldn't be the aasda()'s duty to increment the iov ptr. Sure, your call. [snip text where we agree current solution allows data block sharing, and new

Re: [PATCH] target/user: Fix possible overwrite of t_data_sg's lastiov[]

2017-03-05 Thread Xiubo Li
On 02/27/2017 09:47 PM, lixi...@cmss.chinamobile.com wrote: From: Xiubo Li If there has BIDI data, its first iov[] will overwrite the last iov[] for se_cmd->t_data_sg. (+CCing orig BIDI and data block code authors) Yeah. It looks like because