Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932400AbbLNVWi (ORCPT ); Mon, 14 Dec 2015 16:22:38 -0500 Received: from ipmail07.adl2.internode.on.net ([150.101.137.131]:16479 "EHLO ipmail07.adl2.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932080AbbLNVWg (ORCPT ); Mon, 14 Dec 2015 16:22:36 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BFBwAVMm9W/1bELHlegzqBQaoKBotShTmECoYHBAICgSxNAQEBAQEBgQuENQEBBCcTHCMQCAMYCSUPBSUDIROILr0RAQEIAiEZhXWFRYlABZZ2jTuBZI1eiWeDdGOCDiCBaio0hQABAQE Date: Tue, 15 Dec 2015 08:22:20 +1100 From: Dave Chinner To: Andrea Gelmini Cc: linux-kernel@vger.kernel.org, xfs@oss.sgi.com Subject: Re: BUG: KASAN: use-after-free in xfs_iflush_cluster+0x9d7/0xaf0 Message-ID: <20151214212220.GO26718@dastard> References: <20151214180048.GA15690@glen> <20151214195422.GM26718@dastard> <20151214201526.GA25152@glen> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151214201526.GA25152@glen> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1946 Lines: 50 On Mon, Dec 14, 2015 at 09:15:26PM +0100, Andrea Gelmini wrote: > On Tue, Dec 15, 2015 at 06:54:22AM +1100, Dave Chinner wrote: > > What line of code does this address correspond to in your kernel? > > > > xfs_iflush_cluster+0x9d7 > > gelma@glen:~/dev/kernel/v4.4.x$ git grep -Iin xfs_iflush_cluster > fs/xfs/xfs_inode.c:3179:xfs_iflush_cluster( > fs/xfs/xfs_inode.c:3414: error = xfs_iflush_cluster(ip, bp); If that was what I needed, I wouldn't have needed to ask. :/ I need the translation of the memory address to line number, not the line number of function call. This requires translation from your built kernel object file. e.g. on a kernel I just built: $ gdb vmlinux .... (gdb) l *(xfs_iflush_cluster+0x9d7) 0xffffffff814df647 is in xfs_bulkstat_one_int (fs/xfs/xfs_itable.c:110). 105 buf->bs_dmevmask = dic->di_dmevmask; 106 buf->bs_dmstate = dic->di_dmstate; 107 buf->bs_aextents = dic->di_anextents; 108 buf->bs_forkoff = XFS_IFORK_BOFF(ip); 109 110 switch (dic->di_format) { 111 case XFS_DINODE_FMT_DEV: 112 buf->bs_rdev = ip->i_df.if_u2.if_rdev; 113 buf->bs_blksize = BLKDEV_IOSIZE; 114 buf->bs_blocks = 0; That's clearly not code in xfs_iflush_cluster() or any function that xfs_iflush_cluster() calls. Indeed, xfs_iflush_cluster() is only 0x411 bytes long on that kernel, so there's more than 2x the amount of code in that function in your instrumented kernel than mine. Hence I need the address-to-line number translation from your kernel to tell me what line of code is being tripped over. Cheers, Dave. -- Dave Chinner david@fromorbit.com -- 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/