Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-02 Thread Martin K. Petersen
> "Kent" == Kent Overstreet writes: >> > + *bp->bip1.bip_vec = bip->bip_vec[0]; >> > + *bp->bip2.bip_vec = bip->bip_vec[0]; >> >> I think this is horrible. Yep. >> Why not introduce bvec pointer in bip (like bio), to cover the case >> when bvec are not inline. Kent> That's... exactly

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-02 Thread Kent Overstreet
On Tue, Oct 02, 2012 at 05:58:45PM -0400, Vivek Goyal wrote: > On Tue, Oct 02, 2012 at 02:01:43PM -0700, Kent Overstreet wrote: > > I'm honestly not sure what your complaint about my bugfix patch was - > > it's small and complete, it does fix the bug. I don't follow why you > > think we need to

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-02 Thread Vivek Goyal
On Tue, Oct 02, 2012 at 02:01:43PM -0700, Kent Overstreet wrote: > On Tue, Oct 02, 2012 at 04:32:53PM -0400, Vivek Goyal wrote: > > On Tue, Oct 02, 2012 at 01:26:43PM -0700, Kent Overstreet wrote: > > > On Tue, Oct 02, 2012 at 10:08:47AM -0400, Vivek Goyal wrote: > > > > On Mon, Oct 01, 2012 at

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-02 Thread Kent Overstreet
On Tue, Oct 02, 2012 at 04:32:53PM -0400, Vivek Goyal wrote: > On Tue, Oct 02, 2012 at 01:26:43PM -0700, Kent Overstreet wrote: > > On Tue, Oct 02, 2012 at 10:08:47AM -0400, Vivek Goyal wrote: > > > On Mon, Oct 01, 2012 at 02:42:41PM -0700, Kent Overstreet wrote: > > > > > > [..] > > > > Here's

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-02 Thread Vivek Goyal
On Tue, Oct 02, 2012 at 01:26:43PM -0700, Kent Overstreet wrote: > On Tue, Oct 02, 2012 at 10:08:47AM -0400, Vivek Goyal wrote: > > On Mon, Oct 01, 2012 at 02:42:41PM -0700, Kent Overstreet wrote: > > > > [..] > > > Here's the new patch: > > > > > > > > > commit

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-02 Thread Kent Overstreet
On Tue, Oct 02, 2012 at 10:08:47AM -0400, Vivek Goyal wrote: > On Mon, Oct 01, 2012 at 02:42:41PM -0700, Kent Overstreet wrote: > > [..] > > Here's the new patch: > > > > > > commit e270c9ca843b5c86d59431b0d7a676b7846946d6 > > Author: Kent Overstreet > > Date: Mon Oct 1 14:41:08 2012 -0700 >

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-02 Thread Vivek Goyal
On Mon, Oct 01, 2012 at 02:42:41PM -0700, Kent Overstreet wrote: [..] > Here's the new patch: > > > commit e270c9ca843b5c86d59431b0d7a676b7846946d6 > Author: Kent Overstreet > Date: Mon Oct 1 14:41:08 2012 -0700 > > block: Fix a buffer overrun in bio_integrity_split() > >

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-02 Thread Vivek Goyal
On Mon, Oct 01, 2012 at 02:42:41PM -0700, Kent Overstreet wrote: [..] Here's the new patch: commit e270c9ca843b5c86d59431b0d7a676b7846946d6 Author: Kent Overstreet koverstr...@google.com Date: Mon Oct 1 14:41:08 2012 -0700 block: Fix a buffer overrun in bio_integrity_split()

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-02 Thread Kent Overstreet
On Tue, Oct 02, 2012 at 10:08:47AM -0400, Vivek Goyal wrote: On Mon, Oct 01, 2012 at 02:42:41PM -0700, Kent Overstreet wrote: [..] Here's the new patch: commit e270c9ca843b5c86d59431b0d7a676b7846946d6 Author: Kent Overstreet koverstr...@google.com Date: Mon Oct 1 14:41:08 2012

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-02 Thread Vivek Goyal
On Tue, Oct 02, 2012 at 01:26:43PM -0700, Kent Overstreet wrote: On Tue, Oct 02, 2012 at 10:08:47AM -0400, Vivek Goyal wrote: On Mon, Oct 01, 2012 at 02:42:41PM -0700, Kent Overstreet wrote: [..] Here's the new patch: commit e270c9ca843b5c86d59431b0d7a676b7846946d6 Author:

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-02 Thread Kent Overstreet
On Tue, Oct 02, 2012 at 04:32:53PM -0400, Vivek Goyal wrote: On Tue, Oct 02, 2012 at 01:26:43PM -0700, Kent Overstreet wrote: On Tue, Oct 02, 2012 at 10:08:47AM -0400, Vivek Goyal wrote: On Mon, Oct 01, 2012 at 02:42:41PM -0700, Kent Overstreet wrote: [..] Here's the new patch:

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-02 Thread Vivek Goyal
On Tue, Oct 02, 2012 at 02:01:43PM -0700, Kent Overstreet wrote: On Tue, Oct 02, 2012 at 04:32:53PM -0400, Vivek Goyal wrote: On Tue, Oct 02, 2012 at 01:26:43PM -0700, Kent Overstreet wrote: On Tue, Oct 02, 2012 at 10:08:47AM -0400, Vivek Goyal wrote: On Mon, Oct 01, 2012 at 02:42:41PM

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-02 Thread Kent Overstreet
On Tue, Oct 02, 2012 at 05:58:45PM -0400, Vivek Goyal wrote: On Tue, Oct 02, 2012 at 02:01:43PM -0700, Kent Overstreet wrote: I'm honestly not sure what your complaint about my bugfix patch was - it's small and complete, it does fix the bug. I don't follow why you think we need to introduce

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-02 Thread Martin K. Petersen
Kent == Kent Overstreet koverstr...@google.com writes: + *bp-bip1.bip_vec = bip-bip_vec[0]; + *bp-bip2.bip_vec = bip-bip_vec[0]; I think this is horrible. Yep. Why not introduce bvec pointer in bip (like bio), to cover the case when bvec are not inline. Kent That's... exactly what

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-01 Thread Kent Overstreet
On Mon, Oct 01, 2012 at 05:23:36PM -0400, Vivek Goyal wrote: > On Mon, Sep 24, 2012 at 03:34:41PM -0700, Kent Overstreet wrote: > > bio_integrity_split() seemed to be confusing pointers and arrays - > > bip_vec in bio_integrity_payload is an array appended to the end of the > > payload, so the

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-01 Thread Kent Overstreet
On Mon, Oct 01, 2012 at 05:23:36PM -0400, Vivek Goyal wrote: > On Mon, Sep 24, 2012 at 03:34:41PM -0700, Kent Overstreet wrote: > > bio_integrity_split() seemed to be confusing pointers and arrays - > > bip_vec in bio_integrity_payload is an array appended to the end of the > > payload, so the

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-01 Thread Vivek Goyal
On Mon, Sep 24, 2012 at 03:34:41PM -0700, Kent Overstreet wrote: > bio_integrity_split() seemed to be confusing pointers and arrays - > bip_vec in bio_integrity_payload is an array appended to the end of the > payload, so the bio_vecs in struct bio_pair need to come immediately > after the

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-01 Thread Vivek Goyal
On Mon, Sep 24, 2012 at 03:34:41PM -0700, Kent Overstreet wrote: bio_integrity_split() seemed to be confusing pointers and arrays - bip_vec in bio_integrity_payload is an array appended to the end of the payload, so the bio_vecs in struct bio_pair need to come immediately after the

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-01 Thread Kent Overstreet
On Mon, Oct 01, 2012 at 05:23:36PM -0400, Vivek Goyal wrote: On Mon, Sep 24, 2012 at 03:34:41PM -0700, Kent Overstreet wrote: bio_integrity_split() seemed to be confusing pointers and arrays - bip_vec in bio_integrity_payload is an array appended to the end of the payload, so the bio_vecs

Re: [dm-devel] [PATCH v3 01/26] block: Fix a buffer overrun in bio_integrity_split()

2012-10-01 Thread Kent Overstreet
On Mon, Oct 01, 2012 at 05:23:36PM -0400, Vivek Goyal wrote: On Mon, Sep 24, 2012 at 03:34:41PM -0700, Kent Overstreet wrote: bio_integrity_split() seemed to be confusing pointers and arrays - bip_vec in bio_integrity_payload is an array appended to the end of the payload, so the bio_vecs