From owner-svn-src-all@freebsd.org Mon Nov 25 19:01:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2EDA91B68DE; Mon, 25 Nov 2019 19:01:15 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47MGbH0TFXz3K16; Mon, 25 Nov 2019 19:01:15 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id D7E3DBF02; Mon, 25 Nov 2019 19:01:14 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f172.google.com with SMTP id r20so18360260qtp.13; Mon, 25 Nov 2019 11:01:14 -0800 (PST) X-Gm-Message-State: APjAAAV0cYpgC5R26LQPhH0bMCtTm9VxtmoyytSJy0AqJ0OaTJb4uFfH OuTu082DJNb6csj6vq8fcIEzfJizY0UVon8QngI= X-Google-Smtp-Source: APXvYqxkUk9IRun4HMlBbIXwc+1eOY1SAD+YFzEcT6zQ1Td56ablqHGgi/ZRKTNdUAjppOlu8fzmP13RZ8SVweM9wlQ= X-Received: by 2002:ac8:66d7:: with SMTP id m23mr20675675qtp.53.1574708474378; Mon, 25 Nov 2019 11:01:14 -0800 (PST) MIME-Version: 1.0 References: <201907152148.x6FLm3EL068478@repo.freebsd.org> In-Reply-To: <201907152148.x6FLm3EL068478@repo.freebsd.org> From: Kyle Evans Date: Mon, 25 Nov 2019 13:01:02 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r350017 - in head: lib/libc/sys sys/kern sys/sys tests/sys/kern To: John Baldwin Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2019 19:01:15 -0000 On Mon, Jul 15, 2019 at 4:48 PM John Baldwin wrote: > > Author: jhb > Date: Mon Jul 15 21:48:02 2019 > New Revision: 350017 > URL: https://svnweb.freebsd.org/changeset/base/350017 > > Log: > Add ptrace op PT_GET_SC_RET. > > This ptrace operation returns a structure containing the error and > return values from the current system call. It is only valid when a > thread is stopped during a system call exit (PL_FLAG_SCX is set). > > The sr_error member holds the error value from the system call. Note > that this error value is the native FreeBSD error value that has _not_ > been translated to an ABI-specific error value similar to the values > logged to ktrace. > > If sr_error is zero, then the return values of the system call will be > set in sr_retval[0] and sr_retval[1]. > > Reviewed by: kib > MFC after: 1 month > Sponsored by: DARPA > Differential Revision: https://reviews.freebsd.org/D20901 > > Modified: > head/lib/libc/sys/ptrace.2 > head/sys/kern/sys_process.c > head/sys/sys/ptrace.h > head/tests/sys/kern/ptrace_test.c > Hey John, Any objection to MFC'ing this to stable/12 at least? I've found this to be almost-required in the ptrace user I've been working on lately... I certainly ripped out plenty of hair before realizing that it wasn't detecting error returns properly. Thanks, Kyle Evans