| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
If ashmem accessors are being called with a file descriptor that
belongs to anything other than ashmem, we need to stop it right
now so that they can fix the caller.
Bug: 26871259
Change-Id: Icf9aafc3631a80b9af6fe0fea03599d61e285d21
|
|
|
|
|
|
|
|
|
| |
NB: We decided to not sniff for the constant saved __ashmem_rdev in
the early error path; requiring either the use of atomic operations,
or acquiring a lock to do it correctly. The heroics are not worth it.
Bug: 26871259
Change-Id: I46249838850ae32063eb5b7d08c731c5bb0fbf6b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- collect st_rdev on open, or when required, for /dev/ashmem.
- check in all cases if fd is a character device and matches rdev.
- requires that we have open, read and write access to /dev/ashmem
to check, assumption being that if we can not, then we have no
right playing with the associated misdirected file descriptor.
NB: ashmem libcutil library entry points can no longer be called in
signal context.
Bug: 26871259
Change-Id: I9a17e33317a9be795131473a51c16f761b5f7407
|
|
|
|
|
|
|
|
|
|
| |
- sort header order and in groups
- remove all tabs, use only spaces
- use TEMP_FAILURE_RETRY in system calls
- preserve errno for -1 return
Bug: 26871259
Change-Id: I94fffbcaeba01fcc18a3ed07c02389c06c54d3b7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and run fsck with -f on clean shutdown instead.
With -f, fsck.f2fs always performs a full scan of the /data
partition regardless of whether the partition is clean or not.
The full scan takes more than 2 seconds on volantis-userdebug
and delays the OS boot.
With -a, the command does almost nothing when the partition
is clean and finishes within 20-30ms on volantis-userdebug.
When the partition has an error or its check point has
CP_FSCK_FLAG (aka "need_fsck"), the command does exactly the
same full scan as -f to fix it.
Bug: 21853106
Change-Id: I126263caf34c0f5bb8f5e6794454d4e72526ce38
|
|
|
|
|
|
|
|
| |
The process name will be read into the buffer containing
the proc name filepath. We need to reinitialize the buffer
before reading into it.
Change-Id: I67710819c895d3f9e2b0d486ab8a11f29f8318e8
|
|
|
|
|
|
|
|
|
| |
add_tid_to_cgroup was also being used to add threads to
cpusets. Split this into a generic write_tid_to_fd, and
wrap it for cpusets and cgroups. This lets errors align
with what the actual failure is.
Change-Id: I2c5c97117428a33b6a328f73741d3516d4141f78
|
|
|
|
|
|
|
|
| |
If a task only ever touches cgroups, don't initialize
cpusets. This makes logging fails for cpusets much
less spammy.
Change-Id: Iad9c58db68ecd2c2445255bfe5564318064949a5
|
|
|
|
|
|
|
| |
This can help resolve permissions issues for tasks that
want to twiddle the perf bits but don't have permissions.
Change-Id: I6285c5c38224d1fb207cb26229cd7b779a8322ac
|
|
|
|
|
|
|
|
| |
If you compile with cpusets enabled but the permissions are wrong
the behavior becomes no real policy enforced at all. Fix this by
making sched_policy fall back gracefully.
Change-Id: Ife96ca64b991e23232a5bd0d6c21e30a5d16bde8
|
|\
| |
| |
| |
| |
| |
| |
| | |
https://android.googlesource.com/platform/system/core into cm-13.0
Android 6.0.1 release 22
Change-Id: Ia61f8e863f7413a67fe65f41ea2a30c086528df4
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
system-background can't be opened by most processes, since system-bg is
a privileged cpuset. Remove the log message when it can't be
opened. We'll still log a failure to use the fd if we try to use it
after it can't be opened, which is fine.
bug 26249842
Change-Id: I99f185c51645bc81b6a41732848227c27675cdf7
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
SurfaceFlinger needs some of its threads in the system-background cpuset
and some of its threads (the binder pool) outside of the
system-background cpuset in order to improve UI perf/power
consumption. Remove surfaceflinger from the system-background cpuset in
init.rc and allow a thread to place itself in the system-background
cpuset given enough permissions.
bug 25745866
Change-Id: I85f7e41c5439e6ad7cc2d355e51f5dfb3a0c7088
|
| |
| |
| |
| |
| |
| |
| |
| | |
ported from CM7
* moved to fs_config.c in 6.0
Change-Id: I279d78679f7d779d6cd6bbc6c834d94706937ae8
|
| |
| |
| |
| | |
Change-Id: Ia382c74854cfbe625653b8b6b016b37f93132658
|
|/
|
|
| |
Change-Id: I335816304573149c1d96c5e6ea804a49e7695996
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using a getenv('OUT') in such a deep down function is a wrong design
choice. Replacing with explicit parameter that may be NULL in case
device specific files can be accessed from /.
Since TARGET_COPY_OUT_SYSTEM may be defined to something different than
system we also ensure that we use a path relative to TARGET_OUT to
compute path to fs_config_* files.
Bug: 21989305
Bug: 22048934
Change-Id: Id91bc183b29beac7379d1117ad83bd3346e6897b
Signed-off-by: Thierry Strudel <tstrudel@google.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If a thread is created while the parent thread is "Background",
then the default timerslack value gets set to the current
timerslack value of the parent (40ms). The default value is
used when transitioning to "Foreground" -- so the effect is that
the timerslack value becomes 40ms regardless of foreground/background.
This does occur intermittently for systemui when creating its
render thread (pretty often on hammerhead and has been seen on
shamu). If this occurs, then some systemui animations like navbar
ripples can wait for up to 40ms to draw a frame when they intended
to wait 3ms -- jank.
This fix is to explicitly set the foreground timerslack to 50us.
A consequence of setting timerslack behind the process' back is
that any custom values for timerslack get lost whenever the thread
has transition between fg/bg.
See Bug: 19398120
Change-Id: Idc259717f62fa2255f8bafbbf88b68c0043f29cf
|
|/
|
|
|
|
| |
bug 21782794
Change-Id: I3b2cf8ae4f3ed0c14f206584ae7fa2b1a1d11ad0
|
|
|
|
|
|
| |
bug 21782794
Change-Id: I249531754fb29442dc3c7434d77dbb103f4220a7
|
|
|
|
|
|
| |
Bug: http://b/20501816
Change-Id: I1839b48ee4f891b8431ecb809e37a4566a5b3e50
(cherry picked from commit 47b0134ec2b5e8c8b5b5671cd4a3e41261275532)
|
|
|
|
|
|
|
|
|
|
|
|
| |
If /dev/kmsg already exists, it's unnecessary for klog_init()
to create it's own copy. This avoids needing to grant the mknod
permission to everyone who uses kmsg. Typically the only time
/dev/kmsg doesn't exist is before ueventd starts.
(cherrypicked from commit 4d32a486fe62ef2c1440167604654a2f4e023fbd)
Bug: 21242418
Change-Id: I0c88d80feca6899fcdbc8c9f2f99448ee0a3422d
|
|
|
|
|
|
|
|
|
| |
User specified values of numInts and numFds can overflow
and cause malloc to allocate less than we expect, causing
heap corruption in subsequent operations on the allocation.
Bug: 19334482
Change-Id: I43c75f536ea4c08f14ca12ca6288660fd2d1ec55
|
|
|
|
|
|
|
|
|
|
|
| |
Also simplifies the Darwin implementation of gettid, because
apparently libbacktrace had a better way of doing it.
Bug: 19517541
(cherry picked from commit 23f750b068ddf5b20fb5d153a798b22562368992)
Change-Id: I2f888e8ed7a2f5719973786cbcbb399a81867ee9
|
|
|
|
|
|
|
|
|
|
| |
Accidentally had this all hidden by an #ifndef _WIN32 when I wrote it.
Bug: 19517541
(cherry picked from commit b3a36ca5ee79411c18984b85b224d9285b4468af)
Change-Id: Ifbd5d19e506e7313700e2e29a2dae5736e049844
|
|
|
|
|
|
| |
We weren't even building this.
Change-Id: I8b2afbc76d784a7b24bbe0be6502b9fbcf0b5c09
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix broken mips64 build by replacing mips32r2-only android_memset.S.
Use HW-bonded pairs of 64-bit stores to fill 128 bits/cycle.
Rely on HW automatic cache prefetch optimizations.
Software cache prefetching is counterproductive on next mips cores.
New method is coded in C, and also works okay on non-Mips architectures.
Change-Id: Id7153a8fe11538fe25287e101375661b0e99e2a2
|
|\ \ |
|
| | |
| | |
| | |
| | | |
This reverts commit c3bac8b6719332f31140b2a034b70cf7f9eb3e51.
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
cutils/endian.h provides the helpers defined in endian(3), either by
pulling in the OS's built-in endian.h (where available) or recreating
them using GCC builtins.
Change-Id: Ic8965f67e1efdc03f884dbe6b7fe0276f840e4fc
Signed-off-by: Greg Hackmann <ghackmann@google.com>
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | | |
Bug: 20262261
Change-Id: Idaf984786804eb76c285f38b11abbbc0d3706509
|
| | |
| | |
| | |
| | |
| | | |
Bug: 19908228
Change-Id: I3273cf99b320941f9530a015c9e582af72469acb
|
| |/
|/|
| |
| |
| | |
Bug: 19908228
Change-Id: Ia725d20ca4f8a87deec63b6c661f6a09c8671231
|
| |
| |
| |
| |
| |
| |
| | |
- Causes a build break for MAC and Windows
Bug: 19908228
Change-Id: I9d69967aa988c9ca202805593fa846cb670101cf
|
| |
| |
| |
| |
| | |
Bug: 19908228
Change-Id: Icb0e189a86758bb779b9bdf7c0d92216d297869f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Intention is to read from ${OUT}/system/etc/fs_config_dirs and
${OUT}/system/etc/fs_config_files on host. And
/system/etc/fs_config_dirs and /system/etc/config_files
on target systems.
Bug: 19908228
Change-Id: Ieaedd99e88c7f7f717878d9344c387ddf335ccbb
|
|/
|
|
|
|
|
|
| |
There is no endian.h on windows
This reverts commit 4e5f71ae727c5993db05d0024da026bf68eabc59.
Change-Id: I6aedf35ed319c7f8febc7ab98e104a625fb27f69
|
|
|
|
|
|
|
|
|
|
| |
Intention is to read from ${OUT}/system/etc/fs_config_dirs and
${OUT}/system/etc/fs_config_files on host. And
/system/etc/fs_config_dirs and /system/etc/config_files
on target systems.
Bug: 19908228
Change-Id: I0966a94f79a3fae4f7325056c701ea355370f9df
|
|
|
|
|
| |
Bug: 19908228
Change-Id: Id51c0c50eb2677824d052882f4263193a08e1402
|
|
|
|
|
| |
Bug: 19908228
Change-Id: I78e6a8d780e578a287ffdee7b7120ecc74797e80
|
|
|
|
| |
Change-Id: I572c553227a5a2cd57ec304de7e898d7c801fe93
|
|
|
|
|
|
|
| |
Several people have been independently confused about when this gets
built and why over the past couple of days.
Change-Id: I2d4a02f66e24c0734327585b7d27e50a344b1e94
|
|
|
|
|
|
|
|
|
|
|
| |
This also fixes the bug where we were always testing against the fake
strlcpy we provide for glibc/Windows rather than the Android one.
This also removes some unnecessary library dependencies.
This also builds all the cutils tests for the host (static and dynamic).
Change-Id: Icd129d5b025c0ca801be5acf31a54ecd88608df9
|
|
|
|
| |
Change-Id: Ia826dd872f64cc80635f50525a0c393f43ae5204
|
|
|
|
| |
Change-Id: Ic727508d9cfadea0050d1ccc491ee61aac1ef55a
|
|
|
|
|
|
|
|
|
|
| |
Also move them to libc++ since stlport is dead.
Bug: 18389856
This reverts commit bb28776db0f5a107ef2b90ff1322f4c06b6cc7de.
Change-Id: Icdf9be3bc5cc40433727ff71a121b145002dda72
|