Commit Graph

20050 Commits

Author SHA1 Message Date
James Hawkins ac06dcd29f Merge "crash_report: Fix several signed-unsigned comparison warnings in tests." 2016-02-26 22:32:32 +00:00
James Hawkins a28317d137 crash_report: Fix several signed-unsigned comparison warnings in tests.
The two types of fixes are:
* Assign expected non-negative values to unsigned int variables.
* Annotate constant expected integer values as unsigned.

Bug: 27378717
Change-Id: Ifc13beedd61a28ed685e1a06a7cefe99072e3345
2016-02-26 11:24:38 -08:00
Mattias Nissler 474ef2484e Remove libmincrypt/tools after move to bootable/recovery
Bug: 27326256
Change-Id: Ife119db4cda9905b66a1ab5b6f018de85547c0f3
2016-02-26 11:03:15 +01:00
Steve Fung 96df20f628 Merge "crash_reporter: Clean up symlinks in unit test"
am: 36016e2742

* commit '36016e2742597ea4e5350ba89a5188ef4937ce7a':
  crash_reporter: Clean up symlinks in unit test
2016-02-26 02:07:56 +00:00
Steve Fung 36016e2742 Merge "crash_reporter: Clean up symlinks in unit test" 2016-02-26 02:06:12 +00:00
Steve Fung 7ee2f36e67 crash_reporter: Clean up symlinks in unit test
The user collector test creates several symlinks to the temporary
directory that it doesn't unlink.  Fix it.

BUG=27365098
TEST=run `crash_reporter_tests`, tests pass, no symlinks are left behind

Change-Id: I7ad24c528dc842e17fa3569ea010f43d34e0bd75
2016-02-25 16:16:13 -08:00
Josh Gao 95891e5a70 Merge "adb: fix mistaken use of PLOG."
am: a692f431d6

* commit 'a692f431d64c394ae620d9e7554075538e41e3c9':
  adb: fix mistaken use of PLOG.
2016-02-25 22:32:32 +00:00
Josh Gao a692f431d6 Merge "adb: fix mistaken use of PLOG." 2016-02-25 22:29:53 +00:00
Josh Gao 443a52c298 adb: fix mistaken use of PLOG.
Change-Id: I60bfa3d8cf1572a877d6f0c9369d8f72f10e5aef
2016-02-25 14:14:02 -08:00
James Hawkins bd493a7927 Merge "libpixelflinger: Fix -Woverloaded-virtual warnings."
am: aace5df403

* commit 'aace5df403a8d95429f13daf037a9def46bf7cd5':
  libpixelflinger: Fix -Woverloaded-virtual warnings.
2016-02-25 22:01:41 +00:00
James Hawkins aace5df403 Merge "libpixelflinger: Fix -Woverloaded-virtual warnings." 2016-02-25 21:59:40 +00:00
Christopher Ferris 19f704ba66 Merge "Fix incorrect handling of snprintf return value."
am: 63f7a67c6e

* commit '63f7a67c6e39109b402aae9b121c117b8bb7bd7b':
  Fix incorrect handling of snprintf return value.
2016-02-25 21:59:38 +00:00
Christopher Ferris 63f7a67c6e Merge "Fix incorrect handling of snprintf return value." 2016-02-25 21:58:44 +00:00
Mark Salyzyn acc6ca3eb8 Merge changes Ic15a87f4,I8a53ad3a,I6a03d405
am: 9377fa863a

* commit '9377fa863af78623d93698f045264c067e275dc3':
  liblog: __android_log_error_write use event list library
  liblog: test: __android_log_error_write accuracy
  liblog: add android_log_write_string8_len
2016-02-25 21:58:00 +00:00
Mark Salyzyn 9377fa863a Merge changes Ic15a87f4,I8a53ad3a,I6a03d405
* changes:
  liblog: __android_log_error_write use event list library
  liblog: test: __android_log_error_write accuracy
  liblog: add android_log_write_string8_len
2016-02-25 21:57:30 +00:00
Dimitry Ivanov 9d8d6f0a7a Merge "Make libutils symbols protected"
am: 70e75d9287

* commit '70e75d92872076f3f89cedf3b3a7b9ca4e9aafc1':
  Make libutils symbols protected
2016-02-25 21:12:37 +00:00
Dimitry Ivanov 70e75d9287 Merge "Make libutils symbols protected" 2016-02-25 21:10:20 +00:00
Dimitry Ivanov 96ccb85fa2 Make libutils symbols protected
This change is a workaround for apps linking
libutils statically and dynamically which causes
them to crash for newer version of Android.

Bug: http://b/27313399
Change-Id: I47ac4146041b6eeef03cb605ea436719d552ec8f
(cherry picked from commit 2c7960c8d9)
2016-02-25 13:09:40 -08:00
Christopher Ferris 626efb78a6 Fix incorrect handling of snprintf return value.
The code assumed that snprintf would never return a value less than
the passed in size of the buffer. This is not accurate, so fix all
of the places this assumptions is made. Also, if the name is too large,
then truncate just the name to make everything fit.

