History log of /netbsd-current/common/lib/libprop/prop_array.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.22 26-Mar-2023 andvar

fix various typos in documentation, comments and sysctl device description.
mainly aion -> ation and inlude -> include.


Revision tags: netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 bouyer-xenpvh-base phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE tls-maxphys-20171202 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.21 27-Jul-2012 pooka

branches: 1.21.34;
Bit-un-rot the proplib portability layer.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE yamt-nfs-mp-base11 netbsd-5-1-RC4 matt-nb5-mips64-k15 yamt-nfs-mp-base10 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 rmind-uvmplock-base yamt-nfs-mp-base9 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase yamt-nfs-mp-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
# 1.20 11-Aug-2008 christos

branches: 1.20.2;
typo in comment and white-space fixes mostly from Stathis Kamperis


# 1.19 03-Aug-2008 thorpej

Fix an issue introduced with the prop_stack change: It's not a good idea to
return a 3-value enum from a function declared to return bool. This broke
the recurse case for prop_object_equals(). Instead, declare the object type
equals routine to return a _prop_object_equals_rv_t.

Give the same treatment to the object type free routines: declare them to
return a _prop_object_free_rv_t, and consistently check those return values
againt the enum type.

Tidy up some whitespace while we're here.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.18 24-May-2008 yamt

fix recursive read-lock bugs found by lockdebug and reported
by Geoff C. Wing and others. ok'ed by Jason Thorpe.
an earlier version was tested by Sverre Froyen.
PR/38732 from oster@.


# 1.17 24-May-2008 yamt

revert the recent "use trylock to hide locking errors" changes
and their associated changes, in particular, the following versions.
prop_array.c 1.13-1.16
prop_dictionary.c 1.25-1.28
prop_object_impl.h 1.21-1.25
ok'ed by core@.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2
# 1.16 07-May-2008 tron

branches: 1.16.2;
Change the argument of _PROP_RWLOCK_TRYRDLOCK() to the lock member and not
its address to be consistent with all the other macros.


# 1.15 07-May-2008 tron

Replace _prop_rwlock_tryrdlock() by a macro _PROP_RWLOCK_TRYRDLOCK().
This avoids build failures in stand alone binaries (e.g. bootloaders)
where there is no "pa_rwlock" member in the "_prop_array" structure.


# 1.14 06-May-2008 xtraeme

prop_object_iterator_next() and prop_object_iterator_reset() were
acquiring the rwlock recursively in some paths.

Introduce _prop_rwlock_tryrdlock() and use it in these functions, so
that the rwlock is *always* acquired once, while here add some
_PROP_RWLOCK_OWNED asserts to verify.

This definitely fixes the "locking against myself" panics.


# 1.13 06-May-2008 xtraeme

Do not acquire the rwlock recursively in prop_{array,dictionary}_iterator_reset()
when prop_{array,dictionary}_copyout_ioctl() is called.

Introduce _PROP_RWLOCK_OWNED() which is a KASSERT(rw_lock_held(lock))
and use it in those two functions, also acquire the rwlock in other
places where it is required now.

This fixes a LOCKDEBUG panic "locking against myself", as reported by
Geoff C. Wing in current-users@.


# 1.12 28-Apr-2008 martin

Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-base matt-armv6-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base reinoud-bufcleanup-nbase yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-armv6-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.11 30-Aug-2007 joerg

branches: 1.11.6;
Avoid using unbound amount of stack frames in prop_object_equal
by using a dynamic stack as well. Reorder arguments for the internalizer
as the iteration is always present and should go before possibly
NULL arguments.

Reviewed by mjf@ and adrianp@


# 1.10 16-Aug-2007 joerg

branches: 1.10.2;
libprop is currently using a recursive parser. While this is fine for
userland, deeply nested arrays and dictionaries can easily overflow
the kernel stack and thereby force a panic.

Fix the internalizer and prop_object_release to use a separate call
stack and alter the dictionary and array handling to not recurse on
the C stack. The default stack has an inline depth of 16 elements,
which should keep the overhead reasonable.

This issue was found by Pavel Cahyna and Jachym Holecek.

