Commit graph

12488 commits

Author SHA1 Message Date
Mark Salyzyn
1a01f963ff Revert: "logd: default off by-UID spam filter"
With "logd: inject first UID by log buffer message" we can
remove the FUD introduced by having the UID spam filter on

This reverts commit 4141cb2391

Bug: 19608965
Bug: 14469172
Change-Id: Ifdc20b099e0e426546525b11c1dfe8cc0f830a02
2015-04-10 15:45:10 -07:00
Mark Salyzyn
ab0dcf6828 logd: annotate worst-UID pruned entries
- internal dropped entries are associated by prune by worst UID
  and are applied by UID and by PID
- track dropped entries by rewriting them in place
- merge similar dropped entries together for same UID(implied),
  PID and TID so that blame can more clearly be placed
- allow aging of dropped entries by the general backgound pruning
- report individual dropped entries formatted to reader
- add statistics to track dropped entries by UID, the combination
  of statistics and dropped logging can track over-the-top Chattiest
  clients.

Bug: 19608965
Change-Id: Ibc68480df0c69c55703270cd70c6b26aea165853
2015-04-10 15:45:08 -07:00
Dan Albert
65937e9bac Merge "Prevent unaligned read in libziparchive." 2015-04-10 21:40:39 +00:00
Mark Salyzyn
e65c2210d0 Merge "log: Add check for LINT_RLOG" 2015-04-10 19:17:01 +00:00
Mark Salyzyn
4ff2545525 log: Add check for LINT_RLOG
In order to make it easier to find radio system logging
mistakes, if LINT_RLOG is defined we will remove all the
definitions for ALOG* and SLOG*, as well as the log ids
to introduce compile and link errors.

Bug: 20143912
Change-Id: I1511bdce75213f3a5bacdbc4f2ab315aa1fa56fc
2015-04-10 11:28:16 -07:00
Dan Albert
03a034010e Merge "Add base/memory.h." 2015-04-10 00:24:11 +00:00
Dan Albert
1ae0764e01 Prevent unaligned read in libziparchive.
Change-Id: I4afc3729a1b2c06a6621cb8c9742fc94b5a665f5
2015-04-09 17:00:14 -07:00
Dan Albert
cf9c855e5b Add base/memory.h.
Right now this only includes an API for unaligned reads/writes.

Change-Id: Ieb42498aa17cbd1035b66c51bd1c4f16fa2acfdb
2015-04-09 17:00:14 -07:00
Mohamad Ayyash
be94015381 Merge "Revert "Revert "fs_mgr_verity: Add support for squashfs""" 2015-04-09 20:26:07 +00:00
Mohamad Ayyash
030ef35966 Revert "Revert "fs_mgr_verity: Add support for squashfs""
This reverts commit 7b97c7a3fa.

Change-Id: Id47e70479fe9247b7936f2e54d4dbfbb4f63f635
2015-04-08 18:08:00 -07:00
Elliott Hughes
d67ff2d507 Merge "Move ls implementation detail into ls." 2015-04-09 00:41:06 +00:00
Mark Salyzyn
e74baca6f3 Merge "logd: Build Breakage" 2015-04-08 23:11:01 +00:00
Mark Salyzyn
c6637859c2 logd: Build Breakage
a change slipped in from a rebase conflict, repairing.

Change-Id: Ib6479f88fb044f37b6721035c2f7cc75577c0411
2015-04-08 16:09:28 -07:00
Mark Salyzyn
82d11859ef Merge "logd: uidToName improvement" 2015-04-08 22:13:37 +00:00
Mark Salyzyn
c3d40b8691 Merge "logd: Add Pid statistics" 2015-04-08 22:13:28 +00:00
Mark Salyzyn
08739ba71f logd: uidToName improvement
- read packages.list to acquire package names
- hijack the reinit handler as a privileged worker

Bug: 19608965
Change-Id: If7becb34354d6415e5c387ecea7d4109a15259c9
2015-04-08 14:47:54 -07:00
Mark Salyzyn
720f6d1d55 logd: Add Pid statistics
- Optional class of statistics for PID
- Enhance pidToName
- Enhanced uidToName
- Enhance pidToUid
- template sort and iteration

