From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 024AF3858C50; Thu, 16 Nov 2023 11:57:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 024AF3858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1700135853; bh=aIlEyRl5k2oWWesDnxBnmok7LgaLxPwz5cy+4gl0YwM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QW22XNAUp+iczYr/eTUc9GT6pEdtJQglr6tGtgUvy/eSIdZ/brxB8i9OdxcOf8MVw lexwudaoZDvYRsewdpZi+H9ZJZ1Y6FeCzZVVmnIk0R01W193UOvl1K1cTJDVpBhUDJ GvJf7YXrn1teYUNe4HcAIzaBxNTHUR/LE5XErPQc= From: "luis.machado at arm dot com" To: gdb-prs@sourceware.org Subject: [Bug tdep/31071] [gdb/tdep, arm] FAIL: gdb.base/catch-syscall.exp: execve: syscall execve has returned Date: Thu, 16 Nov 2023 11:57:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tdep X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: luis.machado at arm dot com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31071 --- Comment #7 from Luis Machado --- Thinking a bit about this, for 32-bit (and 32-bit-on-64-bit), syscall 0 is = the restart syscall. From the manpages: long restart_syscall(void); Note: There is no glibc wrapper for this system call; see NOTES. Given this is intended for internal use by the kernel, I suppose userspace = has no business trying to invoke it, so checking only LR should technically wor= k. In case someone does invoke it, checking the rest of the argument/variable registers to make sure they are 0 seems reasonable, and may help avoid false-positives when reporting execve. I'm thinking checking r0~r8 should be more than enough, based on the appcs32 (https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst). --=20 You are receiving this mail because: You are on the CC list for the bug.=