Additionally add a limit for prop_object_copyin_ioctl to prevent user
programs from temporary allocating unbound amount of kernel memory.
Allow malloc to fail so that tight loops of userland processes can't
force panics by exhausting the kernel map.

Tested with the sample exploit of Jachym, his test suite and reviewed
by himself (initial patch), Christos Zoulas and Jason Thorpe.


# 1.9 16-Aug-2007 thorpej

boolean_t -> bool
TRUE -> true
FALSE -> false


Revision tags: matt-mips64-base
# 1.8 16-Jul-2007 joerg

prop_array_internalize and prop_dictionary_internalize are basically the
same code. Refactor it into _prop_generic_internalize, which gets passed
the second-level tag.


Revision tags: netbsd-4-0-RC1 yamt-idlelwp-base8 thorpej-atomic-base vmlocking-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base yamt-splraiseipl-base2 netbsd-4-base
# 1.7 03-Oct-2006 thorpej

branches: 1.7.2; 1.7.4; 1.7.12;
- Add a reader-writer lock to array and dictionary objects that ensures that
the data structure is internally consistent in the face of multiple threads
accessing it concurrently. This is not designed to provide application-
level semantic consistency; applications are responsible for that locking
protocol should it be necessary.
- Rename _PROP_MUTEX_DECL() to _PROP_MUTEX_DECL_STATIC().


Revision tags: yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8
# 1.6 22-Aug-2006 thorpej

Also guard object accessors against NULL (like we do foreign object types)
so that apps can use this construct safely:

obj = prop_dictionary_get(dict, "value");
if (! prop_number_equals_integer(obj, 5)) {
...
}

Suggested by Iain Hibbert.


# 1.5 21-Aug-2006 he

Add a workaround for a GCC -Wuninitialized mis-warning (seen for mips).


# 1.4 21-Aug-2006 thorpej

Several changes to proplib:
- Arrays can now be externalized and internalized in the same way
dictionaries can.
- Add new "externalize to file" and "internalize from file" functions
to make reading a property list from a file and writing a property
list to a file more convenient.
- Many assertions in the object implementations are gone. Instead,
calling an accessor for one object type with a different object type
as an argument will return a suitable "invalid" value.
- prop_object_type() now returns a new PROP_TYPE_UNKNOWN value if called
with a NULL object.
- Externalized property lists now contain a reference to the Apple XML
plist DTD.
- Add a new prop_ingest(3) facility, which provides a convenient way to
translate a dictionary into an arbitrary binary representation.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6
# 1.3 28-May-2006 thorpej

branches: 1.3.2;
Fix the way that prop_array_ensure_capacity() and _prop_array_expand()
interact.


Revision tags: yamt-pdpolicy-base5
# 1.2 18-May-2006 thorpej

- Add prop_array_equals(), prop_dictionary_equals(), and
prop_dictionary_keysym_equals(), and prop_object_equals() functions.
- Use realloc() where it makes sense. There will be more changes in this
area.
- Add a _prop_object_type structure that is used internally to keep
information about the object types. Decreases the footprint of the
objects slightly by replacing several pointers with just one.


# 1.1 27-Apr-2006 thorpej

Initial commit of proplib, a library for manipulating property lists and
converting to/from an XML external representation (based on Apple XML
property lists). Works in the kernel and user space.


# 1.21 27-Jul-2012 pooka

Bit-un-rot the proplib portability layer.


# 1.20 10-Aug-2008 christos

branches: 1.20.2;
typo in comment and white-space fixes mostly from Stathis Kamperis


# 1.19 02-Aug-2008 thorpej

Fix an issue introduced with the prop_stack change: It's not a good idea to
return a 3-value enum from a function declared to return bool. This broke
the recurse case for prop_object_equals(). Instead, declare the object type
equals routine to return a _prop_object_equals_rv_t.

Give the same treatment to the object type free routines: declare them to
return a _prop_object_free_rv_t, and consistently check those return values
againt the enum type.

Tidy up some whitespace while we're here.


# 1.18 24-May-2008 yamt

fix recursive read-lock bugs found by lockdebug and reported
by Geoff C. Wing and others. ok'ed by Jason Thorpe.
an earlier version was tested by Sverre Froyen.
PR/38732 from oster@.