Bug: 19608965
Change-Id: I04a1f02e9851b62987f9b176908134e455f22d1d
2015-04-08 14:37:32 -07:00
Mohamad Ayyash
e322ae1996 Merge "Revert "fs_mgr_verity: Add support for squashfs"" 2015-04-08 19:34:10 +00:00
Mohamad Ayyash
7b97c7a3fa Revert "fs_mgr_verity: Add support for squashfs"
This reverts commit 807f47004f.

Change-Id: I2d7972c0828c842b44747dd08fbe44668f2a55db
2015-04-08 19:31:00 +00:00
Mohamad Ayyash
70f81ceeeb Merge "fs_mgr_verity: Add support for squashfs" 2015-04-08 19:02:11 +00:00
Elliott Hughes
cf5f9b99cb Move ls implementation detail into ls.
Also remove the unused generality, and remove a dependency on a linux/
header file when there's a sys/ one that's even better.

Change-Id: If07608cc9ae2b7c2928ee2a9e33d20d63a9a8f45
2015-04-08 11:38:16 -07:00
Elliott Hughes
74a1875766 Merge "Lose getprop to toybox." 2015-04-08 17:54:59 +00:00
Mark Salyzyn
c19572fa80 Merge "rootfs: init start logd in post-fs" 2015-04-08 16:32:39 +00:00
Mark Salyzyn
124ff15bca rootfs: init start logd in post-fs
The earliest point we can start logd is after /system is mounted.
Ideally on post-fs-system (does not exist), post-fs will do.
As insurance, we will also make sure logd is started if a
logd-reinit is requested. This results in logd starting at least
4 processes earlier than it does currently, with a tighter
grouping of threads which means we are taking advantage of a
lighter CPU load at the time, rather than taking cycles during
heavy activity during core startup.

Change-Id: If4f0bd3a53bb4c47500a54d741ca635d87c0c330
2015-04-08 09:18:50 -07:00
Elliott Hughes
5b50fc3d3a Lose getprop to toybox.
Change-Id: I5188dbcc7e248b2fabade2d8d137610b4adb3164
2015-04-07 22:32:49 -07:00
Elliott Hughes
bf40396887 Merge "Lose setprop to toybox." 2015-04-08 03:27:20 +00:00
Nick Kralevich
de95795552 Merge "Create /data/system/heapdump for system_server" 2015-04-08 00:07:20 +00:00
Nick Kralevich
9c0437fba7 Create /data/system/heapdump for system_server
Bug: 20073185
Change-Id: I6fd83d33da33d048fdd6b07fa1f675ecb4f4eb2c
2015-04-07 16:44:43 -07:00
Elliott Hughes
3da8e5ea97 Lose setprop to toybox.
Change-Id: Ic0fd9cfb70e117067f4ebc5e120dea4b5fe1d883
2015-04-07 15:59:07 -07:00
Elliott Hughes
5ae7b1e5df Merge "Lose restorecon to toybox." 2015-04-07 22:42:20 +00:00
Elliott Hughes
877dfc2896 Lose restorecon to toybox.
Change-Id: I5460f46700011b7733a1d87a9049e828531627be
2015-04-07 14:45:07 -07:00
Nick Kralevich
5fc47aae33 Merge "logd: Don't embed a flexible array member within another struct" 2015-04-07 17:46:23 +00:00
Nick Kralevich
58ba58a97c logd: Don't embed a flexible array member within another struct
C (but not C++) has a concept of a flexible array member, which
is documented at https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html .
Using a flexible array member indicates that the structure is
really a header for a variable length object.

In logd's case, the variable length structure android_event_string_t
was embedded within another structure called
android_log_event_string_t. This makes gcc's __builtin_object_size()
function really confused. When compiling with C++,
__builtin_object_size(android_log_event_string_t.payload.data, 1)
would return 0, whereas if you compiled the code with C, the same
call would (properly) return -1.

Code which does automatic bounds checking, such as the proposed
patch at https://android-review.googlesource.com/145411 , will
cause problems for logd if this syntax is used.

Don't try to embed a variable length structure within another
structure. This doesn't appear to be valid C nor C++, and
while it's worked, it seems problematic.

