Commit Graph

51232 Commits

Author SHA1 Message Date
Nick Kralevich
b27bbd18bb service_manager: reorder permission checks for find
Reorder the find permission checks. This avoids generating misleading
SELinux denials when a service doesn't exist, or when a service is
prohibited to isolated apps.

The original reason for structuring the code this way is explained
in https://android-review.googlesource.com/#/c/100530/4/cmds/servicemanager/service_manager.c@172
The concern at the time was to avoid leaking a situation where
a caller could probe for the existance of a service. This turns out
to be unnecessary. The same return value is used for both a
permission denied and a service not found. The only side effect
is the generation of an SELinux audit log, which likely won't be
accessible to the calling application.

Change-Id: I9760e1821ed16102fa5f9bec07f8c34944565be9
2015-03-05 10:58:40 -08:00
Christopher Ferris
9d68ed0ecd Merge "Add timeout for dump_file." 2015-02-26 18:35:02 +00:00
Mark Salyzyn
bb67beca35 Merge "dumpstate: add pstore read" 2015-02-26 17:23:41 +00:00
Mark Salyzyn
2262c16372 dumpstate: add pstore read
Call logcat -L to pull any LAST Android logs. If the kernel is not
configured for PSTORE and PSTORE_PMSG, the hopes are the empty
content will pressure vendors to slice up and configure support.

Change-Id: I5fddfa1e0f59f24fccc30b257ba68af8a8cf8640
2015-02-26 07:41:41 -08:00
Christopher Ferris
54bcc5ffd5 Add timeout for dump_file.
It turns out dump_file is used on a number of /proc and system files.
In one case, the read of a file stalled and caused a bugreport to
hang forever. It's still possible if there is a kernel bug that this
could stall forever, but less likely.

Also, change the return type of nanotime to uint64_t.

Testing:
- Created a named fifo and verified that dump_file fails with a timeout.
- Created a large /data/anr/traces.txt to verify that large files still
  dump properly and that the additional NONBLOCK parameter doesn't cause
  a problem.
- Created a dummy /data/tombstones/tombstone_00 to verify that the
  dump of these files still works.
- Compared a dump using the old dumpstate to the new dumpstate to verify
  nothing obviously different.