# 1.17 24-May-2008 yamt

revert the recent "use trylock to hide locking errors" changes
and their associated changes, in particular, the following versions.
prop_array.c 1.13-1.16
prop_dictionary.c 1.25-1.28
prop_object_impl.h 1.21-1.25
ok'ed by core@.


# 1.16 07-May-2008 tron

branches: 1.16.2;
Change the argument of _PROP_RWLOCK_TRYRDLOCK() to the lock member and not
its address to be consistent with all the other macros.


# 1.15 07-May-2008 tron

Replace _prop_rwlock_tryrdlock() by a macro _PROP_RWLOCK_TRYRDLOCK().
This avoids build failures in stand alone binaries (e.g. bootloaders)
where there is no "pa_rwlock" member in the "_prop_array" structure.


# 1.14 06-May-2008 xtraeme

prop_object_iterator_next() and prop_object_iterator_reset() were
acquiring the rwlock recursively in some paths.

Introduce _prop_rwlock_tryrdlock() and use it in these functions, so
that the rwlock is *always* acquired once, while here add some
_PROP_RWLOCK_OWNED asserts to verify.

This definitely fixes the "locking against myself" panics.


# 1.13 06-May-2008 xtraeme

Do not acquire the rwlock recursively in prop_{array,dictionary}_iterator_reset()
when prop_{array,dictionary}_copyout_ioctl() is called.

Introduce _PROP_RWLOCK_OWNED() which is a KASSERT(rw_lock_held(lock))
and use it in those two functions, also acquire the rwlock in other
places where it is required now.

This fixes a LOCKDEBUG panic "locking against myself", as reported by
Geoff C. Wing in current-users@.


# 1.12 28-Apr-2008 martin

Remove clause 3 and 4 from TNF licenses


# 1.11 30-Aug-2007 joerg

branches: 1.11.6;
Avoid using unbound amount of stack frames in prop_object_equal
by using a dynamic stack as well. Reorder arguments for the internalizer
as the iteration is always present and should go before possibly
NULL arguments.

Reviewed by mjf@ and adrianp@


# 1.10 16-Aug-2007 joerg

branches: 1.10.2;
libprop is currently using a recursive parser. While this is fine for
userland, deeply nested arrays and dictionaries can easily overflow
the kernel stack and thereby force a panic.

Fix the internalizer and prop_object_release to use a separate call
stack and alter the dictionary and array handling to not recurse on
the C stack. The default stack has an inline depth of 16 elements,
which should keep the overhead reasonable.

This issue was found by Pavel Cahyna and Jachym Holecek.

Additionally add a limit for prop_object_copyin_ioctl to prevent user
programs from temporary allocating unbound amount of kernel memory.
Allow malloc to fail so that tight loops of userland processes can't
force panics by exhausting the kernel map.

Tested with the sample exploit of Jachym, his test suite and reviewed
by himself (initial patch), Christos Zoulas and Jason Thorpe.


# 1.9 15-Aug-2007 thorpej

boolean_t -> bool
TRUE -> true
FALSE -> false


# 1.8 16-Jul-2007 joerg

prop_array_internalize and prop_dictionary_internalize are basically the
same code. Refactor it into _prop_generic_internalize, which gets passed
the second-level tag.


# 1.7 03-Oct-2006 thorpej

branches: 1.7.2; 1.7.4; 1.7.12;
- Add a reader-writer lock to array and dictionary objects that ensures that
the data structure is internally consistent in the face of multiple threads
accessing it concurrently. This is not designed to provide application-
level semantic consistency; applications are responsible for that locking
protocol should it be necessary.
- Rename _PROP_MUTEX_DECL() to _PROP_MUTEX_DECL_STATIC().


# 1.6 22-Aug-2006 thorpej

Also guard object accessors against NULL (like we do foreign object types)
so that apps can use this construct safely:

obj = prop_dictionary_get(dict, "value");
if (! prop_number_equals_integer(obj, 5)) {
...
}

Suggested by Iain Hibbert.


# 1.5 21-Aug-2006 he

