Commit Graph

20558 Commits

Author SHA1 Message Date
Treehugger Robot eafeb75c49 Merge "bootstat: Fix a potential unhandled exception for malformed input." 2016-07-28 20:22:22 +00:00
James Hawkins 4dded613b3 bootstat: Fix a potential unhandled exception for malformed input.
In rare cases the hardware storage on the device may be hosed and return
garbage.  Use ParseInt which handles bad input instead of stoi.

BUG: 29334139
Change-Id: I91aedc169df110bea8097775f73dda11def22311
2016-07-28 11:59:22 -07:00
Chih-hung Hsieh 44c909d467 Merge "Fix clang-tidy performance warnings in fs_mgr." 2016-07-28 17:13:54 +00:00
Treehugger Robot 5670005058 Merge "Fix clang-tidy performance warnings in metricsd/uploader." 2016-07-28 17:12:46 +00:00
Treehugger Robot 5783dea065 Merge "libnativeloader: convert Android.mk to Android.bp" 2016-07-28 10:46:42 +00:00
Treehugger Robot b66b16b39a Merge "Fix clang-tidy performance warnings in healthd." 2016-07-28 01:04:51 +00:00
Treehugger Robot 95b0495534 Merge "Suppress clang-tidy performance warnings in libmemunreachable." 2016-07-28 01:04:21 +00:00
Treehugger Robot 5dd9dc5859 Merge "Fix clang-tidy performance warnings in crash_reporter." 2016-07-28 00:53:11 +00:00
Chih-Hung Hsieh f10383c1be Fix clang-tidy performance warnings in crash_reporter.
* Use faster overloaded string find function.

Bug: 30411878
Change-Id: I1bbb382428424140b61062ba729fcc229126c164
Test: build with WITH_TIDY=1
2016-07-27 16:18:05 -07:00
Chih-Hung Hsieh 73da05d354 Fix clang-tidy performance warnings in fs_mgr.
* Use const reference type for for-loop index variables
  to avoid unnecessary copy.

Bug: 30413223
Change-Id: I5514384ef3af77c00aa3e8417acd8d70981e0afb
Test: build with WITH_TIDY=1
2016-07-27 16:12:54 -07:00
Chih-Hung Hsieh 4df105635b Fix clang-tidy performance warnings in healthd.
* Use const reference type for parameters to avoid unnecessary copy.

Bug: 30407689
Change-Id: I926ea7b6e9e020a228c812b7e23087a2b7ed9809
Test: build with WITH_TIDY=1
2016-07-27 16:05:50 -07:00
Chih-Hung Hsieh 223bb4e21d Suppress clang-tidy performance warnings in libmemunreachable.
Bug: 30413862
Change-Id: If3ed64d2e1ca1f46599de9fe97c769f468ee1a68
Test: build with WITH_TIDY=1
2016-07-27 16:01:41 -07:00
Chih-Hung Hsieh d506e782b8 Fix clang-tidy performance warnings in metricsd/uploader.
* Use const reference type for parameters to avoid unnecessary copy.

Bug: 30407689
Change-Id: I5e6bfd1cd3bcf54666316573281b79573cd8a780
Test: build with WITH_TIDY=1
2016-07-27 15:57:24 -07:00
Colin Cross d4ce20aa84 libnativeloader: convert Android.mk to Android.bp
Change-Id: I94d7cde3138f28bbd158d62b657af8448b4175fd
2016-07-27 10:36:36 -07:00
Treehugger Robot 6d232ab4de Merge "Fix early init logging." 2016-07-27 15:28:18 +00:00
Jorge Lucangeli Obes 47b077a44f Merge "Fix sdcard logging." 2016-07-26 23:38:13 +00:00
Jorge Lucangeli Obes e157b253d4 Fix sdcard logging.
Use C++ logging for everything.

Bug: 30222003
Change-Id: I5c5d85102b01df6965a515b59aa275ac85f50f00
2016-07-26 16:52:48 -04:00
Elliott Hughes 35f5d04620 Fix early init logging.
Remove the /dev/__kmsg__ workarounds (which can then be removed
from sepolicy), and fix confusion in the translation between
android-base logging and kernel logging priorities (in particular,
where 'notice' comes in the hierarchy).

