From owner-svn-src-head@FreeBSD.ORG Fri May 1 20:10:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B53CAD86; Fri, 1 May 2015 20:10:15 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 94CE81673; Fri, 1 May 2015 20:10:15 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id DD224427E; Fri, 1 May 2015 13:10:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1430511015; x=1430525415; bh=axD5U3Ry1NRGm9UqpAiJW3mDj4hAHkpklmrb4cTCKXs=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=lB4EmRUvMFZTnPr46IBGo4p7UFyZC3VnJEJX8NXt8bo9rZQgxUy7WfnbPuE7R1hJk iMZ3p3Zw7HFYR/BR8a0i8ffa7yx2kymKxwSSYhfAcCu/lnM5VA41xWhQA9GqmCuBjf RQt69XMiRQglG3plx72/Rpjpyem3hZrXEJz4gNlE= Message-ID: <5543DDA6.6080702@delphij.net> Date: Fri, 01 May 2015 13:10:14 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Baptiste Daroussin , Sergey Kandaurov CC: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r282314 - in head: include lib/libc/stdlib References: <201505011832.t41IWGSs002284@svn.freebsd.org> <20150501193407.GT13141@ivaldir.etoilebsd.net> In-Reply-To: <20150501193407.GT13141@ivaldir.etoilebsd.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Fri, 01 May 2015 20:10:15 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 05/01/15 12:34, Baptiste Daroussin wrote: > On Fri, May 01, 2015 at 10:22:50PM +0300, Sergey Kandaurov wrote: >> On 1 May 2015 at 21:32, Baptiste Daroussin >> wrote: >>> Author: bapt Date: Fri May 1 18:32:16 2015 New Revision: >>> 282314 URL: https://svnweb.freebsd.org/changeset/base/282314 >>> >>> Log: Import reallocarray(3) from OpenBSD >>> >>> Add a manpage for it, assign the copyright to the OpenBSD >>> project on it since it is mostly copy/paste from OpenBSD >>> manpage. style(9) fixes [..] >> >>> Added: head/lib/libc/stdlib/reallocarray.3 >>> ==================================================================== ========== >>> >>> - --- /dev/null 00:00:00 1970 (empty, because file is newly added) >>> +++ head/lib/libc/stdlib/reallocarray.3 Fri May 1 18:32:16 >>> 2015 (r282314) @@ -0,0 +1,136 @@ +.\" Copyright (c) 2015 >>> OpenBSD +.\" All rights reserved. >> >> This copyright notice looks suspicious. >> > Well I wrote the man page but by copy/pasting code from OpenBSD > malloc(3) manpage which copyright should I set? "OpenBSD" is not a legal entity so the declaration _may_ be invalid (IANL). OpenBSD developers are very careful here, and there is no reason we should do the opposite. Normally you copy the copyright notice altogether (in this case, since the text are mostly new creation from Theo de Raadt, he may have the right to just license this portion to us; they probably didn't do it because the new addition to the malloc(3) manual page is too small to warrant additional owners) or rewrite it to make the copyright ownership clear. I'm kinda disappointed with the fact that there is no seek for public review (e.g. -arch@ or -standard@) on wider audience level for essential system libraries like libc, as others may already working on this in private, by the way. But since the API is already there I guess it should stay. Two comments on the code change itself: a) __FreeBSD_version should be bumped and this should be documented. b) It may be sensible to use __builtin_umul_overflow instead of hand-rolling the same functionality. I think the compiler is not smart enough to handle that. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.2 (FreeBSD) iQIcBAEBCgAGBQJVQ92iAAoJEJW2GBstM+nsBv4P/RadRIHMLOrhlh+31/1Ydwf+ Wv3pQ6SGCDU88Tiqwf0WuuIrMzihyTLMk1AJ6B6uYgV+AEo1dXeCGSfW7aTRgebc oJzxfG/42XvJcZI0SZVIEmGCOOezjkNF0yvx7xJkH7Lqs+wlpTN4nsuROyKlB3K+ 8zYkVIG4SPMZtZRgJbXCdB9/loEETjpCj52Fbku/n+zTKBcraeUiKIliHAhjQOV0 S9Q/+WjpjmK1WukZAn3QB+0abCrsJoHlQNZ/wL6f6IpIilxHJ7oebtgnY3UbzJie nxbPfLDGR2G4n9nZp6sftaSQnIbFiLG20Bs3lWhjXoP0nN05xG3nT9Q5Y7AL/TLZ KLq9phaROT3ssAlxwGEoDXS5aEQIs8LrPs4xLIVtazHAr9bQz8uA3VM/y6a3XDqv u0JreETjyWNNuA27T/Zx8g7/V9+sOVxygtB+MWj7HQocqMw6GBpFs+LoprgyJ76W /7xUqZ8qW7l/Fk1mqgybtxfLckjAdiqgHEWXHeGZHeaJ0smKU+IsPq0PcTD9MDQG CLTDAbkEtfKIm6BHVWwqk8EuEL+yYB1qmXHlx/ejuKZWgBHHZYHDCBN0zbGK868x DMmjzOZDQBH19rCEHemdy945v+SngqSheLLnUQlNnfzuQ4ccTtn+V7fqQDiH1txT KnL/1PZlEWdtSH2bhK+t =HGeH -----END PGP SIGNATURE-----