Commit graph

6833 commits

Author SHA1 Message Date
Colin Cross
268cc54089 Merge "ueventd: fix a busy loop while reading uevents" 2013-12-28 20:09:53 +00:00
Colin Cross
2dcc275936 Merge "Run the console service shell in the shell domain." 2013-12-27 20:16:49 +00:00
Colin Cross
c3e314a93c Merge changes Ie4b641cd,I5502b71d,I68086ce4
* changes:
  libion: add apache license header to ion_test.c
  libion: initial unit tests
  libion: update ion_test.h
2013-12-27 00:22:55 +00:00
Stephen Smalley
5e1461dc90 Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
If checkreqprot == 1, SELinux only checks the protection flags passed
by the application, even if the kernel internally adds PROT_EXEC for
READ_IMPLIES_EXEC personality flags.  Switch to checkreqprot == 0
to check the final protection flags applied by the kernel.

Change-Id: Ic39242bbbd104fc9a1bcf2cd2ded7ce1aeadfac4
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-12-23 16:29:25 -05:00
Stephen Smalley
610653fe93 Run the console service shell in the shell domain.
This allows it to be permissive in userdebug/eng builds
but confined/enforcing in user builds.

Change-Id: Ie322eaa0acdbefea2de4e71ae386778c929d042b
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-12-23 14:11:44 -05:00
Colin Cross
735ead6e68 libion: add apache license header to ion_test.c
Change-Id: Ie4b641cd62b56f713178932cc5c08083c0d2452a
2013-12-19 19:31:46 -08:00
Colin Cross
363441b120 libion: initial unit tests
Change-Id: I5502b71d0c7c24d7fd59e4880033657f840b341a
2013-12-19 19:31:46 -08:00
Colin Cross
b04f75ab12 libion: update ion_test.h
Update ion_test.h to include a padding word to keep the same
struct size on 32-bit and 64-bit.

Change-Id: I68086ce49ca4cc4ed8e251752eaed331a35fbbd2
2013-12-19 19:31:19 -08:00
Colin Cross
cd8b953ede Merge changes I2d3fef08,Idb828aa4,Ica764b1f,I9ae8887b,I376fad86,I4d00a9dd
* changes:
  libion: update to latest uapi header
  libion: return -errno from ion_close
  libion: add include for size_t
  libion: add NULL checks
  libion: clean up whitespace
  libion: move ion.h into local include directory
2013-12-19 21:49:48 +00:00
Colin Cross
dfe747ada3 Merge "ion: update struct and type definitions to match kernel header" 2013-12-19 21:18:51 +00:00
Nick Kralevich
67cb61ee5a Merge "adb: Check sender's socket id when receiving packets." 2013-12-19 18:33:56 +00:00
Brian Carlstrom
b3bfe8818a Merge "Make libutils Looper independent of frameworks/native" 2013-12-19 07:13:00 +00:00
Brian Carlstrom
1693d7e48f Make libutils Looper independent of frameworks/native
Change-Id: I1dacca10a3cd7601abc3451b69ed761bf71c38fe
2013-12-18 22:32:13 -08:00
Colin Cross
dd6770bd49 libion: update to latest uapi header
Pull the uapi headers from android-3.10 directly into libion.
No other modules should be directly calling ion kernel
interfaces, so there is no reason to have those interfaces
exposed.

Change-Id: I2d3fef08f6bb381522ecf7bcffea2b8280d5e737
2013-12-18 18:43:22 -08:00
Colin Cross
aab47b293f libion: return -errno from ion_close
Return -errno from ion_close instead of -1 on error.

Change-Id: Idb828aa4b4d1a660b79d2dba8be32f306eac959d
2013-12-18 18:27:57 -08:00
Colin Cross
51b6e42231 libion: add include for size_t
Add sys/types.h include for size_t

Change-Id: Ica764b1f5eca2df21d82c86493fc4e0d70b6628a
2013-12-18 18:27:57 -08:00
Colin Cross
7496318486 libion: add NULL checks
Check for NULL in any library function that takes a pointer.

Change-Id: I9ae8887b5ae0f231583173ee6a9dfd2f8c4611ec
2013-12-18 18:27:57 -08:00
Colin Cross
92d7ca6af3 libion: clean up whitespace
Convert everything to 4 space indents, no tabs.

Change-Id: I376fad866864f0579b91ffad406e872fcce566ad
2013-12-18 18:27:54 -08:00
Rom Lemarchand
969eac8161 ion: update struct and type definitions to match kernel header
- Replacing struct ion_handle * with ion_user_handle_t
- Replacing heap_mask field name with heap_id_mask