Bug: http://b/30317429
Change-Id: I6eaf9919904b6b55bc402c20bf1a4ae269014bc7
Test: adb shell dmesg | grep init
2016-07-26 09:32:33 -07:00
Elliott Hughes c1d9ac1f85 Merge "Improve init Service logging." 2016-07-26 15:15:31 +00:00
Elliott Hughes e18e7e5c43 Improve init Service logging.
Say which service.

Don't ignore setpgid failures.

Change-Id: Ifa8eba583cc3cbf3d26763977bf8c3c9835271c6
2016-07-25 18:18:16 -07:00
Dan Willemsen 00a4ee0f46 Merge "Rename lib{crypto,ssl}-host to lib{crypto,ssl}" 2016-07-23 00:22:29 +00:00
Treehugger Robot c6e22ba1a1 Merge "sdcard: Fix compilation with FUSE_TRACE == 1." 2016-07-22 01:07:20 +00:00
Treehugger Robot eb9367f9d4 Merge "logcatd: logpersist.start to enable logd service if disabled" 2016-07-21 23:25:30 +00:00
Mark Salyzyn 6a7bfd8749 logcatd: logpersist.start to enable logd service if disabled
Bug: 28936216
Change-Id: I2f2878f138be6675bf00bd638df2bdd690a1fae5
2016-07-21 14:19:39 -07:00
Dan Willemsen c9c5e4b969 Rename lib{crypto,ssl}-host to lib{crypto,ssl}
There's no need to use a different name for target and host moudles. In
Soong, it's better to use the same for both, as target and host modules
can be defined at the same time.

Change-Id: I32ee5bbd54b16a4ed9d812db4da836e96b1e8654
2016-07-21 14:15:31 -07:00
Jorge Lucangeli Obes 714ec9d1de sdcard: Fix compilation with FUSE_TRACE == 1.
"PRI{u,x}64" was not compiling on C++ because of macro expansions.
Implement DLOG the same way DCHECK is implemented in
<android-base/logging.h>, and mechanically replace the problematic
lines with C++ logging. Remaining TRACE() lines will be replaced in a
follow-up CL.

Bug: 30222003

Change-Id: I377a91722eb4c035093fc96b79438c4f638b9a45
2016-07-21 17:11:47 -04:00
Treehugger Robot 02ccdc5db9 Merge "logd: auditd: suppress multiple identical avc: messages to kmsg" 2016-07-20 20:30:52 +00:00
Sergio Giro 896c6b14ae Merge "LruCache: avoid copying keys in lookup" 2016-07-20 19:38:47 +00:00
Sergio Giro 4c56e0a222 LruCache: avoid copying keys in lookup
Create objects of type KeyedEntry for lookups that only have
a key reference

Bug: 27567036
Change-Id: I5e609a3db63d3b9277ff1547a3cca37dce70251c
2016-07-20 18:38:44 +00:00
Christopher Ferris feabb0fdc1 Merge "Add ioprio values directly." 2016-07-20 18:03:48 +00:00
Treehugger Robot fdc396e277 Merge "Convert libpackagelistparser to Android.bp" 2016-07-20 15:21:42 +00:00
Treehugger Robot d3dfd95728 Merge "logd: Use Minijail for privilege dropping." 2016-07-20 15:02:17 +00:00
Dan Willemsen 74641844ed Convert libpackagelistparser to Android.bp
Change-Id: If114efbbca5e5c31590e0f889cf773f94944dfb2
2016-07-19 22:19:37 -07:00
Treehugger Robot c15ab6e2c6 Merge "sdcard: Use std::map." 2016-07-20 02:04:00 +00:00
Stephen Hines fa1a21d085 Merge "Disable warnings triggered in Clang r271374" 2016-07-19 22:02:31 +00:00
Jorge Lucangeli Obes d6d8faa690 sdcard: Use std::map.
Having CaseInsensitiveCompare use strcasecomp is not ideal, but other
solutions are not prettier.

Also, add a TODO to fix FUSE_TRACE, broken by the switch to C++.

Bug: 27147273

Change-Id: I0017c3a7d0254eb81abd128b97cd06c5ad0d1dff
2016-07-19 17:01:15 -04:00
Pirama Arumuga Nainar 6fbbc4cdfa Disable warnings triggered in Clang r271374
http://b/28149048
http://b/29823425

