From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12262 invoked by alias); 4 Oct 2012 17:07:32 -0000 Received: (qmail 12199 invoked by uid 22791); 4 Oct 2012 17:07:30 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Oct 2012 17:07:20 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MBD00200OQOLV00@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Thu, 04 Oct 2012 19:07:18 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MBD002IPOW6KN20@a-mtaout20.012.net.il>; Thu, 04 Oct 2012 19:07:18 +0200 (IST) Date: Thu, 04 Oct 2012 17:07:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Also install data-directory into the build directory as computed by relocate_gdb_directory In-reply-to: <20121004134927.GL3028@adacore.com> To: Joel Brobecker Cc: dje@google.com, khooyp@cs.umd.edu, jan.kratochvil@redhat.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83fw5u88tn.fsf@gnu.org> References: <2878953E-B698-43F3-989A-A551D96BAB62@cs.umd.edu> <20120924152641.GF4146@adacore.com> <9F52A338-A158-44DC-90C1-F46503859613@cs.umd.edu> <285502C6-1395-4049-9D55-031EDA3AD06D@cs.umd.edu> <20120924170348.GI4146@adacore.com> <20120927091737.GB2980@adacore.com> <20121004000840.GI3028@adacore.com> <83k3v69a1r.fsf@gnu.org> <20121004134927.GL3028@adacore.com> X-IsSubscribed: yes 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 X-SW-Source: 2012-10/txt/msg00085.txt.bz2 > Date: Thu, 4 Oct 2012 06:49:28 -0700 > From: Joel Brobecker > Cc: dje@google.com, khooyp@cs.umd.edu, jan.kratochvil@redhat.com, > gdb-patches@sourceware.org > > > Why not? Aren't there specific directories and/or files near the GDB > > executable in this case? > > I have a feeling that this would open the door allowing attackers > to setup GDB to execute unwanted code if we make it easy to reproduce > the same environment and place GDB in a mode where it thinks it is > inside a build directory. Well, FWIW, Emacs uses a similar scheme (it tests for a couple of files in specific directories around itself to decide whether it is invoked without being installed), and I don't think anyone complained about circumventions. > But beyond this technical aspect, I am reluctant to add a mode to GDB > that would then become useless to 99% of the people once GDB is properly > installed. I don't think that the convenience it provides is important > enough to justify it. The question is: what's the price? If the price is sufficiently low, I don't see why you should be reluctant, even if you are right and 99% of users will find this useless. (FWIW, I almost always use GDB from its build directory, I don't even know why.)