Add a workaround for a GCC -Wuninitialized mis-warning (seen for mips).


# 1.4 20-Aug-2006 thorpej

Several changes to proplib:
- Arrays can now be externalized and internalized in the same way
dictionaries can.
- Add new "externalize to file" and "internalize from file" functions
to make reading a property list from a file and writing a property
list to a file more convenient.
- Many assertions in the object implementations are gone. Instead,
calling an accessor for one object type with a different object type
as an argument will return a suitable "invalid" value.
- prop_object_type() now returns a new PROP_TYPE_UNKNOWN value if called
with a NULL object.
- Externalized property lists now contain a reference to the Apple XML
plist DTD.
- Add a new prop_ingest(3) facility, which provides a convenient way to
translate a dictionary into an arbitrary binary representation.


# 1.3 27-May-2006 thorpej

branches: 1.3.2;
Fix the way that prop_array_ensure_capacity() and _prop_array_expand()
interact.


# 1.2 17-May-2006 thorpej

- Add prop_array_equals(), prop_dictionary_equals(), and
prop_dictionary_keysym_equals(), and prop_object_equals() functions.
- Use realloc() where it makes sense. There will be more changes in this
area.
- Add a _prop_object_type structure that is used internally to keep
information about the object types. Decreases the footprint of the
objects slightly by replacing several pointers with just one.


# 1.1 27-Apr-2006 thorpej

Initial commit of proplib, a library for manipulating property lists and
converting to/from an XML external representation (based on Apple XML
property lists). Works in the kernel and user space.


# 1.3.2.3 01-Sep-2006 tron