Added a new set of tests for this code. Verified that the old code passes
on the _normal and _exact version of the tests, but fails with the
FORTIFY error on the _truncated version of the tests. All tests pass
on the new code.

Bug: 27324359
Change-Id: I1b64ddde6f5ff2ec7f6428b998d21d41a1236b14
2016-02-25 12:46:44 -08:00
Mark Salyzyn 7c72c0f28d Merge changes Idaa6699d,Ic7759ef9
am: faf7946bd7

* commit 'faf7946bd79622a6fc564bc2487c21c950c896b1':
  logd: sock_alloc_send_pskb starves pruning
  logd: Allow (some) headers to be individually importable
2016-02-25 20:42:32 +00:00
Mark Salyzyn faf7946bd7 Merge changes Idaa6699d,Ic7759ef9
* changes:
  logd: sock_alloc_send_pskb starves pruning
  logd: Allow (some) headers to be individually importable
2016-02-25 20:40:58 +00:00
Nick Kralevich 780883e33c Merge "init: harden socket creation against symlinks"
am: 0f565c1ea4

* commit '0f565c1ea48aa625d4a6b2c342fd61bcbc9ca868':
  init: harden socket creation against symlinks
2016-02-25 20:40:10 +00:00
Nick Kralevich 0f565c1ea4 Merge "init: harden socket creation against symlinks" 2016-02-25 20:39:45 +00:00
Nick Kralevich 9bcfd64b59 init: harden socket creation against symlinks
Instead of using chown, use the symlink safe lchown.

Instead of using chmod, use the symlink safe fchmodat
with AT_SYMLINK_NOFOLLOW.

Fix a bug where the SELinux filesystem creation context may
not be restored, and some memory not freed, if bind() fails.

Check the return values from the chown/chmod calls and unlink
the files if it ever fails.

(cherrypicked from commit ab5629c197)

Bug: 27337831
Change-Id: I28c5f4dee55aa706437eb51ad403c1fbf56138de
2016-02-25 12:38:51 -08:00
Mark Salyzyn 81f407be36 liblog: __android_log_error_write use event list library
Switch to the event list library to compose the associated event.

SideEffects: Instead of composing event on a stack buffer of 512
             bytes in size, a PAGE is allocated temporarily.

Bug: 27356456
Change-Id: Ic15a87f49385834c2287ed82c26439b2c5eb4f77
2016-02-25 12:29:32 -08:00
Mark Salyzyn 5cecedc6e8 liblog: test: __android_log_error_write accuracy
Add a test to confirm exact expected content using the testframe
setup for the events log handler. Remove dependency on 512 truncation
in liblog->
android_errorWriteWithInfoLog__android_logger_list_read__data_too_large
to something more liberal.

Bug: 27356456
Change-Id: I8a53ad3a16cf16b14856efe5b95417e857c7e09b
2016-02-25 12:29:32 -08:00
Mark Salyzyn 67d7eafd56 liblog: add android_log_write_string8_len
android_log_write_string8_len(android_log_context ctx,
                              const char *value, size_t maxlen)

Caps the supplied string to a maxlen length. Alter API to handle
a NULL pointer for the value string for this and
android_log_write_string8() and instead of returning -EINVAL,
act like a null string "" was supplied to preserve the list
location. API is also changed to report the number of characters
actually placed into the android_log_context.

Bug: 27356456
Bug: 19235719
Change-Id: I6a03d405eac1d741555dd05555513ec691e7a46e
2016-02-25 12:29:32 -08:00
Steve Fung 557152a97a Merge "crash_reporter: Fix product_id in kernel crash reports"
am: 2681515100

* commit '26815151008e863b754506da4a2ac7da471672c9':
  crash_reporter: Fix product_id in kernel crash reports
2016-02-25 20:22:24 +00:00
Steve Fung 2681515100 Merge "crash_reporter: Fix product_id in kernel crash reports" 2016-02-25 20:20:25 +00:00
Yusuke Sato 4e30b63fc6 Merge "Use ro.debuggable instead of ro.build.type"
am: 37c90df931

* commit '37c90df93111b5ce08720f8c614dd9e946679ac4':
  Use ro.debuggable instead of ro.build.type
2016-02-25 19:34:27 +00:00
Yusuke Sato 37c90df931 Merge "Use ro.debuggable instead of ro.build.type" 2016-02-25 19:32:57 +00:00
James Hawkins 9336b613ca libpixelflinger: Fix -Woverloaded-virtual warnings.
GGLAssembler inherits a reset method from two parent classes, but it
provides a separate reset method with a different signature, thus hiding
the inherited reset methods.

The fix is to explicitly hide the inherited reset methods as private.

