Sun Jan 29 01:38:02 2017 UTC ()
Update for the new *_size() functions recently added.  Mention the
implicit size limit (128KB) for the functions which do not take an
explicit limit argument.


(pgoyette)
diff -r1.11 -r1.12 src/common/lib/libprop/prop_copyin_ioctl.9

cvs diff -r1.11 -r1.12 src/common/lib/libprop/prop_copyin_ioctl.9 (expand / switch to context diff)
--- src/common/lib/libprop/prop_copyin_ioctl.9 2017/01/15 22:14:22 1.11
+++ src/common/lib/libprop/prop_copyin_ioctl.9 2017/01/29 01:38:02 1.12
@@ -1,4 +1,4 @@
-.\"	$NetBSD: prop_copyin_ioctl.9,v 1.11 2017/01/15 22:14:22 wiz Exp $
+.\"	$NetBSD: prop_copyin_ioctl.9,v 1.12 2017/01/29 01:38:02 pgoyette Exp $
 .\"
 .\" Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 17, 2011
+.Dd January 29, 2017
 .Dt PROP_COPYIN_IOCTL 9
 .Os
 .Sh NAME
@@ -46,9 +46,15 @@
 .Fn prop_array_copyin_ioctl "const struct plistref *pref" \
     "const u_long cmd" "prop_array_t *arrayp"
 .Ft int
+.Fn prop_array_copyin_ioctl_size "const struct plistref *pref" \
+    "const u_long cmd" "prop_array_t *arrayp" "size_t lim"
+.Ft int
 .Fn prop_array_copyin "const struct plistref *pref" \
     "prop_array_t *arrayp"
 .Ft int
+.Fn prop_array_copyin_size "const struct plistref *pref" \
+    "prop_array_t *arrayp" "size_t lim"
+.Ft int
 .Fn prop_array_copyout_ioctl "struct plistref *pref" \
     "const u_long cmd" "prop_array_t array"
 .Ft int
@@ -58,9 +64,15 @@
 .Fn prop_dictionary_copyin_ioctl "const struct plistref *pref" \
     "const u_long cmd" "prop_dictionary_t *dictp"
 .Ft int
+.Fn prop_dictionary_copyin_ioctl_size "const struct plistref *pref" \
+    "const u_long cmd" "prop_dictionary_t *dictp" "size_t lim"
+.Ft int
 .Fn prop_dictionary_copyin "const struct plistref *pref" \
     "prop_dictionary_t *dictp"
 .Ft int
+.Fn prop_dictionary_copyin_size "const struct plistref *pref" \
+    "prop_dictionary_t *dictp" "size_t lim"
+.Ft int
 .Fn prop_dictionary_copyout_ioctl "struct plistref *pref" \
     "const u_long cmd" "prop_dictionary_t dict"
 .Ft int
@@ -68,9 +80,12 @@
     "prop_dictionary_t dict"
 .Sh DESCRIPTION
 The
+.Nm prop_array_ioctl ,
 .Nm prop_array_copyin_ioctl ,
+.Nm prop_array_copyin_ioctl_size ,
 .Nm prop_array_copyout_ioctl ,
 .Nm prop_dictionary_copyin_ioctl ,
+.Nm prop_dictionary_copyin_ioctl_size ,
 and
 .Nm prop_dictionary_copyout_ioctl
 functions implement the kernel side of a protocol for copying property lists
@@ -78,8 +93,10 @@
 .Xr ioctl 2 .
 The functions
 .Nm prop_array_copyin ,
+.Nm prop_array_copyin_size ,
 .Nm prop_array_copyout ,
 .Nm prop_dictionary_copyin ,
+.Nm prop_dictionary_copyin_size ,
 and
 .Nm prop_dictionary_copyout
 implement the kernel side of a protocol for copying property lists to the
@@ -90,6 +107,25 @@
 .Vt struct plistref .
 This structure encapsulates the reference to the property list in externalized
 form.
+.Pp
+The functions
+.Nm prop_array_copyin_ioctl_size ,
+.Nm prop_dictionary_copyin_ioctl_size ,
+.Nm prop_array_copyin_size ,
+and
+.Nm prop_dictionary_copyin_size ,
+take an explicit limit argument
+.Ar lim
+while
+.Nm prop_array_copyin_ioctl ,
+.Nm prop_dictionary_copyin_ioctl ,
+.Nm prop_array_copyin ,
+and
+.Nm prop_dictionary_copyin ,
+have an implicit size limit of 128KB.
+Attempts to transfer objects larger than the limit result in an
+.Er E2BIG
+return value.
 .Sh RETURN VALUES
 If successful, functions return zero.
 Otherwise, an error number will be returned to indicate the error.