Pull up following revision(s) (requested by riz in ticket #87):
common/lib/libprop/prop_array.c: revision 1.5
Add a workaround for a GCC -Wuninitialized mis-warning (seen for mips).


# 1.3.2.2 26-Aug-2006 riz

Pull up following revision(s) (requested by thorpej in ticket #51):
common/lib/libprop/prop_dictionary.c: revision 1.11
common/lib/libprop/prop_number.c: revision 1.5
common/lib/libprop/prop_bool.c: revision 1.5
common/lib/libprop/prop_data.c: revision 1.4
common/lib/libprop/prop_string.c: revision 1.4
common/lib/libprop/prop_array.c: revision 1.6
Also guard object accessors against NULL (like we do foreign object
types)
so that apps can use this construct safely:
obj = prop_dictionary_get(dict, "value");
if (! prop_number_equals_integer(obj, 5)) {
...
}
Suggested by Iain Hibbert.


# 1.3.2.1 23-Aug-2006 tron

Pull up following revision(s) (requested by thorpej in ticket #43):
common/include/prop/prop_ingest.h: revision 1.1
common/lib/libprop/prop_number.c: revision 1.4
common/include/prop/prop_array.h: revision 1.3
common/lib/libprop/prop_object_impl.h: revision 1.4
common/include/prop/prop_dictionary.h: revision 1.4
distrib/sets/lists/comp/mi: revision 1.911
common/include/prop/Makefile: revision 1.2
common/lib/libprop/prop_bool.c: revision 1.4
distrib/sets/lists/base/shl.mi: revision 1.365
common/lib/libprop/prop_data.c: revision 1.3
lib/libprop/shlib_version: revision 1.4
lib/libprop/Makefile: revision 1.6
common/lib/libprop/prop_object.c: revision 1.4
common/lib/libprop/prop_object.3: revision 1.4
common/include/prop/proplib.h: revision 1.3
common/lib/libprop/Makefile.inc: revision 1.3
common/include/prop/prop_object.h: revision 1.4
common/lib/libprop/prop_array.c: revision 1.4
common/lib/libprop/prop_array.3: revision 1.4
common/lib/libprop/prop_string.c: revision 1.3
common/lib/libprop/prop_dictionary.3: revision 1.4
common/lib/libprop/prop_ingest.c: revision 1.1
common/lib/libprop/prop_ingest.3: revision 1.1
common/lib/libprop/prop_dictionary.c: revision 1.9
Several changes to proplib:
- Arrays can now be externalized and internalized in the same way
dictionaries can.
- Add new "externalize to file" and "internalize from file" functions
to make reading a property list from a file and writing a property
list to a file more convenient.
- Many assertions in the object implementations are gone. Instead,
calling an accessor for one object type with a different object type
as an argument will return a suitable "invalid" value.
- prop_object_type() now returns a new PROP_TYPE_UNKNOWN value if called
with a NULL object.
- Externalized property lists now contain a reference to the Apple XML
plist DTD.
- Add a new prop_ingest(3) facility, which provides a convenient way to
translate a dictionary into an arbitrary binary representation.


# 1.7.12.1 29-Sep-2007 wrstuden

Catch up on netbsd-4 as of a few days ago.


# 1.7.4.1 26-Sep-2007 xtraeme

Pull up following revision(s) (requested by joerg in ticket #904):
sbin/veriexecctl/veriexecctl.c: revision 1.29 (via patch)
common/lib/libprop/prop_string.c: revision 1.9 (via patch)
distrib/sets/lists/comp/mi: revision 1.1063 (via patch)
common/lib/libprop/prop_kern.c: revision 1.8 (via patch)
common/include/prop/prop_string.h: revision 1.2 (via patch)
common/include/prop/prop_ingest.h: revision 1.2 (via patch)
usr.sbin/btdevctl/btdevctl.c: revision 1.5 (via patch)
common/lib/libprop/prop_object_impl.h: revision 1.14 (via patch)
common/lib/libprop/prop_rb.c: revision 1.7 (via patch)
common/include/prop/prop_array.h: revision 1.5 (via patch)
common/lib/libprop/prop_stack.h: revision 1.1 (via patch)
common/lib/libprop/prop_object_impl.h: revision 1.16 (via patch)
common/lib/libprop/prop_number.3: revision 1.7 (via patch)
common/lib/libprop/prop_stack.h: revision 1.2 (via patch)
common/lib/libprop/prop_stack.c: revision 1.1 (via patch)
common/lib/libprop/prop_object_impl.h: revision 1.17 (via patch)
common/lib/libprop/prop_dictionary_util.c: revision 1.2 (via patch)
common/lib/libprop/prop_dictionary_util.3: revision 1.2 (via patch)
common/lib/libprop/prop_dictionary.c: revision 1.18 (via patch)
common/lib/libprop/prop_stack.c: revision 1.2 (via patch)
common/lib/libprop/prop_object_impl.h: revision 1.18 (via patch)
common/lib/libprop/prop_dictionary.c: revision 1.19 (via patch)
common/include/prop/prop_bool.h: revision 1.3 (via patch)
common/include/prop/prop_dictionary.h: revision 1.7 (via patch)
common/include/prop/prop_data.h: revision 1.2 (via patch)
sys/sys/dkio.h: revision 1.14 (via patch)
usr.sbin/btdevctl/sdp.c: revision 1.4 (via patch)
common/include/prop/Makefile: revision 1.3 (via patch)
common/include/prop/prop_number.h: revision 1.5 (via patch)
common/lib/libprop/prop_object.c: revision 1.14 (via patch)
common/lib/libprop/prop_object.c: revision 1.15 (via patch)
common/lib/libprop/prop_object.c: revision 1.16 (via patch)
common/lib/libprop/prop_bool.3: revision 1.3 (via patch)
common/lib/libprop/prop_data.3: revision 1.4 (via patch)
common/lib/libprop/prop_object.3: revision 1.6 (via patch)
common/lib/libprop/prop_data.c: revision 1.7 (via patch)
common/lib/libprop/prop_data.c: revision 1.8 (via patch)
common/lib/libprop/prop_data.c: revision 1.9 (via patch)
common/lib/libprop/prop_dictionary.c: revision 1.20 (via patch)
usr.sbin/btdevctl/print.c: revision 1.9 (via patch)
sbin/veriexecctl/veriexecctl_parse.y: revision 1.22 (via patch)
common/lib/libprop/prop_number.c: revision 1.12 (via patch)
common/include/prop/proplib.h: revision 1.5 (via patch)
common/lib/libprop/prop_number.c: revision 1.13 (via patch)
common/lib/libprop/prop_number.c: revision 1.14 (via patch)
common/include/prop/prop_object.h: revision 1.5 (via patch)
common/lib/libprop/prop_array.3: revision 1.5 (via patch)
common/include/prop/prop_object.h: revision 1.6 (via patch)
common/lib/libprop/prop_string.3: revision 1.4 (via patch)
common/lib/libprop/prop_bool.c: revision 1.10 (via patch)
common/lib/libprop/Makefile.inc: revision 1.6 (via patch)
common/lib/libprop/prop_ingest.c: revision 1.2 (via patch)
common/lib/libprop/prop_bool.c: revision 1.11 (via patch)
common/lib/libprop/prop_array.c: revision 1.10 (via patch)
common/lib/libprop/prop_ingest.3: revision 1.3 (via patch)
common/lib/libprop/prop_bool.c: revision 1.12 (via patch)
common/lib/libprop/prop_array.c: revision 1.11 (via patch)
common/lib/libprop/prop_string.c: revision 1.7 (via patch)
common/lib/libprop/prop_dictionary.3: revision 1.8 (via patch)
common/lib/libprop/prop_array.c: revision 1.9 (via patch)
usr.sbin/btdevctl/db.c: revision 1.4 (via patch)
common/lib/libprop/prop_string.c: revision 1.8 (via patch)
common/include/prop/plistref.h: revision 1.1 (via patch)
Consider '\r' to be white space. Discussed with and also kept as local
change by freza. With this change, DOS style line endings work.

boolean_t -> bool
TRUE -> true
FALSE -> false

libprop is currently using a recursive parser. While this is fine for
userland, deeply nested arrays and dictionaries can easily overflow
the kernel stack and thereby force a panic.

Fix the internalizer and prop_object_release to use a separate call
stack and alter the dictionary and array handling to not recurse on
the C stack. The default stack has an inline depth of 16 elements,
which should keep the overhead reasonable.

This issue was found by Pavel Cahyna and Jachym Holecek.

Additionally add a limit for prop_object_copyin_ioctl to prevent user
programs from temporary allocating unbound amount of kernel memory.

Allow malloc to fail so that tight loops of userland processes can't
force panics by exhausting the kernel map.

Tested with the sample exploit of Jachym, his test suite and reviewed
by himself (initial patch), Christos Zoulas and Jason Thorpe.
struct plistref does not reference other proplib data types, so split it
in its own header file to be included by dkio.h. Fixes breakage due to
pollution from proplib.h in programs which include ioctl.h. Tested and OK
by dogcow@.

Attempt at fixing build failures after proplib was converted to bool:
FALSE -> false, TRUE -> true, boolean_t -> bool, int -> bool when
appropriate, include stdbool.h . proplib.h no longer provides boolean_t,
so it is necessary to change to bool.
From Tom Spindler (dogcow@).

Avoid using unbound amount of stack frames in prop_object_equal
by using a dynamic stack as well. Reorder arguments for the internalizer
as the iteration is always present and should go before possibly
NULL arguments.
Reviewed by mjf@ and adrianp@


# 1.7.2.2 03-Oct-2006 thorpej

- Add a reader-writer lock to array and dictionary objects that ensures that
the data structure is internally consistent in the face of multiple threads
accessing it concurrently. This is not designed to provide application-
level semantic consistency; applications are responsible for that locking
protocol should it be necessary.
- Rename _PROP_MUTEX_DECL() to _PROP_MUTEX_DECL_STATIC().


# 1.7.2.1 03-Oct-2006 thorpej

file prop_array.c was added on branch newlock2 on 2006-10-03 15:45:05 +0000


# 1.10.2.1 06-Nov-2007 matt

sync with HEAD


# 1.11.6.2 03-Jun-2008 yamt

sync with head


# 1.11.6.1 18-May-2008 yamt

sync with head.


# 1.16.2.2 17-Sep-2008 wrstuden

Sync with wrstuden-revivesa-base-2.


# 1.16.2.1 22-Jun-2008 wrstuden

Sync w/ -current. 34 merge conflicts to follow.


# 1.20.2.1 30-Oct-2012 yamt

sync with head