From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <527AB51B.1020005@nod.at> Date: Wed, 06 Nov 2013 22:31:07 +0100 From: Richard Weinberger MIME-Version: 1.0 References: <526696BF.6050909@gmx.de> <5266A698.10400@gmx.de> <5266B60A.1000005@nod.at> <52715AD1.7000703@gmx.de> <527AB23D.2060305@gmx.de> In-Reply-To: <527AB23D.2060305@gmx.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: linux-kernel-owner@vger.kernel.org Subject: Re: [uml-devel] fuzz tested 32 bit user mode linux image hangs in radix_tree_next_chunk() To: =?UTF-8?B?VG9yYWxmIEbDtnJzdGVy?= Cc: Konstantin Khlebnikov , Linux Kernel , linux-fsdevel , "linux-mm@kvack.org" , UML devel List-ID: Am 06.11.2013 22:18, schrieb Toralf F=C3=B6rster: > On 11/06/2013 05:06 PM, Konstantin Khlebnikov wrote: >> In this case it must stop after scanning whole tree in line: >> /* Overflow after ~0UL */ >> if (!index) >> return NULL; >> >=20 > A fresh current example with latest git tree shows that lines 769 and= 770 do alternate : Can you please ask gdb for the value of offset? Thanks, //richard >=20 > tfoerste@n22 ~/devel/linux $ sudo gdb /usr/local/bin/linux-v3.12-48-g= be408cd 16619 -n -batch -ex bt > 0x08296a8c in radix_tree_next_chunk (root=3D0x25, iter=3D0x462e7c64, = flags=3D12) at lib/radix-tree.c:770 > 770 if (node->slots[offse= t]) > #0 0x08296a8c in radix_tree_next_chunk (root=3D0x25, iter=3D0x462e7c= 64, flags=3D12) at lib/radix-tree.c:770 > #1 0x080cc1fe in find_get_pages (mapping=3D0x462ad470, start=3D0, nr= _pages=3D14, pages=3D0xc) at mm/filemap.c:844 > #2 0x080d5d6a in pagevec_lookup (pvec=3D0x462e7cc8, mapping=3D0x25, = start=3D37, nr_pages=3D37) at mm/swap.c:914 > #3 0x080d615a in truncate_inode_pages_range (mapping=3D0x462ad470, l= start=3D0, lend=3D-1) at mm/truncate.c:241 > #4 0x080d64ff in truncate_inode_pages (mapping=3D0x25, lstart=3D5153= 9607589) at mm/truncate.c:358 >=20 >=20 >=20 >=20 > tfoerste@n22 ~/devel/linux $ sudo gdb /usr/local/bin/linux-v3.12-48-g= be408cd 16619 -n -batch -ex bt > radix_tree_next_chunk (root=3D0x28, iter=3D0x462e7c64, flags=3D18) at= lib/radix-tree.c:769 > 769 while (++offset < RADIX_TREE_= MAP_SIZE) { > #0 radix_tree_next_chunk (root=3D0x28, iter=3D0x462e7c64, flags=3D18= ) at lib/radix-tree.c:769 > #1 0x080cc1fe in find_get_pages (mapping=3D0x462ad470, start=3D0, nr= _pages=3D14, pages=3D0x12) at mm/filemap.c:844 > #2 0x080d5d6a in pagevec_lookup (pvec=3D0x462e7cc8, mapping=3D0x28, = start=3D40, nr_pages=3D40) at mm/swap.c:914 > #3 0x080d615a in truncate_inode_pages_range (mapping=3D0x462ad470, l= start=3D0, lend=3D-1) at mm/truncate.c:241 > #4 0x080d64ff in truncate_inode_pages (mapping=3D0x28, lstart=3D7730= 9411368) at mm/truncate.c:358 > #5 0x0825e388 in hostfs_evict_inode (inode=3D0x462ad3b8) at fs/hostf= s/hostfs_kern.c:242 > #6 0x0811a8df in evict (inode=3D0x462ad3b8) at fs/inode.c:549 >=20 >=20 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"= in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Weinberger Subject: Re: [uml-devel] fuzz tested 32 bit user mode linux image hangs in radix_tree_next_chunk() Date: Wed, 06 Nov 2013 22:31:07 +0100 Message-ID: <527AB51B.1020005@nod.at> References: <526696BF.6050909@gmx.de> <5266A698.10400@gmx.de> <5266B60A.1000005@nod.at> <52715AD1.7000703@gmx.de> <527AB23D.2060305@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Konstantin Khlebnikov , Linux Kernel , linux-fsdevel , "linux-mm@kvack.org" , UML devel To: =?UTF-8?B?VG9yYWxmIEbDtnJzdGVy?= Return-path: In-Reply-To: <527AB23D.2060305@gmx.de> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org Am 06.11.2013 22:18, schrieb Toralf F=C3=B6rster: > On 11/06/2013 05:06 PM, Konstantin Khlebnikov wrote: >> In this case it must stop after scanning whole tree in line: >> /* Overflow after ~0UL */ >> if (!index) >> return NULL; >> >=20 > A fresh current example with latest git tree shows that lines 769 and 7= 70 do alternate : Can you please ask gdb for the value of offset? Thanks, //richard >=20 > tfoerste@n22 ~/devel/linux $ sudo gdb /usr/local/bin/linux-v3.12-48-gbe= 408cd 16619 -n -batch -ex bt > 0x08296a8c in radix_tree_next_chunk (root=3D0x25, iter=3D0x462e7c64, fl= ags=3D12) at lib/radix-tree.c:770 > 770 if (node->slots[offset]= ) > #0 0x08296a8c in radix_tree_next_chunk (root=3D0x25, iter=3D0x462e7c64= , flags=3D12) at lib/radix-tree.c:770 > #1 0x080cc1fe in find_get_pages (mapping=3D0x462ad470, start=3D0, nr_p= ages=3D14, pages=3D0xc) at mm/filemap.c:844 > #2 0x080d5d6a in pagevec_lookup (pvec=3D0x462e7cc8, mapping=3D0x25, st= art=3D37, nr_pages=3D37) at mm/swap.c:914 > #3 0x080d615a in truncate_inode_pages_range (mapping=3D0x462ad470, lst= art=3D0, lend=3D-1) at mm/truncate.c:241 > #4 0x080d64ff in truncate_inode_pages (mapping=3D0x25, lstart=3D515396= 07589) at mm/truncate.c:358 >=20 >=20 >=20 >=20 > tfoerste@n22 ~/devel/linux $ sudo gdb /usr/local/bin/linux-v3.12-48-gbe= 408cd 16619 -n -batch -ex bt > radix_tree_next_chunk (root=3D0x28, iter=3D0x462e7c64, flags=3D18) at l= ib/radix-tree.c:769 > 769 while (++offset < RADIX_TREE_MA= P_SIZE) { > #0 radix_tree_next_chunk (root=3D0x28, iter=3D0x462e7c64, flags=3D18) = at lib/radix-tree.c:769 > #1 0x080cc1fe in find_get_pages (mapping=3D0x462ad470, start=3D0, nr_p= ages=3D14, pages=3D0x12) at mm/filemap.c:844 > #2 0x080d5d6a in pagevec_lookup (pvec=3D0x462e7cc8, mapping=3D0x28, st= art=3D40, nr_pages=3D40) at mm/swap.c:914 > #3 0x080d615a in truncate_inode_pages_range (mapping=3D0x462ad470, lst= art=3D0, lend=3D-1) at mm/truncate.c:241 > #4 0x080d64ff in truncate_inode_pages (mapping=3D0x28, lstart=3D773094= 11368) at mm/truncate.c:358 > #5 0x0825e388 in hostfs_evict_inode (inode=3D0x462ad3b8) at fs/hostfs/= hostfs_kern.c:242 > #6 0x0811a8df in evict (inode=3D0x462ad3b8) at fs/inode.c:549 >=20 >=20 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by kanga.kvack.org (Postfix) with ESMTP id 1D14A6B0106 for ; Wed, 6 Nov 2013 16:31:16 -0500 (EST) Received: by mail-pa0-f41.google.com with SMTP id rd3so266531pab.0 for ; Wed, 06 Nov 2013 13:31:15 -0800 (PST) Received: from psmtp.com ([74.125.245.146]) by mx.google.com with SMTP id gj2si499051pac.80.2013.11.06.13.31.12 for ; Wed, 06 Nov 2013 13:31:13 -0800 (PST) Message-ID: <527AB51B.1020005@nod.at> Date: Wed, 06 Nov 2013 22:31:07 +0100 From: Richard Weinberger MIME-Version: 1.0 Subject: Re: [uml-devel] fuzz tested 32 bit user mode linux image hangs in radix_tree_next_chunk() References: <526696BF.6050909@gmx.de> <5266A698.10400@gmx.de> <5266B60A.1000005@nod.at> <52715AD1.7000703@gmx.de> <527AB23D.2060305@gmx.de> In-Reply-To: <527AB23D.2060305@gmx.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: owner-linux-mm@kvack.org List-ID: To: =?UTF-8?B?VG9yYWxmIEbDtnJzdGVy?= Cc: Konstantin Khlebnikov , Linux Kernel , linux-fsdevel , "linux-mm@kvack.org" , UML devel Am 06.11.2013 22:18, schrieb Toralf FA?rster: > On 11/06/2013 05:06 PM, Konstantin Khlebnikov wrote: >> In this case it must stop after scanning whole tree in line: >> /* Overflow after ~0UL */ >> if (!index) >> return NULL; >> > > A fresh current example with latest git tree shows that lines 769 and 770 do alternate : Can you please ask gdb for the value of offset? Thanks, //richard > > tfoerste@n22 ~/devel/linux $ sudo gdb /usr/local/bin/linux-v3.12-48-gbe408cd 16619 -n -batch -ex bt > 0x08296a8c in radix_tree_next_chunk (root=0x25, iter=0x462e7c64, flags=12) at lib/radix-tree.c:770 > 770 if (node->slots[offset]) > #0 0x08296a8c in radix_tree_next_chunk (root=0x25, iter=0x462e7c64, flags=12) at lib/radix-tree.c:770 > #1 0x080cc1fe in find_get_pages (mapping=0x462ad470, start=0, nr_pages=14, pages=0xc) at mm/filemap.c:844 > #2 0x080d5d6a in pagevec_lookup (pvec=0x462e7cc8, mapping=0x25, start=37, nr_pages=37) at mm/swap.c:914 > #3 0x080d615a in truncate_inode_pages_range (mapping=0x462ad470, lstart=0, lend=-1) at mm/truncate.c:241 > #4 0x080d64ff in truncate_inode_pages (mapping=0x25, lstart=51539607589) at mm/truncate.c:358 > > > > > tfoerste@n22 ~/devel/linux $ sudo gdb /usr/local/bin/linux-v3.12-48-gbe408cd 16619 -n -batch -ex bt > radix_tree_next_chunk (root=0x28, iter=0x462e7c64, flags=18) at lib/radix-tree.c:769 > 769 while (++offset < RADIX_TREE_MAP_SIZE) { > #0 radix_tree_next_chunk (root=0x28, iter=0x462e7c64, flags=18) at lib/radix-tree.c:769 > #1 0x080cc1fe in find_get_pages (mapping=0x462ad470, start=0, nr_pages=14, pages=0x12) at mm/filemap.c:844 > #2 0x080d5d6a in pagevec_lookup (pvec=0x462e7cc8, mapping=0x28, start=40, nr_pages=40) at mm/swap.c:914 > #3 0x080d615a in truncate_inode_pages_range (mapping=0x462ad470, lstart=0, lend=-1) at mm/truncate.c:241 > #4 0x080d64ff in truncate_inode_pages (mapping=0x28, lstart=77309411368) at mm/truncate.c:358 > #5 0x0825e388 in hostfs_evict_inode (inode=0x462ad3b8) at fs/hostfs/hostfs_kern.c:242 > #6 0x0811a8df in evict (inode=0x462ad3b8) at fs/inode.c:549 > > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756666Ab3KFVbN (ORCPT ); Wed, 6 Nov 2013 16:31:13 -0500 Received: from b.ns.miles-group.at ([95.130.255.144]:1660 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752930Ab3KFVbL (ORCPT ); Wed, 6 Nov 2013 16:31:11 -0500 Message-ID: <527AB51B.1020005@nod.at> Date: Wed, 06 Nov 2013 22:31:07 +0100 From: Richard Weinberger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: =?UTF-8?B?VG9yYWxmIEbDtnJzdGVy?= CC: Konstantin Khlebnikov , Linux Kernel , linux-fsdevel , "linux-mm@kvack.org" , UML devel Subject: Re: [uml-devel] fuzz tested 32 bit user mode linux image hangs in radix_tree_next_chunk() References: <526696BF.6050909@gmx.de> <5266A698.10400@gmx.de> <5266B60A.1000005@nod.at> <52715AD1.7000703@gmx.de> <527AB23D.2060305@gmx.de> In-Reply-To: <527AB23D.2060305@gmx.de> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 06.11.2013 22:18, schrieb Toralf Förster: > On 11/06/2013 05:06 PM, Konstantin Khlebnikov wrote: >> In this case it must stop after scanning whole tree in line: >> /* Overflow after ~0UL */ >> if (!index) >> return NULL; >> > > A fresh current example with latest git tree shows that lines 769 and 770 do alternate : Can you please ask gdb for the value of offset? Thanks, //richard > > tfoerste@n22 ~/devel/linux $ sudo gdb /usr/local/bin/linux-v3.12-48-gbe408cd 16619 -n -batch -ex bt > 0x08296a8c in radix_tree_next_chunk (root=0x25, iter=0x462e7c64, flags=12) at lib/radix-tree.c:770 > 770 if (node->slots[offset]) > #0 0x08296a8c in radix_tree_next_chunk (root=0x25, iter=0x462e7c64, flags=12) at lib/radix-tree.c:770 > #1 0x080cc1fe in find_get_pages (mapping=0x462ad470, start=0, nr_pages=14, pages=0xc) at mm/filemap.c:844 > #2 0x080d5d6a in pagevec_lookup (pvec=0x462e7cc8, mapping=0x25, start=37, nr_pages=37) at mm/swap.c:914 > #3 0x080d615a in truncate_inode_pages_range (mapping=0x462ad470, lstart=0, lend=-1) at mm/truncate.c:241 > #4 0x080d64ff in truncate_inode_pages (mapping=0x25, lstart=51539607589) at mm/truncate.c:358 > > > > > tfoerste@n22 ~/devel/linux $ sudo gdb /usr/local/bin/linux-v3.12-48-gbe408cd 16619 -n -batch -ex bt > radix_tree_next_chunk (root=0x28, iter=0x462e7c64, flags=18) at lib/radix-tree.c:769 > 769 while (++offset < RADIX_TREE_MAP_SIZE) { > #0 radix_tree_next_chunk (root=0x28, iter=0x462e7c64, flags=18) at lib/radix-tree.c:769 > #1 0x080cc1fe in find_get_pages (mapping=0x462ad470, start=0, nr_pages=14, pages=0x12) at mm/filemap.c:844 > #2 0x080d5d6a in pagevec_lookup (pvec=0x462e7cc8, mapping=0x28, start=40, nr_pages=40) at mm/swap.c:914 > #3 0x080d615a in truncate_inode_pages_range (mapping=0x462ad470, lstart=0, lend=-1) at mm/truncate.c:241 > #4 0x080d64ff in truncate_inode_pages (mapping=0x28, lstart=77309411368) at mm/truncate.c:358 > #5 0x0825e388 in hostfs_evict_inode (inode=0x462ad3b8) at fs/hostfs/hostfs_kern.c:242 > #6 0x0811a8df in evict (inode=0x462ad3b8) at fs/inode.c:549 > >