From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 414F038582AC; Thu, 16 Nov 2023 17:00:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 414F038582AC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1700154032; bh=DYtkA08ZruBEXUyMvLaxMF6UjSdoOeToUtL6fGApSAs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fZs9QOUtDci3BldxtWIrAKu+5PoUgH+vffCa+/+KEAQ84cpq903XsUllVmWbkspXw 0dWMjrdImXbfkfVRR84pXN8z94qjvDo/dEMDycgI3Y1/FhCaSNE7tnXJ/ZVkOlwdLm mt+cY5h2HZVO81FNjeFGKtqjbEqSp6IhJhN3hifw= From: "ulrich.weigand at de dot ibm.com" To: gdb-prs@sourceware.org Subject: [Bug tdep/28623] Missing catching return of execve syscall of PowerPC Date: Thu, 16 Nov 2023 17:00:27 +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: ulrich.weigand at de dot ibm.com X-Bugzilla-Status: NEW 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=3D28623 --- Comment #5 from ulrich.weigand at de dot ibm.com --- So if I get this correctly, the problem is that the execve syscall doesn't really "return" as such, but rather starts execution at the entry point of = the new executable. At this point, memory contents reflect the new executable = and register context are reset to the default setting on startup. This means that you cannot reliably detect that you previously executed exe= cve, as that requires looking at memory and/or register contents (depending on platform ABI details). I guess your suggested patch(es) are heuristics to = work around that problem, but this seems somewhat fragile to me. On the other hand, there is a reliable way to detect that we just executed = an execve syscall, and that is the TARGET_WAITKIND_EXECD wait state. Maybe the catch syscall logic, in the special case of catching execve, should somehow hook into that event instead? --=20 You are receiving this mail because: You are on the CC list for the bug.=