From owner-svn-src-head@freebsd.org Mon May 11 22:48:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B2C02D972C; Mon, 11 May 2020 22:48:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49LbgP1cLSz4Kvj; Mon, 11 May 2020 22:48:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3290225DF7; Mon, 11 May 2020 22:48:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04BMm1KJ090369; Mon, 11 May 2020 22:48:01 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04BMm1Ap090368; Mon, 11 May 2020 22:48:01 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202005112248.04BMm1Ap090368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 11 May 2020 22:48:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360943 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 360943 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 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, 11 May 2020 22:48:01 -0000 Author: cem Date: Mon May 11 22:48:00 2020 New Revision: 360943 URL: https://svnweb.freebsd.org/changeset/base/360943 Log: copystr(9): Move to deprecate [1/2] Unlike the other copy*() functions, it does not serve to copy from one address space to another or protect against potential faults. It's just an older incarnation of the now-more-common strlcpy(). Reviewed by: jhb MFC after: i² days Differential Revision: yes (see 2/2) Modified: head/share/man/man9/copy.9 Modified: head/share/man/man9/copy.9 ============================================================================== --- head/share/man/man9/copy.9 Mon May 11 22:47:20 2020 (r360942) +++ head/share/man/man9/copy.9 Mon May 11 22:48:00 2020 (r360943) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 15, 2017 +.Dd May 11, 2020 .Dt COPY 9 .Os .Sh NAME @@ -45,7 +45,7 @@ .Nm copyout_nofault , .Nm copystr , .Nm copyinstr -.Nd kernel copy functions +.Nd heterogenous address space copy functions .Sh SYNOPSIS .In sys/types.h .In sys/systm.h @@ -57,18 +57,21 @@ .Fn copyout "const void *kaddr" "void *uaddr" "size_t len" .Ft int .Fn copyout_nofault "const void *kaddr" "void *uaddr" "size_t len" -.Ft int +.Ft int __deprecated .Fn copystr "const void *kfaddr" "void *kdaddr" "size_t len" "size_t *done" .Ft int .Fn copyinstr "const void *uaddr" "void *kaddr" "size_t len" "size_t *done" .Sh DESCRIPTION The .Nm -functions are designed to copy contiguous data from one address +functions are designed to copy contiguous data from one address space to another. -All but +.Pp .Fn copystr -copy data from user-space to kernel-space or vice-versa. +is deprecated and should be replaced with +.Xr strlcpy 9 . +It will be removed from +.Fx 13 . .Pp The .Fn copyin