Change-Id: Iaba1ccc62b9398a7b37c5a734bc21a9ecbbc8277
2013-12-18 18:24:50 -08:00
Colin Cross
03c932dffa libion: move ion.h into local include directory
Export it to users of libion with LOCAL_C_EXPORT_INCLUDE_DIRS

Change-Id: I4d00a9dd2e99953723994d0304ca77e0ad50a3a9
2013-12-18 18:24:50 -08:00
Greg Hackmann
d27498cbef Merge "toolbox: date: use RTC subsystem on devices without /dev/alarm" 2013-12-18 00:19:21 +00:00
Greg Hackmann
eb3e9dafbd Merge "toolbox: date: fix parameter type warnings" 2013-12-18 00:18:24 +00:00
Greg Hackmann
215f78ae55 Merge "toolbox: uptime: use clock_gettime() on devices without /dev/alarm" 2013-12-18 00:18:03 +00:00
Greg Hackmann
83a766373f Merge "toolbox: uptime: fix unused parameter warnings" 2013-12-18 00:17:36 +00:00
Greg Hackmann
9ade11c1c5 Merge "SystemClock: use clock_gettime() on devices without /dev/alarm" 2013-12-18 00:17:26 +00:00
Greg Hackmann
537f53b682 Merge "rootdir: add permissions for /dev/rtc0" 2013-12-18 00:17:01 +00:00
Greg Hackmann
4a7bc60071 toolbox: date: use RTC subsystem on devices without /dev/alarm
Change-Id: I48c0fd1f4cffef936afb8d48d6d93babf006004d
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-12-17 14:45:39 -08:00
Greg Hackmann
c057503aaf toolbox: date: fix parameter type warnings
Change-Id: I810a9abee8bc0061c5007fe08197384f2b85754b
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-12-17 14:45:39 -08:00
Greg Hackmann
fa66f1e494 toolbox: uptime: use clock_gettime() on devices without /dev/alarm
Change-Id: Id7287ca179cc0b8390c054803a25a961dd550a34
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-12-17 14:45:39 -08:00
Greg Hackmann
7f625ed026 toolbox: uptime: fix unused parameter warnings
Change-Id: Id240ce85bf09e1a81f4e2e2a7496ac7952edbf38
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-12-17 14:45:39 -08:00
Greg Hackmann
64289760a2 SystemClock: use clock_gettime() on devices without /dev/alarm
On devices with an up-to-date kernel, the back-in-time bug affecting
clock_gettime() has been fixed and it can safely be used as an
alternative to the ANDROID_ALARM_GET_TIME ioctl.  To ensure consistent
behavior on existing devices, make clock_gettime() a fallback for when
the alarm driver isn't available.

Change-Id: I384af5e7ec9e73e0bad4b6b0f987a8ea4583cba6
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-12-17 14:45:39 -08:00
Greg Hackmann
a585e662e0 rootdir: add permissions for /dev/rtc0
Change-Id: If9d853bdae2399b1e7434f45df375ba1fd6dbe9c
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-12-17 14:45:39 -08:00
Elliott Hughes
30f9b50920 Merge "libdiskconfig: Use uintptr_t instead of uint32_t" 2013-12-17 21:15:42 +00:00
Ashok Bhat
35539affd8 libdiskconfig: Use uintptr_t instead of uint32_t
Use uintptr_t instead of uint32_t when pointer is cast
to an integer type.

Change-Id: I03dd4c7ff66611661af466dfb7b393d461bb2d7d
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2013-12-17 12:43:41 +00:00
Elliott Hughes
532f465823 Merge "AArch64: Correction of struct surface_t" 2013-12-16 19:50:17 +00:00
Elliott Hughes
fd7eabe442 Merge "Pixelflinger: Add AArch64 support to pixelflinger JIT." 2013-12-16 19:42:55 +00:00
Elliott Hughes
cadb10c957 Merge "Pixelflinger: Support for handling 64-bit addresses in GGL Assembler" 2013-12-16 18:55:09 +00:00
Nick Kralevich
e4335483e7 Merge "Relabel /data/misc/zoneinfo" 2013-12-16 16:59:19 +00:00
David 'Digit' Turner
818d641c42 adb: Check sender's socket id when receiving packets.
handle_packet() in adb.c didn't check that when an A_WRTE packet is
received, the sender's local-id matches the socket's peer id.

This meant that a compromised adbd server could sent packets to
the host adb server, spoofing the identity of another connected
device if it could "guess" the right host socket id.

