From owner-svn-src-head@freebsd.org Mon Aug 29 18:05:11 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 1CD3FBC7D55; Mon, 29 Aug 2016 18:05:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DDA38A; Mon, 29 Aug 2016 18:05:10 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u7TI4u4O019201 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 29 Aug 2016 21:04:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u7TI4u4O019201 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u7TI4sJK019199; Mon, 29 Aug 2016 21:04:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 29 Aug 2016 21:04:54 +0300 From: Konstantin Belousov To: John Baldwin Cc: Andrey Chernov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys Message-ID: <20160829180454.GU83214@kib.kiev.ua> References: <201608272303.u7RN3N0D078505@repo.freebsd.org> <1595604.93PBdSz0kX@ralph.baldwin.cx> <20160829065813.GP83214@kib.kiev.ua> <18206408.GMLM77D01s@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18206408.GMLM77D01s@ralph.baldwin.cx> User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home 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 18:05:11 -0000 On Mon, Aug 29, 2016 at 09:51:50AM -0700, John Baldwin wrote: > On Monday, August 29, 2016 09:58:13 AM Konstantin Belousov wrote: > > I dug into the ptrace(2) consumers, I found a lot of things using > > it which I would not expect to use, besides usual suspects of gdb > > lldb libunwind reptyr etc. Most surprising was that even high-profile > > consumers including gdb sometimes fail to check errno after PT_PEEK. On > > the other hand, I did not found a case in gdb where errno is checked > > after PT_PEEK but not zeroed before the syscall. > > So the consumers are generally doing the right thing. I only looked at gdb in details, other code is painful to read. > Certainly I think having a C wrapper like this makes more sense than > doing it all in assembly N times. I would probably prefer to keep the > manpage language the way it is though. So do you want to revert man page bits ? > > If we are really worried about compat, we could bump the ptrace symver > and use the function above as the FBSD_1.0 version perhaps. This does not solve anything. Old-time compiled consumers would get the expected interface, while the same consumers compiled anew get incompatible interface. Recent dirname/basename change demostrates the same problem. On Mon, Aug 29, 2016 at 08:46:47PM +0300, Andrey Chernov wrote: > Either we implement this wrapper or left all things as is, we need to > document internal errno clearing additionally, to not make people wonder > why errno becomes 0, probably with the mention that program should not > relay on this obsoleted implementation feature. It was done in r304928. John want to revert this change, it seems.