From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110774 invoked by alias); 13 Mar 2015 15:06:13 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 110763 invoked by uid 89); 13 Mar 2015 15:06:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 13 Mar 2015 15:06:11 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2DF67Pf013733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 13 Mar 2015 11:06:07 -0400 Received: from tranklukator.brq.redhat.com (dhcp-1-208.brq.redhat.com [10.34.1.208]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id t2DF64D5027634; Fri, 13 Mar 2015 11:06:05 -0400 Received: by tranklukator.brq.redhat.com (nbSMTP-1.00) for uid 500 oleg@redhat.com; Fri, 13 Mar 2015 16:04:20 +0100 (CET) Date: Fri, 13 Mar 2015 15:06:00 -0000 From: Oleg Nesterov To: Sergio Durigan Junior Cc: Andy Lutomirski , Jan Kratochvil , GDB Patches , Pedro Alves , "linux-kernel@vger.kernel.org" Subject: Re: vvar, gup && coredump Message-ID: <20150313150417.GE21603@redhat.com> References: <20150305205744.GA13165@host1.jankratochvil.net> <20150311200052.GA22654@redhat.com> <20150312143438.GA4338@redhat.com> <20150312165423.GA10073@redhat.com> <20150312173901.GA12225@redhat.com> <874mpqp0sm.fsf@redhat.com> <20150312180229.GA13711@redhat.com> <87zj7hlcuv.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zj7hlcuv.fsf@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-SW-Source: 2015-03/txt/msg00393.txt.bz2 On 03/13, Sergio Durigan Junior wrote: > > On Thursday, March 12 2015, Oleg Nesterov wrote: > > > And it seems that we all agree that the kernel should not dump this vma > > too. Could you confirm that this is fine from gdb pov just in case? > > Yes, this is what we expect from the GDB side. This mapping is marked > as "dd", so it does not make sense to dump it. OK. > While I have you guys, would it be possible for the Linux kernel to > include a new flag on VmFlags to uniquely identify an anonymous mapping? Note that "anonymous" is not the right term here... I mean it is a bit confusing. Lets discuss this again on debug-list, then we will see if gdb needs more info from kernel. > Currently, there is no easy way to do that from userspace. My patch > implements the following heuristic on GDB: > > if (pathname == "/dev/zero (deleted)" > || pathname == "/SYSV%08x (deleted)" > || pathname == " (deleted)" And for example, this is not anonymous mapping. But, > mapping is anonymous; I agree, gdb should treat it as anonymous. > However, this can be fragile. The Linux kernel checks for i_nlink == 0, Yes, as we already disccussed, I think the kernel should be changed. It should do something like shmem_mapping() || d_unlinked(), I think. But this needs another discussion on lkml, and in another thread. Oleg.