From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129207 invoked by alias); 19 Dec 2018 06:40:23 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 129182 invoked by uid 89); 19 Dec 2018 06:40:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,KAM_NUMSUBJECT,SPF_PASS autolearn=no version=3.3.2 spammy=H*f:sk:871s6g0, Hx-languages-length:838, placed, HX-Get-Message-Sender-Via:sk:authent X-HELO: server28.superhosting.bg Received: from server28.superhosting.bg (HELO server28.superhosting.bg) (217.174.156.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Dec 2018 06:40:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dinux.eu; s=default; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=I4uThvP9aqhX3UvMM2O/1Qb9svqY9LVmdb/Huh4qCJ0=; b=XBDJMhP83Qa61os7iKE1sdsSYw W+mUDMfPN36565FcAF0flY8smwqNmlAAiz2aYDP8WWg4hYr/Q8FWL5bJICUXfICrl9mHLven0nzbr Q4YgXUjpf2YAtiQk97C1jb7TgHVhW4+YGw+mX4TQzJmcfQq+lme70Bacm5iYmANa1Pfc36cAn08aA gorzdGzdS86ogR3AEXY9ph903TWIXDiUTky2KW177tK5EwipIvHigcGfb5GIJxu3kzhk7n2VLhfRK wL2tj9MpGirp+o3OIydZLSrLNrMm3ydNwiJFO/Gl/bHqj1wYivbu3KWzFojCUbhof3dA5hVAa+IwP uQNWl2jg==; Received: from [95.87.234.74] (port=50916 helo=tpdeb.localnet) by server28.superhosting.bg with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gZVWf-0001bt-OU; Wed, 19 Dec 2018 08:40:17 +0200 From: Dimitar Dimitrov To: Bernd Edlinger Cc: Segher Boessenkool , Christophe Lyon , Thomas Preudhomme , "gcc-patches@gcc.gnu.org" , "richard.sandiford@arm.com" , "gdb@sourceware.org" Subject: Re: [PATCH] [RFC] PR target/52813 and target/11807 Date: Wed, 19 Dec 2018 06:40:00 -0000 Message-ID: <3795301.LoOEyI2oHe@tpdeb> User-Agent: KMail/5.2.3 (Linux/4.9.0-8-amd64; KDE/5.28.0; x86_64; ; ) In-Reply-To: References: <871s6g0z5z.fsf@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-OutGoing-Spam-Status: No, score=-0.5 X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg01364.txt.bz2 On Mon, Dec 17 2018 20:15:02 EET Bernd Edlinger wrote: > out of curiosity I looked at the clobber statement in > gdb/nat/linux-ptrace.c: > > asm volatile ("pushq %0;" > ".globl linux_ptrace_test_ret_to_nx_instr;" > "linux_ptrace_test_ret_to_nx_instr:" > "ret" > : : "r" ((uint64_t) (uintptr_t) return_address) > : "%rsp", "memory"); > > it turns out to be a far jump, instruction. GDB functionality should not be affected if SP clobber is removed, even if the generated code is slightly different. Please see this comment: http://sourceware.org/ml/gdb-patches/2018-12/msg00204.html As I understand it, this particular code is never meant to return. It should either stop due to the NX mapping of return_address/%0, or hit the breakpoint placed at return_address/%0. Regards, Dimitar