From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21343 invoked by alias); 8 Oct 2013 12:18:51 -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 21316 invoked by uid 89); 8 Oct 2013 12:18:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS 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 ESMTP; Tue, 08 Oct 2013 12:18:49 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r98CIiEp032412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Oct 2013 08:18:45 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r98CIhBb002820; Tue, 8 Oct 2013 08:18:43 -0400 Message-ID: <5253F822.2090707@redhat.com> Date: Tue, 08 Oct 2013 12:18:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Stan Shebs CC: gdb-patches@sourceware.org Subject: Re: [PATCH 0/7 V2] Trust readonly sections if target has memory protection References: <1378432920-7731-1-git-send-email-yao@codesourcery.com> <1378641807-24256-1-git-send-email-yao@codesourcery.com> <201309091916.r89JGbpf009986@glazunov.sibelius.xs4all.nl> <522E9A8A.7040509@codesourcery.com> <52317B66.3020602@codesourcery.com> <201309120949.r8C9nFsJ016506@glazunov.sibelius.xs4all.nl> <5232C9EC.2040707@codesourcery.com> <5249B9F9.4030901@redhat.com> <5249BE1C.5050907@redhat.com> <525335C0.8030004@earthlink.net> In-Reply-To: <525335C0.8030004@earthlink.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2013-10/txt/msg00219.txt.bz2 On 10/07/2013 11:29 PM, Stan Shebs wrote: > On 9/30/13 11:08 AM, Pedro Alves wrote: >> On 09/30/2013 06:50 PM, Pedro Alves wrote: >> >>> But in cases like disassembly, we're being driven by debug >>> info or user input. As GDB knows upfront the whole range of memory it'll >>> be fetching, accessing a bigger chunk upfront, as long as it doesn't >>> step out of the range we read piecemeal anyway, should have no effect >>> on correctness. >> >> Hmm, wait, I'm having a a déjà vu experience. I recalled I have >> once reviewed a patch that does exactly this. But, I'm not finding >> it in the tree, or in the archives. Maybe it was a CS local patch >> that was never pushed? >> > > There are a couple possibilities - for instance there we had a request > to check that the code underneath a breakpoint had not changed behind > our backs, or something like that. There was also the check of readonly > areas for memory_xfer_partial reading from a traceframe, but > that was your code, and it went into FSF in February 2011. :-) Hmm, yeah, but not, that's not really what I'm recalling. I distinctly remember reviewing this for the disassemble command, exactly as I was suggesting. I now recall better because I also hacked on the patch while iterating on multiple iterations of patch reviews. The change was contained to just gdb/disasm.c (or the gross of it at least), IIRC. Bleh, if we can't find it, we can always rewrite it. :-P. -- Pedro Alves