From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailsec117.isp.belgacom.be (mailsec117.isp.belgacom.be [195.238.20.113]) by sourceware.org (Postfix) with ESMTPS id 67D6C386F83E for ; Sun, 17 May 2020 18:15:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 67D6C386F83E IronPort-SDR: V0aSDNrMJKG00Gqh7hgWfh31bO99a9rQfPMhGf/dyphdwLbsjSptBIDdWgQVEtA5jyHocDo2eW sqxgbB+p/zfTxe2Pj3SWnEEyUepksjtV1G+NKsJWRUBQLIVP6QIurNiUm1KURFIV3q0krsBNUJ FBZK1zOf6kcF7e2jMk4riYRMnuDEj+/L/G2I6RCsJfMvPj5q+wDC1GMHTvo2K5tcr85C7Mxihz 4aSqbhAyD14BhDpsiASsohoQ4NG9DMkhJt74za3w1BIWr6R/mfQvFNG995sKgFoUDIMemYF+E1 emI= IronPort-PHdr: =?us-ascii?q?9a23=3A+bQC+hcYk0ngN4qoLpFgBysflGMj4u6mDksu8p?= =?us-ascii?q?Mizoh2WeGdxc26bB2N2/xhgRfzUJnB7Loc0qyK6v2mADRbqs/b6DgrS99lb1?= =?us-ascii?q?c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUh?= =?us-ascii?q?rwOhBoKevrB4Xck9q41/yo+53Ufg5EmCexbal9IRmrrQjdrNQajZdsJ6o+1x?= =?us-ascii?q?fFvGdEcPlKyG11Il6egwzy7dqq8p559CRQtfMh98peXqj/Yq81U79WAik4Pm?= =?us-ascii?q?4s/MHkugXNQgWJ5nsHT2UZiQFIDBTf7BH7RZj+rC33vfdg1SaAPM32Sbc0WS?= =?us-ascii?q?m+76puVRTlhjsLOyI//WrKkcF7kr5Vrwy9qBx+247UYZ+aNPxifqPGYNgWQX?= =?us-ascii?q?NNUttNWyBdB4+xaZYEAegcMuZCt4TzpEYAoxugCweiBuzvxCNHiXH50qM1yO?= =?us-ascii?q?khDQ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?= =?us-ascii?q?Jy807YAIuf1w22u4ziIasQ1gbW83qZxmeRtVtVFglqXvOWc2oYYx7urdX951?= =?us-ascii?q?vaQveRAK4gKxZAxNSZYv9SatztjE1eSbH8Mc7Zen+wln2rLQ2L17WBcMzgdj?= =?us-ascii?q?NOj23mFEEYnlVLrj69Pg8kC3Lk+jqGAQ=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2BPAABrfsFe/yFRiNlgBhkBAQEBAQE?= =?us-ascii?q?BAQEBAQEBAQEBAQESAQEBAQEBAQEBAQEBQIFHgiyBQyEShAhIiQGIBptkCwE?= =?us-ascii?q?BAQEBAQEBAQgsAQIEAQGERAKCFSc4EwIDAQEBAwIFAQEGAQEBAQEBBAQBbAQ?= =?us-ascii?q?BAQcKhFEhAQMBAQUKAUOCOykBgwwBAQEBAgEjMzMIAw4KAgImAgJXBgGGFSS?= =?us-ascii?q?tYnaBMoVSgyWBQIEOKgGMUIFMP4QhPoQ+gySCPiIEjiyKfplmB4JTgQEEl0I?= =?us-ascii?q?dnVaQQ517gWkigVZtgz1PJZ8KQmcCBggBAQMJdAgTi2ktghYBAQ?= X-IPAS-Result: =?us-ascii?q?A2BPAABrfsFe/yFRiNlgBhkBAQEBAQEBAQEBAQEBAQEBA?= =?us-ascii?q?QESAQEBAQEBAQEBAQEBQIFHgiyBQyEShAhIiQGIBptkCwEBAQEBAQEBAQgsA?= =?us-ascii?q?QIEAQGERAKCFSc4EwIDAQEBAwIFAQEGAQEBAQEBBAQBbAQBAQcKhFEhAQMBA?= =?us-ascii?q?QUKAUOCOykBgwwBAQEBAgEjMzMIAw4KAgImAgJXBgGGFSStYnaBMoVSgyWBQ?= =?us-ascii?q?IEOKgGMUIFMP4QhPoQ+gySCPiIEjiyKfplmB4JTgQEEl0IdnVaQQ517gWkig?= =?us-ascii?q?VZtgz1PJZ8KQmcCBggBAQMJdAgTi2ktghYBAQ?= Received: from 33.81-136-217.adsl-dyn.isp.belgacom.be (HELO md) ([217.136.81.33]) by relay.skynet.be with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 17 May 2020 20:15:31 +0200 Message-ID: Subject: Re: exec-file-mismatch and native-gdbserver testing From: Philippe Waroquiers To: Pedro Alves , "Metzger, Markus T" , GDB Date: Sun, 17 May 2020 20:15:30 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2020 18:15:34 -0000 On Sun, 2020-05-17 at 18:47 +0100, Pedro Alves wrote: > On 5/17/20 6:24 AM, Philippe Waroquiers via Gdb wrote: > > For some specific scenarios, it might have an impact, > > such as the user wanting to debug a copy of the file to avoid > > 'Text file busy', maybe some interaction with setuid/setgid, ... ? > > These seem like rarer scenarios, which would cause warnings/errors > anyway if you pick the wrong executable? For sure, these scenarios are unusual, but it might be better that the user knows what happens. GDB silently deciding to use another (physical) file than what the process really executes is maybe not ideal. E.g. I am wondering if the below will be visible and cause an (understandable) warning/error/behaviour for the user: If the user has debugged a first process with orig_exe, then the user copied orig_exe to copy_orig_exe, and then GDB is attached to a process that runs copy_orig_exe, the user does not expect to have orig_exe protected/accessed anymore, and so might change it or remove it or ..., while GDB still use orig_exe instead of copy_orig_exe. So, I was wondering if such a case of equal build ID but different (local?) file names are not worth a warning. > > I'm thinking, if we support build ID validation, do we really want > to fallback to filename validation? It seems to me that it causes > more false positives than desirable. You mean that the filename comparison is useless (or even harmful) if we found the build ID in the files ? Effectively, if build ID are different but filenames are equal, that is likely a false positive 'file are matching' (only possible in remote debugging setup I suppose). Philippe