Instead, inline the structure so it's one big happy structure.

Change-Id: I8ac02b7142a4f6560f5f80df2effcf720f9896fc
2015-04-07 10:12:20 -07:00
Sami Tolvanen
02f1d80ae2 Merge "Restore verity state when verified partition is reflashed" 2015-04-07 08:45:34 +00:00
Sami Tolvanen
284c5cb2a1 Merge "Set verity mode as the verified property value" 2015-04-07 08:45:24 +00:00
Mohamad Ayyash
807f47004f fs_mgr_verity: Add support for squashfs
- Cleanup the code to get filesystem size in a block device
- Add support to reading size of squashfs in a block device

Change-Id: I3848a705ed4dc2fc9afad20331f0fdecfee545c5
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-04-06 16:20:26 -07:00
Mark Salyzyn
33c2ad37ca Merge "android_filesystem_config.h: use __BEGIN_DECLS and __END_DECLS" 2015-04-06 22:37:55 +00:00
Mark Salyzyn
16045614fd android_filesystem_config.h: use __BEGIN_DECLS and __END_DECLS
Change-Id: Idb050b9ef4e7947664295b173e1b09d65accd3e9
2015-04-06 14:15:58 -07:00
Mark Salyzyn
08fe38e23b Merge "Allow inputflinger to have CAP_BLOCK_SUSPEND." 2015-04-06 18:01:39 +00:00
Tim Kilbourn
628620c7ba Allow inputflinger to have CAP_BLOCK_SUSPEND.
(Cherry picked from commit 83e6f2606b)

Resolved conflict in include/private/android_filesystem_config.h, content
already in libcutils/fs_config.c.

Change-Id: I817707721786e9b920fef14ebe836fdcd65a8606
2015-04-06 10:57:29 -07:00
Mark Salyzyn
b137dab48c Merge "android_filesystem_config: move fs_config to libcutils" 2015-04-06 17:33:47 +00:00
Mark Salyzyn
d42df56241 Merge "libcutils: add fs_config" 2015-04-06 17:30:59 +00:00
Dan Albert
d1e90c01f6 Merge "Cleanup base/logging." 2015-04-06 17:20:13 +00:00
Mark Salyzyn
a21c29ee81 android_filesystem_config: move fs_config to libcutils
Bug: 19908228
Change-Id: Id51c0c50eb2677824d052882f4263193a08e1402
2015-04-06 10:04:16 -07:00
Mark Salyzyn
8b2c7dee59 libcutils: add fs_config
Bug: 19908228
Change-Id: I78e6a8d780e578a287ffdee7b7120ecc74797e80
2015-04-06 10:04:15 -07:00
Elliott Hughes
101c57f71b Merge "Disable CR/LF translation for adb interactive shell." 2015-04-05 17:03:38 +00:00
Alistair Buxton
dfa09fd635 Disable CR/LF translation for adb interactive shell.
adb shell uses termios to disable canonical input processing in order to
get raw control codes but it does not disable CR/LF translation. The default
for Linux terminals is to convert CR to LF unless the running program
specifically asks for this to be disabled. Since adb does not, there is no
way to send a CR to any program run on adb shell. Many programs do in fact
differentiate and so are broken by this behaviour, notably nano. This patch
sets the termios flags to disable all line ending translation.

Change-Id: I8b950220f7cc52fefaed2ee37d97e0789b40a078
Signed-off-by: Alistair Buxton <a.j.buxton@gmail.com>
2015-04-05 10:02:34 -07:00
Elliott Hughes
6d951c2c3f Merge "Remove execonce." 2015-04-04 15:42:04 +00:00
Elliott Hughes
3a4aedfcd3 Merge "sdcard: Properly handle deleted nodes" 2015-04-04 00:27:46 +00:00
Dan Albert
7a87d05974 Cleanup base/logging.
Some of this code was unused, most didn't need to be exposed, and we
can just use basename(3).

Also use a better default program name than "unknown".

Change-Id: I62d990f64e4fd0c16aa4b7e907dd06e4f26ddcdd
2015-04-03 16:49:55 -07:00