From owner-svn-src-head@freebsd.org Sun Aug 28 01:18:56 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 DC259A94B41 for ; Sun, 28 Aug 2016 01:18:56 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) (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 6BEC5816 for ; Sun, 28 Aug 2016 01:18:56 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f43.google.com with SMTP id g62so79420004lfe.3 for ; Sat, 27 Aug 2016 18:18:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=zbukKpYPENCc+CCsLwC3yAheNmCVTKJHxZu/ktaU6y4=; b=bESArFSdW/cL5iBLHmmPFxIqStSrJ65g+dKmRxjqPIG/A2EcF3UyNr6OyR7gUFABLh mNeMS3YvrqwYzE1jw/iYExcM6/QVNu37RabV6ZFRjmv4fKO5sF7SBD2v/5LgFnWlG8Qk 02tek9OHqK1BL69zfu5f6ZYnuY8h3q8peR9trtjTrUbLsHY1LPjykFS3omykYObnbLdd a5UnjBdIsoDU7J5iyG74nBsaxzhK4K9DuZqeC5vHVE2GqJobzoiY9xArj77bel4cDI8X T+y+vGsV2D9bfK2Ih3k4hOt5nh/WlnPM4cp0cx57KqsPaU+RQcOIGZT91uD6plKHiUCD uIxg== X-Gm-Message-State: AE9vXwNL2J2p4/9WJq+OnMP7A9QIKbD8Y3r+sA9I7PlN12AIbI5Jdjv7ATRirvOnXoiYNw== X-Received: by 10.46.9.144 with SMTP id 138mr3357448ljj.6.1472346799137; Sat, 27 Aug 2016 18:13:19 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id q36sm5242061lfi.26.2016.08.27.18.13.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Aug 2016 18:13:18 -0700 (PDT) Subject: Re: svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys To: Konstantin Belousov References: <201608272303.u7RN3N0D078505@repo.freebsd.org> <9bcf10db-de3f-33ce-e418-03ce3283ac90@freebsd.org> <20160828005637.GG83214@kib.kiev.ua> <59ac1812-7c77-b677-51c4-dcadc6b2be7f@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Andrey Chernov Message-ID: <70b69c2b-63f0-ca41-2e5e-ebb06f765482@freebsd.org> Date: Sun, 28 Aug 2016 04:13:17 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <59ac1812-7c77-b677-51c4-dcadc6b2be7f@freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: Sun, 28 Aug 2016 01:18:57 -0000 On 28.08.2016 4:04, Andrey Chernov wrote: > On 28.08.2016 3:56, Konstantin Belousov wrote: >> On Sun, Aug 28, 2016 at 03:38:10AM +0300, Andrey Chernov wrote: >>> On 28.08.2016 2:03, Konstantin Belousov wrote: >>>> Since ptrace(2) syscall can return -1 for non-error situations, libc >>>> wrappers set errno to 0 before performing the syscall, as the service >>>> to the caller. >>> >>> Both C99 and POSIX directly prohibits any standard function to set errno >>> to 0. ptrace() should either choose other errno to indicate non-error >>> situation or change return -1 to something else. >>> >> ptrace(2) is not a standard function. >> > > C99 statement sounds stricter: > "The value of errno is zero at program startup, but is never set to zero > by any library function. 176)" > And syscall is not different from library function from C99 point of view. > >> And, we cannot break ABI for the syscall. We can fix already broken (from standards point of view) ABI for the syscall.