Disable -Wvarargs that gets triggered in
system/core/debuggerd/test/ptrace_fake.cpp:ptrace_fake.  The second bug
above tracks that this warning gets re-enabled.

Test: Tested build, boot and common usage for Arm, Arm64, x86, x86_64,
Mips images in AOSP and internal branch.

Change-Id: Ife68675a77431bcc4717b4da297c14dc486d1413
2016-07-19 20:29:05 +00:00
Treehugger Robot 5558cd362b Merge "Remove no-op klog_init." 2016-07-19 19:39:39 +00:00
Elliott Hughes 489e3fbaa0 Remove no-op klog_init.
Change-Id: I467edad1d004ac16647f4aa1f0eead04e808efa0
2016-07-19 11:45:36 -07:00
Treehugger Robot ac9b4d47ea Merge "run-as: Use Minijail for privilege dropping." 2016-07-19 18:29:27 +00:00
Jorge Lucangeli Obes 2bbdbe8541 logd: Use Minijail for privilege dropping.
Makes code smaller, removes duplication. Using Minijail also allows
adding further sandboxing down the road.

Bug: 30156807
Change-Id: I8fa242fba545049ee82f6655fe6ecc14c53fcab7
2016-07-19 11:15:06 -04:00
Jorge Lucangeli Obes a377ff0d4a run-as: Use Minijail for privilege dropping.
Arguably, we don't need a ScopedMinijail for a program that only execs,
but I'd rather keep the code consistent and have all uses of Minijail
be good examples.

Bug: 30156807

Change-Id: I08a968835e0f3e2afcd5e7736626edbed658cde2
2016-07-19 11:03:52 -04:00
Christopher Ferris 84421d8475 Add ioprio values directly.
The ioprio.h header is not a uapi header, so remove it's use and
add the two values that this code needs to use.

Bug: 30072483
Change-Id: I5c8b6f40bd60a43f50ac26792f96d2fa3f6db020
2016-07-18 17:01:05 -07:00
Treehugger Robot ddbcecec3a Merge "Use arraysize() for supplementary groups." 2016-07-18 20:00:28 +00:00
Mark Salyzyn 4d205f8975 logd: auditd: suppress multiple identical avc: messages to kmsg
Sends first and last of a series of 3 or more indentical avc:
messages to kmsg and adds 'duplicate messages suppressed'
for the last one in the set. eg:

[67.141658] type=1400 audit(1468852100.171:70): avc: ... tcontext=u:object_r:proc:s0 tclass=file
[67.141678] type=1400 audit(1468852107.494:71): avc: ... tcontext=u:object_r:cache_file:s0 tclass=dir
[67.535202] type=1400 audit(1468852107.498:74): avc: ... tcontext=u:object_r:cache_file:s0 tclass=dir duplicate messages suppressed
[67.535227] type=1400 audit(1468852107.888:75): avc: ... tcontext=u:object_r:proc_net:s0 tclass=file

One can look at the sequence numbers in the above example to see that
four identical message were produced, two were dropped.

ToDo: Evaluate multiple streams of duplicate messages.

Bug: 30118730
Change-Id: I31dcda7c8c42edfc7a8f1bf4d9e46284c74b3d18
2016-07-18 12:30:04 -07:00
Jorge Lucangeli Obes bae15b4f46 Use arraysize() for supplementary groups.
Also make adbd use ScopedMinijail.

Bug: 30191189
Change-Id: I5e259aa466817b51037912aba043ba75bd35f9e1
2016-07-18 13:46:42 -04:00
Treehugger Robot 97f49e5cb3 Merge "Use Minijail for privilege dropping." 2016-07-18 15:58:46 +00:00
Treehugger Robot c4be85fbba Merge "logd: Worst Tag filter enabled for events buffer" 2016-07-16 00:23:40 +00:00
Treehugger Robot 596e65db60 Merge "logd: Replace logd with chatty log tag" 2016-07-15 23:20:11 +00:00
Treehugger Robot 916f5e873e Merge "init: select usb gadget controller at run time" 2016-07-15 22:50:29 +00:00