From owner-svn-src-all@freebsd.org Sun Aug 28 01:13:22 2016 Return-Path: Delivered-To: svn-src-all@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 1AC29A949BA for ; Sun, 28 Aug 2016 01:13:22 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) (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 976661FD for ; Sun, 28 Aug 2016 01:13:21 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f45.google.com with SMTP id f93so79518385lfi.2 for ; Sat, 27 Aug 2016 18:13:21 -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=T++f/DsG47ZZUjaxZXP8V+hYsdjgWOUdQUfwd5GSTze4B9okCOItlJEQHKNeChRUfS VeBmQqqUcci1zcEvJ1B3bE1q/BC0lxF4a7OLG0fOG/hv5OX3C07rTsHR3XlYJOYWxOvf AxU7rhxQTD65c+fKvDGSyWZ0vqjWKnXWqCuXSbWL5gcYNcA3P0yHIKyVy71w+M2iiWWg TIYWFe5UdRsOBBaGl5n9OEGVhmR+FkJVfZU40uiKdekk6W905igAtxTVbLJgIQtiwU2Z ZNMl7oJj/E4AwCZPFueOdxC+e6ndaefuJMe+IBbW1wJEkpkN8YlhxT+hkRCYIE8guJ/o eGqA== X-Gm-Message-State: AE9vXwPj+X47SvVT3o9bgOYp83iW5t3gKWMQDxwakrUvAFnqSQQD9kj1ljRF2/YKZNiuug== 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-all@freebsd.org X-Mailman-Version: 2.1.22 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: Sun, 28 Aug 2016 01:13:22 -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.