This patch gets rid of the issue by enforcing even more checks
to ensure that all packets comply with the description in
protocol.txt.

+ Fix a bug where closing a local socket associated with a
  remote one would always send an A_CLSE(0, remote-id, "")
  message, though protocol.txt says that should only happen
  for failed opens.

  The issue was that local_socket_close() called
  remote_socket_close() after clearing the remote socket's
  'peer' field.

  The fix introduces a new asocket optional callback,
  named 'shutdown' that is called before that, and is
  used to send the A_CLSE() message with the right ID
  in remote_socket_shutdown().

  Also add some code in handle_packet() to detect
  invalid close commands.

Change-Id: I9098bc8c6e81f8809334b060e5dca4fc92e6fbc9
2013-12-16 17:58:08 +01:00
Elliott Hughes
e1a475c0b4 Merge "Force alignment of data buffer used to process netlink messages" 2013-12-14 00:13:32 +00:00
Nick Kralevich
354e9edbd7 Relabel /data/misc/zoneinfo
The files in zoneinfo changed from system_data_file to
zoneinfo_data_file. Fixup pre-existing files.

Change-Id: Idddbd6c2ecf66cd16b057a9ff288cd586a109949
2013-12-13 16:03:48 -08:00
Narayan Kamath
4928d8d072 Merge "Fix ExtractEntryToFile." 2013-12-13 18:13:01 +00:00
Narayan Kamath
00a258cec7 Fix ExtractEntryToFile.
We would always write uncompressed data at offset 0 instead
of the current filedescriptor offset.

Also adds a unit-test & a clarifying comment on the API.

Change-Id: If44757e96dde504ce63d81b4dec7115fc6f6d5fb
2013-12-13 17:56:57 +00:00
Elliott Hughes
d5f97db507 Merge "libion: Use %zu for size_t" 2013-12-13 17:38:23 +00:00
Elliott Hughes
a67b39cb61 Merge "Pixelflinger: Fix issue of pointers being stored in ints" 2013-12-12 21:22:33 +00:00
Ashok Bhat
658f89dc5c Pixelflinger: Add AArch64 support to pixelflinger JIT.
See the comment-block at the top of Aarch64Assembler.cpp
for overview on how AArch64 support has been implemented

In addition, this commit contains
[x] AArch64 inline asm versions of gglmul series of
    functions and a new unit test bench to test the
    functions

[x] Assembly implementations of scanline_col32cb16blend
    and scanline_t32cb16blend for AArch64, with unit
    test bench

Change-Id: I915cded9e1d39d9a2a70bf8a0394b8a0064d1eb4
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2013-12-12 17:30:13 +00:00
Ashok Bhat
bfc6dc4ca8 Pixelflinger: Support for handling 64-bit addresses in GGL Assembler
GGLAssembler assumes addresses to be 32-bit and uses ARM 32-bit
instructions to load/store/manipulate addresses. To support, 64-bit
architectures, following changes has been done

1. ARMAssemblerInterface has been extended to support four new
   operations ADDR_LDR, ADDR_STR, ADDR_SUB, ADDR_ADD. Base class
   implements these virtual functions to use 32bit  equivalent
   function. This avoids existing 32-bit Assembler backend
   implementations like ARMAssembler and MIPSAssembler  from
   mapping the new functions to existing equivalent routines.
   This also allows 64-bit Architectures like AArch64 to override
   the function in their assembler backend implementations.

2. GGLAssembler code (spread over GGLAssembler.cpp, GGLAssembler.h
   and texturing.cpp) has been changed to use the new operations
   for address operations.

Change-Id: I3d7eace4691e3e47cef737d97ac67ce6ef4fb18d
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2013-12-12 17:30:13 +00:00
Ashok Bhat
d10afb1748 Pixelflinger: Fix issue of pointers being stored in ints
Pixelflinger's code makes assumptions, at certain places,
that pointers can be stored as ints. This patch makes use
of uintptr_t wherever pointers are stored as int or cast
to int.

Change-Id: Ie76f425cbc82ac038a747f77a95bd31774f4a8e8
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2013-12-12 17:30:13 +00:00
Narayan Kamath
7d92b7cc65 Merge "Get rid of some log spam." 2013-12-12 17:19:40 +00:00
Narayan Kamath
f6a196522a Get rid of some log spam.
We don't need a warning if an entry isn't found in a zip
file. It can happen as part of normal operation.

Change-Id: I86c132a040371f36f0dd981b49c02b3173821439
2013-12-12 10:29:31 +00:00