Bug: 19117030
Change-Id: I0d3dd27583c853cdaccd2fd278748cb5f9ccd4fb
2015-02-25 19:59:29 -08:00
Greg Hackmann
56f8c6c42d Merge "Error compiling waitforvsync.cpp" 2015-02-25 23:42:17 +00:00
Dan Albert
797498450c Merge "Fix pointer-to-int and int-to-pointer warnings." 2015-02-25 22:50:10 +00:00
Dan Albert
ad0f52fc2b Fix pointer-to-int and int-to-pointer warnings.
Change-Id: If534cbcf2c3e644270572cbf829ba9b5acab29e6
2015-02-23 10:45:27 -08:00
Mark Salyzyn
d80268ba19 Merge "vsync.cpp test is throwing error whe compiled" 2015-02-23 15:14:24 +00:00
Nanik Tolaram
5b06dc00ac vsync.cpp test is throwing error whe compiled
frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:55:44: error: 'ALOOPER_EVENT_INPUT' was not declared in this scope
     loop->addFd(myDisplayEvent.getFd(), 0, ALOOPER_EVENT_INPUT, receiver,
                                            ^
frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:64:18: error: 'ALOOPER_POLL_WAKE' was not declared in this scope
             case ALOOPER_POLL_WAKE:
                  ^
frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:67:18: error: 'ALOOPER_POLL_CALLBACK' was not declared in this scope
             case ALOOPER_POLL_CALLBACK:
                  ^
frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:70:18: error: 'ALOOPER_POLL_TIMEOUT' was not declared in this scope
             case ALOOPER_POLL_TIMEOUT:
                  ^
frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:73:18: error: 'ALOOPER_POLL_ERROR' was not declared in this scope
             case ALOOPER_POLL_ERROR:
                  ^

it is missing one header file

Change-Id: Ie2fb02523a866b13a99edf837f072d101cacb466
Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
2015-02-23 15:13:56 +00:00
Elliott Hughes
f3f22e555b Merge "Add missing <unistd.h> include for close." 2015-02-20 01:08:08 +00:00
Elliott Hughes
14df3564fb Add missing <unistd.h> include for close.
Change-Id: Iebce6d74eecb8c275e800b7f47f74bbd4374860d
2015-02-19 16:58:44 -08:00
Jesse Hall
5fa8f9305e Merge "egl: Remove old tuna BGRA vs RGBA workaround." 2015-02-18 17:31:13 +00:00
Elliott Hughes
75b81aee38 Merge "Add missing <sys/file.h> include for flock." 2015-02-17 01:24:49 +00:00
Elliott Hughes
2ead70ce67 Add missing <sys/file.h> include for flock.
Change-Id: I5c9bb4aa74d8a36d44e086bbcb5d60876727ce4c
2015-02-16 10:44:22 -08:00
Nanik Tolaram
ee9701744a Error compiling waitforvsync.cpp
The waitforvsync.cpp throws error when compiling. Following is the error log

target thumb C++: test-waitforvsync <= frameworks/native/services/surfaceflinger/tests/waitforvsync/waitforvsync.cpp
frameworks/native/services/surfaceflinger/tests/waitforvsync/waitforvsync.cpp: In function 'int main(int, char**)':
frameworks/native/services/surfaceflinger/tests/waitforvsync/waitforvsync.cpp:43:17: error: 'close' was not declared in this scope
         close(fd);
                 ^
....
....

make: *** [out/target/product/grouper/obj/EXECUTABLES/test-waitforvsync_intermediates/waitforvsync.o] Error 1

the file is missing #include <unistd.h>

Change-Id: I57728dbde65641cd3138625f9a590f9db8648158
Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
2015-02-14 00:26:59 +11:00
Alistair Strachan
733a807547 egl: Remove old tuna BGRA vs RGBA workaround.
Some time before kitkat, a workaround was put in place to keep tuna
working with obsolete PowerVR GPU drivers. The tuna product was dropped
in AOSP for kitkat, but the workaround remained.

There are still a number of devices shipping with OMAP4 processors, and
this workaround continues to be applied on those products even when it
is not required. The effect is that virtual display CTS will fail on
those devices.
2015-02-12 12:33:25 -08:00
Christopher Ferris
8511b3ae5e Merge "Remove -z option." 2015-02-10 01:26:58 +00:00
Christopher Ferris
ff4a4dc7e6 Remove -z option.
This option doesn't work with the current selinux protections and
doesn't serve much of a purpose. You can get the same results running
this:

dumpstate | gzip > /data/local/tmp/dump.txt.gz

Bug: 19271141
Change-Id: Icc76200df33dc708e30c556ec8a0f393f995fe7c
2015-02-09 16:45:35 -08:00
Christopher Ferris
50ad67e4ce Merge "Add better timeout mechanism for running commands." 2015-02-04 01:57:13 +00:00
Christopher Ferris
1a9a338615 Add better timeout mechanism for running commands.
Change-Id: I60fc9e7d59c3e0e4b8b2f69f79c6903240bfd131
2015-02-03 14:53:44 -08:00
Elliott Hughes
51bfedd821 Merge "Add missing includes." 2015-01-30 06:34:37 +00:00
Elliott Hughes
824e30e5ed Add missing includes.
Change-Id: I1dad32ab459c25063a70cf52100a29d00fea3a90
2015-01-29 22:32:32 -08:00
Elliott Hughes
0e17a265f5 Merge "Switch dumpstate to "ip link list"." 2015-01-28 17:22:28 +00:00
Elliott Hughes
a59828a5d2 Switch dumpstate to "ip link list".
Change-Id: Ia1db51c866890f09fbd4316764dea5982554598f
2015-01-28 08:45:40 -08:00
Yabin Cui
6e32c0377d Merge "Kill HAVE_PTHREADS." 2015-01-27 19:46:54 +00:00
Yabin Cui
8fb2d25ff3 Kill HAVE_PTHREADS.
Bug: 19083585
Change-Id: I355491de945590f43c82bdcb7968b01b4bff6e06
2015-01-26 22:36:36 -08:00
Jesse Hall
a46ff66457 Merge "Use register numbers instead of register names" 2015-01-26 17:17:08 +00:00
Elliott Hughes
346329b7a7 Merge "Move atrace from the obsolete bzero to memset." 2015-01-25 19:17:14 +00:00
Elliott Hughes
3da5d235da Move atrace from the obsolete bzero to memset.
(This file wasn't including <strings.h> for bzero or <string.h> for memset.)

Change-Id: Icef0e0dbfd36ebd21058cfd8c747e0a17aee8308
2015-01-25 08:35:20 -08:00
Christopher Ferris
c0e10c6f03 Merge "Refactor of the bugreport code." 2015-01-23 23:01:29 +00:00
Christopher Ferris
9b73bf07d7 Refactor of the bugreport code.
Implemented these changes:

- Make this code C++.
- Avoid hangs by adding a timeout.
- Add the necessary TEMP_FAILURE_RETRY calls.
- Restructure the code a bit.

Bug: 18800936

Change-Id: Iba9f86a4c7beee4f0f36e51234855f4c0834db47
2015-01-23 13:40:56 -08:00
Jesse Hall
f551e1c1a5 Merge "[MIPS] Further opengl support for mips64 and mipsr6" 2015-01-22 16:55:05 +00:00
Dan Stoza
4ecf6ec932 Merge "Restore Region::set(uint32_t, uint32_t)" 2015-01-21 16:39:22 +00:00
Nikola Veljkovic
5f5f65183c Use register numbers instead of register names
Avoid ambiguity by using register numbers. Register names are
interpreted depending on the ABI. Fixes the issue with mips64 gcc,
where registers t0-t4 are translated into $8-$11 (o32 ABI) instead
of $12-$15 (o64 ABI).

Also, use t9 ($25) for storing function address
(in getProcAddress.cpp).

Change-Id: I12ef5cd98bf14dab3c01f2756889cc02856c1cd8
2015-01-19 15:58:32 +01:00
Duane Sand
6701fbe5f0 [MIPS] Further opengl support for mips64 and mipsr6
Combines 4 patches by Dragoslav and Douglas:

Use t9 to hold the address of the called function.
Add support for gl binding.
Fix inline assembly code to be R6 compatible.
Fix some more inline assembly code to be R6 compatible.

Change-Id: I0b899813790b2ba4ca538bb21692014cc1933f66
2015-01-19 11:54:46 +01:00
Jeff Sharkey
8f3ade0c9a Merge "Follow StrictMode refactoring." 2015-01-16 01:10:52 +00:00
Christopher Ferris
1d4638838a Merge "Use the timeout stack dump functions." 2015-01-15 23:40:39 +00:00
Christopher Ferris
31ef85529d Use the timeout stack dump functions.
Use the native stack dumping functions that allows time outs. If
debuggerd locks up, before a bugreport would hang forever. Now
it will timeout properly and still get all of the other information.

Bug: 18766581

(cherry picked from commit 457731f69e)

Change-Id: I39e8e9c60209e3ef9efac795fedb8e1edce2bd3e
2015-01-15 15:35:40 -08:00
Jeff Davidson
4df903dbc7 Merge "Revert "Revert "Update protobuf library from 2.3 to 2.6.""" 2015-01-15 22:49:02 +00:00
Jeff Sharkey
0c1f5cbb8a Follow StrictMode refactoring.
Bug: 18335678
Change-Id: Iea920cfa26b5ebfd77b4601c9e6e65b21599342a
2015-01-14 10:58:52 -08:00
Riley Andrews
aec9224266 Merge "Replace all instances of intptr_t with uintptr_t." 2015-01-13 22:06:05 +00:00
Riley Andrews
41a160c4cd Merge "Fix signed/unsigned comparison warnings in driver interface test." 2015-01-13 22:00:24 +00:00
Riley Andrews
29d8cf91be Replace all instances of intptr_t with uintptr_t.
When compiling 32 bit binaries against a 64 bit binder interface,
implicit promotions of intptr_t types to uint64_t for fields in the
binder ioctl structures can result in invalid pointers because of sign
extension.
2015-01-13 21:59:44 +00:00
Brian Carlstrom
6f9c6541b7 Merge "[MIPS] Build libGLES for mips64, mips32r6" 2015-01-13 06:19:37 +00:00
Duane Sand
81c6d66a1d [MIPS] Build libGLES for mips64, mips32r6
For now, use generic C code instead of assembler.

Change-Id: I604ecdcde2d5373f1f68ab97a63a80667b630846
2015-01-12 22:18:13 -08:00
Riley Andrews
50bcb00a91 Fix signed/unsigned comparison warnings in driver interface test. 2015-01-12 18:20:49 -08:00
Jesse Hall
5b730570be Merge "surfaceflinger: use Mutex timedLock instead of tryLock loop" 2015-01-12 23:33:07 +00:00
Jeff Davidson
a9650f0ccc Revert "Revert "Update protobuf library from 2.3 to 2.6.""
This reverts commit bca4262dac.

Change-Id: I8ecd859340779dfacffba4c6d1a44c5cdbdfceed
2015-01-12 20:07:43 +00:00
Jeff Davidson
83f14309f1 Merge "Revert "Update protobuf library from 2.3 to 2.6."" 2015-01-12 20:00:51 +00:00