From nobody Mon Feb 21 13:49:01 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 387CA183A5D1; Mon, 21 Feb 2022 13:49:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K2Nv24wK0z3PxZ; Mon, 21 Feb 2022 13:49:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645451342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Ry4I7hzcIfmklsY+lauvT52uBGEnRJGHtZXKKpmN3Y=; b=KhQ1Np8WMueD83nZrwDQZAdGc+OnhvAZAsFPFuaUEcZoWWEvhV4ABBMWPS5C9koqO05jPQ SNNcgFEuQRzj0LQR/cmFKFaYoa3Q3Wifp7Zkvaq4z4+dFFWlmO/gKRT8fXupKq+GGw2gJK QP1FJvW5t6fKJpsL+hrevfVKGXDx6kZBVQLSCV7wIeZYx/S5TrTrDpOEF0pa5BgM9s9WdU ad+W4aGFPWD+SsxXUACQYbHnKzLjocuFO3Xa/mJy3Qtcoxkc8y9Dq4bIGKuaGsR70EFHgl GdiXzb2BHBZmX4C9+Nc6Ag7IEslhDpLyXsVVlgbqMxp7zrhRB3hErtS140i6eg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22DCC115FC; Mon, 21 Feb 2022 13:49:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21LDn1ZF092049; Mon, 21 Feb 2022 13:49:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21LDn15a092048; Mon, 21 Feb 2022 13:49:01 GMT (envelope-from git) Date: Mon, 21 Feb 2022 13:49:01 GMT Message-Id: <202202211349.21LDn15a092048@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Edward Tomasz Napierala Subject: git: f4fd475d457d - stable/13 - linux: Improve debug for PTRACE_GETEVENTMSG List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f4fd475d457da5e09117c7caba3c15baca2458e4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645451342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Ry4I7hzcIfmklsY+lauvT52uBGEnRJGHtZXKKpmN3Y=; b=QE/o/R07uXvMaa5T3rqo8ULHrr96LmG6v5qoHm+jmkUZwbi8D38OEFW1b4jP8/2n/vDOL8 9JIfCSf0sFwgkejdNwc7g0RESly0goFTIAkI3p5LveQ+qh3+NJy8bvcxoJBD6K/ivZb7Go RIG+FGywEY9zlX25vhRNH4wIhHKOKpjdlvb3nOkBSX+//u9D6dLWCXbexlOuuaJuhFYZ2p X7OzmHAUydggwy3MN33E5N4JoDfj5tJkzKBPKcCr2KV/bVsXKrUtjb9OM3YGOPdjNiLXMq rUSi7GINmLACHcEwVxy4XMSTIZxeWGmS75feWGApup0tM2nNN5CdTPeJnT5KQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645451342; a=rsa-sha256; cv=none; b=Y2P1YKkad+Ht1cN27klQi/VpuOY+Wp3df3oKLgqm7eC5mVwPiYrYU5+3mSq8ZxheheOHGr kERyyGgkK3pWAUr3O1anG8B9yjL1s+cB3gMUtAr0AZ2kDn6F2gPr0F0zI4720Ov2hcrbhS g47fKxEVRKPdERjJ2Jr1BxbDWaTlZ1rbyQRRRvOq7C7viopxEnbVtmPvz+TZmE+a8FHZg7 R3ReGWrb96gbEB2wQrqJhCsQ1kl9wLi3D1+yg5R5DoDvNeu771yLe+f/Ga4YO4PLjBFf2C vnYbRI7gj1Jqs1Kxs/vbNbs/iY8cQdoE5QTlgqE6tFx4tH7R0LXtuTG5db8uTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=f4fd475d457da5e09117c7caba3c15baca2458e4 commit f4fd475d457da5e09117c7caba3c15baca2458e4 Author: Edward Tomasz Napierala AuthorDate: 2021-10-23 18:53:12 +0000 Commit: Edward Tomasz Napierala CommitDate: 2022-02-21 13:36:01 +0000 linux: Improve debug for PTRACE_GETEVENTMSG No functional changes. Sponsored By: EPSRC (cherry picked from commit 2ec26ae402fc2589cb97bb5aa713b6d0ba080c17) --- sys/amd64/linux/linux_ptrace.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/amd64/linux/linux_ptrace.c b/sys/amd64/linux/linux_ptrace.c index 7abb9c5ee933..8c007871c190 100644 --- a/sys/amd64/linux/linux_ptrace.c +++ b/sys/amd64/linux/linux_ptrace.c @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #define LINUX_PTRACE_DETACH 17 #define LINUX_PTRACE_SYSCALL 24 #define LINUX_PTRACE_SETOPTIONS 0x4200 +#define LINUX_PTRACE_GETEVENTMSG 0x4201 #define LINUX_PTRACE_GETSIGINFO 0x4202 #define LINUX_PTRACE_GETREGSET 0x4204 #define LINUX_PTRACE_SEIZE 0x4206 @@ -427,6 +428,14 @@ linux_ptrace_setoptions(struct thread *td, pid_t pid, l_ulong data) return (kern_ptrace(td, PT_SET_EVENT_MASK, pid, &mask, sizeof(mask))); } +static int +linux_ptrace_geteventmsg(struct thread *td, pid_t pid, l_ulong data) +{ + + linux_msg(td, "PTRACE_GETEVENTMSG not implemented; returning EINVAL"); + return (EINVAL); +} + static int linux_ptrace_getsiginfo(struct thread *td, pid_t pid, l_ulong data) { @@ -772,6 +781,9 @@ linux_ptrace(struct thread *td, struct linux_ptrace_args *uap) case LINUX_PTRACE_SETOPTIONS: error = linux_ptrace_setoptions(td, pid, uap->data); break; + case LINUX_PTRACE_GETEVENTMSG: + error = linux_ptrace_geteventmsg(td, pid, uap->data); + break; case LINUX_PTRACE_GETSIGINFO: error = linux_ptrace_getsiginfo(td, pid, uap->data); break;