summaryrefslogtreecommitdiffstats
path: root/include/cutils
Commit message (Collapse)AuthorAgeFilesLines
* libcutils: qtaguid: Support new functions, add tag resource tracking.JP Abgrall2011-09-141-0/+24
| | | | | | | | | | | | | | | | | | | | | | | * Add support for deleteTagData(tag, uid) setCounterSet(counterSetNum, uid) setPacifier(on) * Add resource tracking (If only kernel process termination had a hook) Because the xt_qtaguid netfilter module needs to keep track of tagged sockets, it needs a way to know when the process owning the socket has died. Normally the app will untag the sockets. But not on crash. So the process opens the qtaguid misc dev, which is closed on crash, at which point the xt_qtaguid can force-untag the processes sockets, and thus allowing their refcount to go down and release them. * Add pacifier support Add function to enable/disable pacification of the xt_qtaguid kernel module. (mostly for debugging) Change-Id: I7f2228e65208046dd37ec1c7407ee307d5ba9b99
* init/cutils: move list utility code to cutils from initDima Zavin2011-09-021-0/+51
| | | | | Change-Id: I357ceee813700297d8343159f22a07659e768d41 Signed-off-by: Dima Zavin <dima@android.com>
* init/cutils: move kernel logging interface to libcutils from initDima Zavin2011-09-021-0/+34
| | | | | Change-Id: Ia0f91b1fcd6cae69d76bf3dd841340958db938a8 Signed-off-by: Dima Zavin <dima@android.com>
* libcutils/init: move uevent socket opening code to libcutilsDima Zavin2011-09-021-0/+2
| | | | | Change-Id: I90adf78c0eb6185505f2bf7b62e96e25ab918345 Signed-off-by: Dima Zavin <dima@android.com>
* libcutils: qtaguid: support socket untagging, return errors.Ashish Sharma2011-08-071-1/+6
| | | | | | | | | - Enable and rename qtaguid_tagSocket() - Add qtaguid_untagSocket() - Return kernel errors to caller Change-Id: I8e33c8832b7f6b24ed9081f36ce1ea9ae6b099c0 Signed-off-by: Ashish Sharma <ashishsharma@google.com>
* Fix header file inclusion for type uid_t.Ashish Sharma2011-07-101-0/+1
| | | | Change-Id: I401fc0b41b4b77114fce7240662c9dfe4509e841
* Add communication support for xt_qtaguid(network traffic accounting) kernel ↵Ashish Sharma2011-07-081-0/+36
| | | | | | module. Change-Id: Ie0fb5b593987c53ee6f906fe6e0caab5a581d5a1
* Merge "Config utils improvement"Eric Laurent2011-05-271-0/+3
|\
| * Config utils improvementEric Laurent2011-05-261-0/+3
| | | | | | | | | | | | Added a function to free resources allocated by config node tree. Change-Id: I2ee8ae642899ec4501fa6e490c5be7efaa2d738e
* | Tracking merge of dalvik-dev to masterjeffhao2011-05-271-1/+13
| | | | | | | | | | | | | | | | | | | | Reordered bootclasspath to allow verification of all framework methods. git cherry-pick --no-commit ec164a0170955fe63106c2576a65bc4ffb1df425 Address CVE-2011-1090. git cherry-pick --no-commit 3365288d3c00072689cd9d733e055561cadc87b5 Change-Id: I6a89bc600ced06a0cb84ae1670cb7a6ea39de9c8
* | Merge "Crypto changes for devices that don't write ext4 fs on wipe"Ken Sumrall2011-05-261-0/+27
|\ \ | |/ |/|
| * Crypto changes for devices that don't write ext4 fs on wipeKen Sumrall2011-05-261-0/+27
| | | | | | | | | | | | | | This adds a new function to libcutils, partition_wiped(). This is used to determine if a partition is wiped. Change-Id: Ibb388976c6b5bd3923b62d8f79b2b97748abf6c1
* | rename uevent_checked_recv to uevent_kernel_multicast_recvNick Kralevich2011-05-111-1/+1
|/ | | | Change-Id: I1839627490080efcbb7269699709064856312f8b
* native_handle.h: fix declarationIliyan Malchev2011-05-021-5/+1
| | | | | Change-Id: I452a517ee6982995318802eb4bbb23bd79401c4d Signed-off-by: Iliyan Malchev <malchev@google.com>
* Merge "libcutils: add a simple string parameter parsing ("a=b;c=d;") helper ↵Dima Zavin2011-04-271-0/+49
|\ | | | | | | utils"
| * libcutils: add a simple string parameter parsing ("a=b;c=d;") helper utilsDima Zavin2011-04-201-0/+49
| | | | | | | | | | Change-Id: Ifabeb75550fa6e351434e6e6d036b19331daf6c1 Signed-off-by: Dima Zavin <dima@android.com>
* | am b0d0e260: resolved conflicts for merge of 2baeb898 to honeycomb-plus-aospNick Kralevich2011-04-271-0/+32
|\ \ | | | | | | | | | | | | * commit 'b0d0e260bd6118959fa0e2d3c84037b3e0178551': Fold uevent message origin checking from init into libcutils.
| * \ resolved conflicts for merge of 2baeb898 to honeycomb-plus-aospNick Kralevich2011-04-271-0/+32
| |\ \ | | | | | | | | | | | | Change-Id: Ib3169b3a36aa13ef413da624355b1737e9b76fd9
| | * | Fold uevent message origin checking from init into libcutils.Vernon Tang2011-04-281-0/+32
| | | | | | | | | | | | | | | | Change-Id: I7cbc0cb840d1b4962e6c360fdad9a9c0ce20e87b
* | | | am de35f274: am 03752be0: am 0c297f5e: Merge "Revert "Fold uevent message ↵Nick Kralevich2011-04-271-32/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | origin checking from init into libcutils."" * commit 'de35f2741c4e32e331a92be99f7c04b92b94beb2': Revert "Fold uevent message origin checking from init into libcutils."
| * | | am 03752be0: am 0c297f5e: Merge "Revert "Fold uevent message origin checking ↵Nick Kralevich2011-04-271-32/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | from init into libcutils."" * commit '03752be0a437d12e19ac73ebe23385fe6f756e2c': Revert "Fold uevent message origin checking from init into libcutils."
| | * | Revert "Fold uevent message origin checking from init into libcutils."Nick Kralevich2011-04-271-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8405ec0e7562a370174d9973dd94984c47e49c36. The original change does not compile.
* | | | am e3ab4245: am a7cf7ed9: am 282c2ab4: Merge "Fold uevent message origin ↵Nick Kralevich2011-04-271-0/+32
|\| | | | |_|/ |/| | | | | | | | | | | | | | checking from init into libcutils." * commit 'e3ab42457077ec2a66bac553e59a7fee08d4fa9e': Fold uevent message origin checking from init into libcutils.
| * | am a7cf7ed9: am 282c2ab4: Merge "Fold uevent message origin checking from ↵Nick Kralevich2011-04-271-0/+32
| |\| | | | | | | | | | | | | | | | | | | init into libcutils." * commit 'a7cf7ed93486240ca48a407e67c7c3683a3b93aa': Fold uevent message origin checking from init into libcutils.
| | * Fold uevent message origin checking from init into libcutils.Vernon Tang2011-04-271-0/+32
| | | | | | | | | | | | Change-Id: I1a38e611a7ad990f74306ce453740a1eeed2416d
* | | Make atomic-inline.h usable from ordinary C++ code.Carl Shapiro2011-04-111-0/+8
| | | | | | | | | | | | Change-Id: I18dcba9cb3adc22f26403e94df4b2684f51090ed
* | | Add ifndef guards to remaining logging macros.Alexandre Elias2011-03-291-0/+20
| | | | | | | | | | | | Change-Id: I5fce9bffdb9e52d50059034fd1cc05ba7f0e3b87
* | | Merge "cutils: add popcount/popcountl/popcountll static inline definitions"Dima Zavin2011-03-141-0/+41
|\ \ \ | |/ / |/| |
| * | cutils: add popcount/popcountl/popcountll static inline definitionsDima Zavin2011-03-101-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just pass them through to their specific GCC builtins. If we find that the builtins are not performing well or have other issues, we can pull in existing public implementations and/or write arch-specific helpers if necessary. Change-Id: I278e6b73d75fac88808ed4546070d288c06f79e0 Signed-off-by: Dima Zavin <dima@android.com>
* | | Try to unmount writable filesystems when rebootingKen Sumrall2011-03-101-0/+35
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ext4 filesystems like to be unmounted before rebooting. The Android system doesn't have a traditional Linux init setup, and shutting down the system was not much more than calling sync(2) and reboot(2). This adds a new function to libcutils called android_reboot(). By default, it calls sync() and then remounts all writable filesystems as read-only and marks them clean. There is a flag parameter in which the caller can ask for sync() not to be called, or to not remount the filesystems as read-only. Then it will call reboot(2) as directed by the other parameters. This change also updates adb, init and toolbox to call the new android_reboot() function. Fixes bugs 3350709 and 3495575. Change-Id: I16d71ffce3134310d7a260f61ec6f4dd204124a7
* | Remove unconditional swap from the android atomic operations suite.Carl Shapiro2011-01-233-50/+0
| | | | | | | | | | Bug: 3381237 Change-Id: I7bdc7c8eb4c1cc6303d96e40ca2f196a007c4dd2
* | Use DMB ST for store fence.Andy McFadden2010-10-011-2/+1
| | | | | | | | Change-Id: Ic713f30fcec0f2d2eb486c549917575ff0afa82f
* | am df2f5a07: am d55f0adf: Qualify the source argument of atomic loads as a ↵Carl Shapiro2010-09-283-12/+20
|\| | | | | | | | | | | | | | | | | const pointer. Merge commit 'df2f5a07aecac7be4ac2d1100668a0396fd256e7' * commit 'df2f5a07aecac7be4ac2d1100668a0396fd256e7': Qualify the source argument of atomic loads as a const pointer.
| * am d55f0adf: Qualify the source argument of atomic loads as a const pointer.Carl Shapiro2010-09-283-12/+20
| |\ | | | | | | | | | | | | | | | | | | Merge commit 'd55f0adfb5ec4202ad5bd5d188e66c0f6a27b0aa' into gingerbread-plus-aosp * commit 'd55f0adfb5ec4202ad5bd5d188e66c0f6a27b0aa': Qualify the source argument of atomic loads as a const pointer.
| | * Qualify the source argument of atomic loads as a const pointer.Carl Shapiro2010-09-283-12/+20
| | | | | | | | | | | | | | | | | | Also normalizes the opening brace placment in a few locations. Change-Id: I8f518e933094337d5d3371321326ffc03b3a5f5a
| * | am f2af88e8: Tracking merge of dalvik-dev to gingerbreadBrian Carlstrom2010-08-051-0/+5
| |\| | | | | | | | | | | | | | | | | | | Merge commit 'f2af88e81af5efb2d585963507f798d5a8b93d67' into gingerbread-plus-aosp * commit 'f2af88e81af5efb2d585963507f798d5a8b93d67': Tracking merge of dalvik-dev to gingerbread
| | * Tracking merge of dalvik-dev to gingerbreadBrian Carlstrom2010-08-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | git cherry-pick --no-commit b99a099c git cherry-pick --no-commit 9811671e023ceb82029040f7acf599013c773e6b git cherry-pick --no-commit d0645bf0cc76ef7be11cf77a8e1995233a1972e4 Change-Id: Ie70fecaeaba97a25f114cd2717e381b5107533b1
* | | Add definitions for store barrier.Brian Carlstrom2010-09-243-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I usually call this a "store/store barrier" for maximum clarity, but the common way of describing it is "store barrier" or "store fence". This doesn't use "dmb st" yet since we're waiting on the toolchain update, but it gets the various macros and inline functions in place so we can use them in the VM. Bug 3003477 git cherry-pick 2ba5eec3972b4ce46feb677116534fcd3d136e0a Change-Id: Ifd2d3588be96aa529d490789436cf48c962021ba
* | | am 64ba76c1: merge from open-source masterThe Android Open Source Project2010-07-161-6/+22
|\| | | | | | | | | | | | | | | | | | | | Merge commit '64ba76c1431afe17c1f4553f1dbc595db064316e' * commit '64ba76c1431afe17c1f4553f1dbc595db064316e': Fixed LOG_ASSERT() compilation errors in native debug builds.
| * | merge from open-source masterThe Android Open Source Project2010-07-161-6/+22
| |\ \ | | |/ | |/| | | | Change-Id: I612711a84996e22e826e4920be29c204cf5d7d44
| | * Fixed LOG_ASSERT() compilation errors in native debug builds.Chris Pearson2010-07-161-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Invoking LOG_ASSERT, LOG_ALWAYS_FATAL or LOG_ALWAYS_FATAL_IF variadic macros without the printf format string arg caused compilation errors because the variable arg list (__VA_ARGS__) was eventually passed to __android_log_assert() func in place of a required parameter. This error only occured in debug builds because LOG_ASSERT() is a no-op in release builds. This change allows debug builds to succeed. Change-Id: I7e7b7de3e501133468ce083e0e0d6e699dd59667 Signed-off-by: Chris Pearson <christopherx.c.pearson@intel.com>
| * | Fix sim-eng build.Andy McFadden2010-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | Include <stddef.h> to get definition of size_t. Remove inclusion of <stdint.h>, which doesn't seem to be needed. Change-Id: Ib7ff231b5ec4b8c672084801fbb294a50cb7c3d7
* | | Remove an obsolete compatibility macro.Carl Shapiro2010-06-301-1/+0
| | | | | | | | | | | | Change-Id: Ibeae0986b6c68f40e414917405a31cc0ad810fc4
* | | am 2c4676de: am 93b0cb40: Define inline atomic operations for x86 and ARM.Carl Shapiro2010-06-234-62/+420
|\| | | | | | | | | | | | | | | | | | | | Merge commit '2c4676de62cf8ca7e3759f7f709e29c623495f55' * commit '2c4676de62cf8ca7e3759f7f709e29c623495f55': Define inline atomic operations for x86 and ARM.
| * | Define inline atomic operations for x86 and ARM.Carl Shapiro2010-06-234-62/+420
| | | | | | | | | | | | | | | | | | | | | | | | This change moves the ARM definitions into GCC extended inline assembler. In addition, the same set of x86 definitions are now shared among all x86 targets. Change-Id: I6e5aa3a413d0af2acbe5d32994983d35a01fdcb3
* | | Fix build.Andy McFadden2010-06-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Missing a #define to map android_atomic_swap to its new name. Worked fine in the other branches, because nobody was using android_atomic_swap in the other branches. Change-Id: I0e730e9823ac5cd2fee5a3f856ce05d36df5d87e
* | | am 8dfa47da: Atomic/SMP update, part 2.Andy McFadden2010-05-302-30/+87
|\| |
| * | Atomic/SMP update, part 2.Andy McFadden2010-05-272-30/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added new atomic functions, renamed some old ones. Some #defines have been added for backward compatibility. Merged the pre- and post-ARMv6 implementations into a single file. Renamed the semi-private __android_membar_full_smp to USE_SCREAMING_CAPS since that's more appropriate for a macro. Added lots of comments. Note Mac OS X primitives have not been tested. Change-Id: If827260750aeb61ad5c2b760e30658e29dbb26f2
| * | Atomic/SMP update.Andy McFadden2010-05-202-22/+122
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added atomic-inline.h. Added a platform-specific memory barrier call there. Added android_atomic_acquire_cmpxchg() and android_atomic_release_store(). Not tested on Mac OS X or SH. Added memory barrier calls to linux-x86 atomics. Mac OS X has barrier functions already. sh isn't really SMP-ready. linux-arm needs work (to be done in a separate change). Updated the makefile to make the SMP state visible to the code here. Note that host binaries are NOT built with SMP enabled; while our hosts are very likely SMP, it's not worth figuring out e.g. whether it's okay to use the SSE2 mfence instruction or have to use something else. We haven't had barriers enabled in host tools before, so there's probably no need to stat now. Removed quasiatomic 64-bit calls (now part of Dalvik). Change-Id: I49e5e6c8abe70f304cdedb9d7b8e6e65f8925815
* | Atomic/SMP update. [manual merge to dalvik-dev]Andy McFadden2010-05-212-22/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added atomic-inline.h. Added a platform-specific memory barrier call there. Added android_atomic_acquire_cmpxchg() and android_atomic_release_store(). Not tested on Mac OS X or SH. Added memory barrier calls to linux-x86 atomics. Mac OS X has barrier functions already. sh isn't really SMP-ready. linux-arm needs work (to be done in a separate change). Updated the makefile to make the SMP state visible to the code here. Note that host binaries are NOT built with SMP enabled; while our hosts are very likely SMP, it's not worth figuring out e.g. whether it's okay to use the SSE2 mfence instruction or have to use something else. We haven't had barriers enabled in host tools before, so there's probably no need to stat now. Removed quasiatomic 64-bit calls (now part of Dalvik). Change-Id: I42ae05f5db2cc9a5b64ad87f15481e2838371f1d