Bug: 27346663
Change-Id: Ic64b00acb6d77fb791cfdeade9ef7e20148817c1
2016-02-25 10:59:30 -08:00
Yusuke Sato 246b0fd0d9 Use ro.debuggable instead of ro.build.type
Change-Id: I4d7c8c353ff47fbeee065b2c4fdd984768d0da00
2016-02-25 10:53:55 -08:00
Josh Gao 2b7f69d0f1 Merge "adb: bail out if wait_for_device fails in send_shell_command."
am: 4e5b292299

* commit '4e5b2922991dddf03c122963fb197968de5764e3':
  adb: bail out if wait_for_device fails in send_shell_command.
2016-02-25 18:46:40 +00:00
Josh Gao 2ea5bf7b55 Merge "adb: fix leak of framework_fd."
am: 77dc40f2fa

* commit '77dc40f2fa3126871f64bc9e13a374d29bc3440f':
  adb: fix leak of framework_fd.
2016-02-25 18:46:32 +00:00
Josh Gao 4e5b292299 Merge "adb: bail out if wait_for_device fails in send_shell_command." 2016-02-25 18:43:42 +00:00
Josh Gao 77dc40f2fa Merge "adb: fix leak of framework_fd." 2016-02-25 18:43:34 +00:00
Mattias Nissler 81b546e0ea Merge "Prepare mincrypt tools for move to recovery repo."
am: 511e943855

* commit '511e94385573f891a9dc70d8400b00a7d860c90e':
  Prepare mincrypt tools for move to recovery repo.
2016-02-25 14:59:41 +00:00
Mattias Nissler 511e943855 Merge "Prepare mincrypt tools for move to recovery repo." 2016-02-25 14:55:09 +00:00
Steve Fung b3a48e1863 crash_reporter: Fix product_id in kernel crash reports
Move the bdk_version, product_id, and product_version metadata
population into the base crash_collector class so that all
colletors correctly report those fields in crash reports.

BUG=27344416
TEST=crash_reporter_tests passes.

Change-Id: I050053055f197d01661a1442e3cdcccc53c1c8fe
2016-02-25 03:37:33 -08:00
Dimitry Ivanov 8c64eeaefe Merge "Add PreloadPublicNativeLibraries function"
am: 0f8753c6f0

* commit '0f8753c6f0b6acb8cb417e3a310b050d8825df67':
  Add PreloadPublicNativeLibraries function
2016-02-25 02:10:36 +00:00
Josh Gao 9f48611554 adb: fix leak of framework_fd.
Move the fdevent for the framework authentication connection out of
atransport into its own static variable in adb_auth_client, since its
lifetime is completely unrelated to that of the USB connection.

Bug: http://b/27297963
Change-Id: Ie6180d0b59d133120c5755e239e76ab33ed3cc1d
2016-02-24 17:56:12 -08:00
Dimitry Ivanov 0f8753c6f0 Merge "Add PreloadPublicNativeLibraries function" 2016-02-25 01:05:56 +00:00
Dimitry Ivanov 6f80022908 Add PreloadPublicNativeLibraries function
Shift responsibility of preloading native libraries to the user
of the library. This lets applications that do not use jni but
depend on libnative_loader.so to avoid unnecessary preloads of
public libraries which could be expensive.

Bug: http://b/27245894
Change-Id: I12a8100de5da639c068769bca21ecebff2b2d538
(cherry picked from commit 426799d770)
2016-02-24 16:45:26 -08:00
Josh Gao f56c39194f adb: bail out if wait_for_device fails in send_shell_command.
Bug: http://b/27166186
Change-Id: Ib7e9d7e6b909d67a3af94c3517a6a0b54cf17db7
2016-02-24 15:22:14 -08:00
Jorge Lucangeli Obes c41b28b8bc Merge "adbd: Remove explicit capability bounding set code."
am: d458730b64

* commit 'd458730b649a044268807d1458867e3c1d0577b2':
  adbd: Remove explicit capability bounding set code.
2016-02-24 22:21:07 +00:00
Jorge Lucangeli Obes e2d720a61f Merge "Add more first-party Brillo system users."
am: 21dd6feb1c

* commit '21dd6feb1cca28192d9ad3a19fb126657970fc78':
  Add more first-party Brillo system users.
2016-02-24 22:20:44 +00:00
Jorge Lucangeli Obes d458730b64 Merge "adbd: Remove explicit capability bounding set code." 2016-02-24 22:13:09 +00:00
Jorge Lucangeli Obes 21dd6feb1c Merge "Add more first-party Brillo system users." 2016-02-24 22:12:46 +00:00
James Hawkins 3733d82596 Merge "bootstat: Record the time since factory reset on init."
am: 4a630ee0d3

* commit '4a630ee0d3cc436fe36433f048190b297c513c4f':
  bootstat: Record the time since factory reset on init.
2016-02-24 21:39:52 +00:00