#
6620d0c7 |
| 12-Jun-2020 |
thorpej <thorpej@NetBSD.org> |
Change previous to only apply when building with clang.
|
#
3c4ddcbf |
| 11-Jun-2020 |
joerg <joerg@NetBSD.org> |
Unbreak clang builds by removing questionable linker warning sections trggered all over the place.
|
#
a792b843 |
| 06-Jun-2020 |
thorpej <thorpej@NetBSD.org> |
Improvements to the problib(3) API:
==> Provide a much more complete set of setters and getters for different value types in the prop_array_util(3) and prop_dictionary_util(3) functions.
==
Improvements to the problib(3) API:
==> Provide a much more complete set of setters and getters for different value types in the prop_array_util(3) and prop_dictionary_util(3) functions.
==> Overhaul the prop_data(3), prop_number(3), and prop_string(3) APIs to be easier to use and less awkwardly named, Deprecate the old awkward names, and produce link-time warnings when they are referenced.
==> Deprecate mutable prop_data(3) and prop_string(3) objects. The old APIs that support them still exist, but will now produce link-time warnings when used.
==> When the new prop_string(3) API is used, strings are internally de-duplicated as a memory footprint optimization.
==> Provide a rich set of bounds-checked gettter functions in and a corresponding set of convenience setters in the prop_number(3) API.
==> Add a new prop_bool_value(3) function that is equivalent to prop_bool_true(3), but aligned with the new "value" routines in prop_data(3), prop_string(3), and prop_number(3).
show more ...
|
#
8319f966 |
| 08-May-2019 |
thorpej <thorpej@NetBSD.org> |
Fix building libprop as a host tool library on platforms that don't have the Matt Thomas rbtree:
- Include rb.c in libnbcompat, and provide a nbcompat sys/rbtree.h header. - Make sure libprop's so
Fix building libprop as a host tool library on platforms that don't have the Matt Thomas rbtree:
- Include rb.c in libnbcompat, and provide a nbcompat sys/rbtree.h header. - Make sure libprop's source file include prop_object_impl.h before anything else, and pull in nbtool_config.h from there.
Tested by simulating such a host system by renaming the host's <sys/rbtree.h> out of the way (which reproduced the build failure) and verifying that the host-tool installboot contained the rb_* functions in its own .text segment.
show more ...
|
#
272b1fe3 |
| 11-May-2015 |
christos <christos@NetBSD.org> |
Don't treat NUL (EOF) as SPACE. All the code that uses _PROP_ISSPACE() checks explicitly for _PROP_EOF() anyway, and this can be abused to cause run beyond the end of buffer DoS (Mateusz Kocielski) X
Don't treat NUL (EOF) as SPACE. All the code that uses _PROP_ISSPACE() checks explicitly for _PROP_EOF() anyway, and this can be abused to cause run beyond the end of buffer DoS (Mateusz Kocielski) XXX: pullup-7
show more ...
|
#
c303bcbe |
| 27-Jul-2012 |
pooka <pooka@NetBSD.org> |
Bit-un-rot the proplib portability layer.
|
#
fbd53556 |
| 13-Sep-2009 |
pooka <pooka@NetBSD.org> |
Wipe out the last vestiges of POOL_INIT with one swift stroke. In most cases, use a proper constructor. For proplib, give a local equivalent of POOL_INIT for the kernel object implementation. This
Wipe out the last vestiges of POOL_INIT with one swift stroke. In most cases, use a proper constructor. For proplib, give a local equivalent of POOL_INIT for the kernel object implementation. This way the code structure can be preserved, and a local link set is not hazardous anyway (unless proplib is split to several modules, but that'll be the day).
tested by booting a kernel in qemu and compile-testing i386/ALL
show more ...
|
#
b6e6025d |
| 03-Jan-2009 |
pooka <pooka@NetBSD.org> |
Get rid of locks with static initializers using once and atomic ops. This makes proplib simplelock-free.
|
#
e51aea32 |
| 30-Nov-2008 |
haad <haad@NetBSD.org> |
Fix two race conditions in proplib library. In prop_dictionary and prop_number there was small window in which was entry left in rb tree with reference count 0 which lead to rb tree coruption when an
Fix two race conditions in proplib library. In prop_dictionary and prop_number there was small window in which was entry left in rb tree with reference count 0 which lead to rb tree coruption when another thread picked this up before it was released. Add 2 new members to the prop_object_t which are used for locking/unlocking rb tree guard mutex.
Ok by joerg@, core@, thorpej@
show more ...
|
#
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 ...
|
#
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 ...
|
#
4ec02db9 |
| 07-May-2008 |
simonb <simonb@NetBSD.org> |
Fix a "#define<tab><tab>" that crept in to previous.
|
#
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
|
#
93244877 |
| 05-Jan-2008 |
ad <ad@NetBSD.org> |
Include sys/simplelock.h in prop_object_impl.h.
|
#
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
|
#
79ba10e0 |
| 29-Jul-2007 |
ad <ad@NetBSD.org> |
lockmgr > rwlock
|
#
22549e91 |
| 17-Jul-2007 |
joerg <joerg@NetBSD.org> |
Consider '\r' to be white space. Discussed with and also kept as local change by freza. With this change, DOS style line endings work.
|
#
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.
|
#
59d979c5 |
| 12-Mar-2007 |
ad <ad@NetBSD.org> |
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing the pool's lock.
|