Re: [PATCH] Properly size the leafsize field in the mdrestore_struct struct.

2014-06-24 Thread David Sterba
On Tue, Jun 24, 2014 at 08:12:30AM +0900, Satoru Takeuchi wrote: > (2014/06/23 22:44), David Sterba wrote: > >On Wed, Jun 18, 2014 at 03:01:32PM +0900, Satoru Takeuchi wrote: > >>(2014/06/13 7:57), Adam Buchbinder wrote: > >>>It's 32 bits as defined in ctree.h, but the struct had it as 64 bits. > >

Re: [PATCH] Properly size the leafsize field in the mdrestore_struct struct.

2014-06-23 Thread Satoru Takeuchi
(2014/06/23 22:44), David Sterba wrote: On Wed, Jun 18, 2014 at 03:01:32PM +0900, Satoru Takeuchi wrote: (2014/06/13 7:57), Adam Buchbinder wrote: It's 32 bits as defined in ctree.h, but the struct had it as 64 bits. Found using MemorySanitizer. Signed-off-by: Adam Buchbinder It looks good

Re: [PATCH] Properly size the leafsize field in the mdrestore_struct struct.

2014-06-23 Thread David Sterba
On Wed, Jun 18, 2014 at 03:01:32PM +0900, Satoru Takeuchi wrote: > (2014/06/13 7:57), Adam Buchbinder wrote: > > It's 32 bits as defined in ctree.h, but the struct had it as 64 bits. > > > > Found using MemorySanitizer. > > > > Signed-off-by: Adam Buchbinder > > It looks good to me. > > Signed

Re: [PATCH] Properly size the leafsize field in the mdrestore_struct struct.

2014-06-17 Thread Satoru Takeuchi
Hi Adam, (2014/06/13 7:57), Adam Buchbinder wrote: > It's 32 bits as defined in ctree.h, but the struct had it as 64 bits. > > Found using MemorySanitizer. > > Signed-off-by: Adam Buchbinder It looks good to me. Signed-off-by: Satoru Takeuchi Thanks, Satoru > --- > btrfs-image.c | 2 +- >

Re: [PATCH] Properly size the leafsize field in the mdrestore_struct struct.

2014-06-13 Thread Adam Buchbinder
I'd like to follow up on this a bit, because the way I found it was *weird*. MSan found an uninitialized write. Reproducing the issue through GDB showed that there's a struct mdrestore_struct type with a member of type u64 called 'leafsize' which was... half-initialized? Four bytes were uninitiali

[PATCH] Properly size the leafsize field in the mdrestore_struct struct.

2014-06-12 Thread Adam Buchbinder
It's 32 bits as defined in ctree.h, but the struct had it as 64 bits. Found using MemorySanitizer. Signed-off-by: Adam Buchbinder --- btrfs-image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btrfs-image.c b/btrfs-image.c index cf1fe2d..98d765a 100644 --- a/btrfs-image.c