From owner-svn-src-head@freebsd.org Mon Aug 29 19:14:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A23B9BC71FF; Mon, 29 Aug 2016 19:14:42 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-oi0-x230.google.com (mail-oi0-x230.google.com [IPv6:2607:f8b0:4003:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6418F1E3; Mon, 29 Aug 2016 19:14:42 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-oi0-x230.google.com with SMTP id f189so209796014oig.3; Mon, 29 Aug 2016 12:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+o1y8Tc2IfCpdeDVt7aBmXIiEnXHASHKH+GQJlEw6JI=; b=OpwK9IY/aUx9/NiP8e6+z/exlQyy3NY0DdKR//zoIDBZhzEGOskAYTjnuiBeIZjN7v Evk88fEeilCuPi0UEkYQO4D+risjVeaBAOoYOyZOR8YJ3Dt/AQV4nPC/1txqLw+pRD8W wFRI6aWG73dKqzbyg3moKyP8Qdr81hgr66vicN+skFA/L6anHNbkbTQUbDYiF2AGsYFa HoMBYOTl5FGrQX53pbIzpsIRUb2lKzqN6jLsHneUaz2pcahB/rUiB+xy8sTVrdqJaQ9z K9qNRMOEwCnz9wqEFj/O6lGdQBNANvgsZ0KU8kaM7GmkC2BZrZ8n6jn1AYs8E4+8MkYV MQfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+o1y8Tc2IfCpdeDVt7aBmXIiEnXHASHKH+GQJlEw6JI=; b=OSTy0W5DccQvDDOA8JOIUSoFIvm8vifFZ2DE5pPAbdfoRY0np4ZJXkuh38BxiMPd/t tJDXJVr00ogClurec4pIjmFDakNzDYfsk8v8kh/r4ehn2q7PuAuOnZJBJSW52si12Zci jGlDf6XYplKpXTE4GTYds701QUG/LD56DKkpxyAnodS4RmXd1UVIsvQwn91M+EkGUHQE LE3+JWe498RqIdKhJVkMtddpnLeOPAkxo11omIULLRUERe6eoSLgjBE+k+NCQ2ZTVCvf +ooLFc6970riFTK8RzyhDXfgZdvkcL8dtMbFfeCLmbXNf8kADS1moCevBdNSUbvtT3+X i9ag== X-Gm-Message-State: AE9vXwON+Gqa8CiexXkGSGEbWUTjSK+D+5PCPeJOCzGRSQksmDm7CZfzKUl5wBb8GC8jorrNDFnVyQlnUIkrIA== X-Received: by 10.157.4.200 with SMTP id 66mr13298193otm.171.1472498081799; Mon, 29 Aug 2016 12:14:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.46.104 with HTTP; Mon, 29 Aug 2016 12:14:41 -0700 (PDT) In-Reply-To: <20160829191035.GV83214@kib.kiev.ua> References: <201608272303.u7RN3N0D078505@repo.freebsd.org> <1595604.93PBdSz0kX@ralph.baldwin.cx> <20160829065813.GP83214@kib.kiev.ua> <18206408.GMLM77D01s@ralph.baldwin.cx> <20160829180454.GU83214@kib.kiev.ua> <20160829191035.GV83214@kib.kiev.ua> From: Benjamin Kaduk Date: Mon, 29 Aug 2016 14:14:41 -0500 Message-ID: Subject: Re: svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys To: Konstantin Belousov Cc: Andrey Chernov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , John Baldwin Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2016 19:14:42 -0000 On Mon, Aug 29, 2016 at 2:10 PM, Konstantin Belousov wrote: > On Mon, Aug 29, 2016 at 09:16:29PM +0300, Andrey Chernov wrote: > > Previous text is documented everywhere and describing usual good > > practice, so it should remains in place, in that means r304928 should be > > reverted, because replace proper way of doing things with obsoleted > > feature description. > > > > What I suggest is not _replace_ old text with new, but _add_ new text as > > describing current and not recommended way, with the direct mention that > > this feature is obsoleted and not recommended for relay on it. > > > > diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2 > index 48802f4..d406efc 100644 > --- a/lib/libc/sys/ptrace.2 > +++ b/lib/libc/sys/ptrace.2 > @@ -2,7 +2,7 @@ > .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ > .\" > .\" This file is in the public domain. > -.Dd August 28, 2016 > +.Dd August 29, 2016 > .Dt PTRACE 2 > .Os > .Sh NAME > @@ -900,19 +900,29 @@ argument is ignored. > .Pp > Additionally, other machine-specific requests can exist. > .Sh RETURN VALUES > +Most requests return 0 on success and \-1 on error. > Some requests can cause > .Fn ptrace > to return > \-1 > -as a non-error value; to disambiguate, > +as a non-error value, among them are > +.Dv PT_READ_I > +and > +.Dv PT_READ_D , > +which return the value read from the process memory on success. > +To disambiguate, > .Va errno > -is set to 0 in the libc wrapper for the > -.Fn ptrace > -system call and > +can be set to 0 before the call and checked afterwards. > +.Pp > +Current > The current > .Fn ptrace > -callers can reliably check > +implementation always sets > +.Va errno > +to 0 before calling into kernel, both for historic reasons and for > the kernel > +consistency with other operating systems. > +It is recommended to assign zero to > .Va errno > -for non-zero value afterwards. > +explicitely for future compatibility. > "explicitly" (only one 'e') Maybe forward compatibility instead of future compatibility, but either is fine. Feel free to commit with reviewed-by: bjk -Ben > .Sh ERRORS > The > .Fn ptrace > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" >