| #
95f94af3 |
| 26-Mar-2023 |
andvar <andvar@NetBSD.org> |
fix various typos in documentation, comments and sysctl device description. mainly aion -> ation and inlude -> include.
|
| #
c303bcbe |
| 27-Jul-2012 |
pooka <pooka@NetBSD.org> |
Bit-un-rot the proplib portability layer.
|
| #
ecd6bc70 |
| 11-Aug-2008 |
christos <christos@NetBSD.org> |
typo in comment and white-space fixes mostly from Stathis Kamperis
|
| #
4ce0dc3a |
| 03-Aug-2008 |
thorpej <thorpej@NetBSD.org> |
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(). Inst
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.
show more ...
|
| #
75b1a2ec |
| 24-May-2008 |
yamt <yamt@NetBSD.org> |
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@.
|
| #
6787eede |
| 24-May-2008 |
yamt <yamt@NetBSD.org> |
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_
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@.
show more ...
|
| #
e70ab693 |
| 07-May-2008 |
tron <tron@NetBSD.org> |
Change the argument of _PROP_RWLOCK_TRYRDLOCK() to the lock member and not its address to be consistent with all the other macros.
|
| #
2916b940 |
| 07-May-2008 |
tron <tron@NetBSD.org> |
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" s
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.
show more ...
|
| #
35fe7cdc |
| 06-May-2008 |
xtraeme <xtraeme@NetBSD.org> |
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
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.
show more ...
|
| #
771a05b7 |
| 06-May-2008 |
xtraeme <xtraeme@NetBSD.org> |
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_he
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@.
show more ...
|
| #
ce099b40 |
| 28-Apr-2008 |
martin <martin@NetBSD.org> |
Remove clause 3 and 4 from TNF licenses
|
| #
4deb5931 |
| 30-Aug-2007 |
joerg <joerg@NetBSD.org> |
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 possib
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@
show more ...
|
| #
e835604c |
| 16-Aug-2007 |
joerg <joerg@NetBSD.org> |
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 internal
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.
show more ...
|
| #
04377267 |
| 16-Aug-2007 |
thorpej <thorpej@NetBSD.org> |
boolean_t -> bool TRUE -> true FALSE -> false
|
| #
39dccbf2 |
| 16-Jul-2007 |
joerg <joerg@NetBSD.org> |
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.
|
| #
eb2acb85 |
| 03-Oct-2006 |
thorpej <thorpej@NetBSD.org> |
- 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 de
- 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().
show more ...
|
| #
beabdd9b |
| 22-Aug-2006 |
thorpej <thorpej@NetBSD.org> |
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(ob
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.
show more ...
|
| #
1a119b51 |
| 21-Aug-2006 |
he <he@NetBSD.org> |
Add a workaround for a GCC -Wuninitialized mis-warning (seen for mips).
|
| #
d21620b2 |
| 21-Aug-2006 |
thorpej <thorpej@NetBSD.org> |
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 readi
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.
show more ...
|
| #
42e8dee3 |
| 28-May-2006 |
thorpej <thorpej@NetBSD.org> |
Fix the way that prop_array_ensure_capacity() and _prop_array_expand() interact.
|
| #
3e69f1b2 |
| 18-May-2006 |
thorpej <thorpej@NetBSD.org> |
- 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 th
- 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.
show more ...
|
| #
774eb1a3 |
| 27-Apr-2006 |
thorpej <thorpej@NetBSD.org> |
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.
|