Commit Graph

21859 Commits

Author SHA1 Message Date
Nick Kralevich 4cf1ddea1e Merge "init: harden socket creation against symlinks" am: 0f565c1ea4
am: 780883e33c

* commit '780883e33c0dede40dd5cbdf96cff35a5313bcfc':
  init: harden socket creation against symlinks
2016-02-25 20:42:29 +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
Badhri Jagan Sridharan ef375c6583 Merge "healthd: Read the max power supply voltage" into nyc-dev
am: df09aefc16

* commit 'df09aefc1603903429d8fa7c4838a38a7c6dc8d3':
  healthd: Read the max power supply voltage
2016-02-25 20:30:12 +00:00
Alex Klyubin 73c6fd1af2 Merge "Only debuggable packages can be downgraded." into nyc-dev
am: 8a67c09e7d

* commit '8a67c09e7d630ccecf8eb17463511dde2f16b548':
  Only debuggable packages can be downgraded.
2016-02-25 20:29:49 +00: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
Ruchi Kandoi df09aefc16 Merge "healthd: Read the max power supply voltage" into nyc-dev 2016-02-25 20:28:19 +00:00
Alex Klyubin 8a67c09e7d Merge "Only debuggable packages can be downgraded." into nyc-dev 2016-02-25 20:26:54 +00:00
Steve Fung ebc4d4c513 Merge "crash_reporter: Fix product_id in kernel crash reports" am: 2681515100
am: 557152a97a

* commit '557152a97a60a74a93eb44e9575903bc4ced6cc4':
  crash_reporter: Fix product_id in kernel crash reports
2016-02-25 20:24:46 +00: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
Badhri Jagan Sridharan 40e1df4488 healthd: Read the max power supply voltage
With Type-C PD, VBUS can no longer be assumed to
to be at 5V. Read the "voltage_max" field from the
power_supply class node and export it through
BatteryProperties service.

Bug: 25229483
Change-Id: I04e32d9783a21bab375f1724758a9eeace2a047c
2016-02-25 12:15:54 -08:00
Dimitry Ivanov 2c7960c8d9 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
2016-02-25 11:44:35 -08:00
Yusuke Sato c4c8bf4a9c Merge "Use ro.debuggable instead of ro.build.type" am: 37c90df931
am: 4e30b63fc6

* commit '4e30b63fc6049ec728d607b49632f287128074c7':
  Use ro.debuggable instead of ro.build.type
2016-02-25 19:35:52 +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
Dimitry Ivanov d047c925af Added function to explicitly initialize a namespace
This change replaces lazy get-or-create logic for
linker namespaces with the explicit one.

ApplicationLoaders.getClassLoader(..) is now resposible for
the namespace initialization for PathClassLoaders.

Bug: http://b/27189432
Bug: http://b/22548808
Change-Id: Ife987c3ca1db33a47c20f363a5ed61512be8b5a7
2016-02-25 11:33:32 -08:00
Yusuke Sato 37c90df931 Merge "Use ro.debuggable instead of ro.build.type" 2016-02-25 19:32:57 +00:00
Josh Gao 9464ba0433 adb: fix leak of framework_fd.
am: 2eaa41a6df

* commit '2eaa41a6dfb97ad1015e456692318af8de13af5c':
  adb: fix leak of framework_fd.
2016-02-25 19:29:50 +00:00
Josh Gao 08efd268c2 adb: bail out if wait_for_device fails in send_shell_command.
am: b6117c4397

* commit 'b6117c4397a711d0e70cade978de97faffb6d4b7':
  adb: bail out if wait_for_device fails in send_shell_command.
2016-02-25 19:29:42 +00:00
Josh Gao 2eaa41a6df 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
(cherry picked from commit 9f48611554)
2016-02-25 11:01:59 -08:00
Josh Gao b6117c4397 adb: bail out if wait_for_device fails in send_shell_command.
Bug: http://b/27166186
Change-Id: Ib7e9d7e6b909d67a3af94c3517a6a0b54cf17db7
(cherry picked from commit f56c39194f)
2016-02-25 11:01:38 -08: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 63b8571dce Merge "adb: bail out if wait_for_device fails in send_shell_command." am: 4e5b292299
am: 2b7f69d0f1

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

* commit '2ea5bf7b551799468a1f5378a2f82412db81a4c2':
  adb: fix leak of framework_fd.
2016-02-25 18:48:22 +00: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 356332cf44 Merge "Prepare mincrypt tools for move to recovery repo." am: 511e943855
am: 81b546e0ea

* commit '81b546e0ea9eefa48b48594ed4d87dd6d78315fc':
  Prepare mincrypt tools for move to recovery repo.
2016-02-25 15:03:30 +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
Lorenzo Colitti 5e953a2909 Merge "Delete dhcpcd code in system/core, since dhcpcd is no more." into nyc-dev
am: b046e74bef

* commit 'b046e74beff221d96189c4142f42f18730565921':
  Delete dhcpcd code in system/core, since dhcpcd is no more.
2016-02-25 07:57:34 +00:00
Lorenzo Colitti b046e74bef Merge "Delete dhcpcd code in system/core, since dhcpcd is no more." into nyc-dev 2016-02-25 07:56:16 +00:00
Lorenzo Colitti 9c07eb9dd8 Delete dhcpcd code in system/core, since dhcpcd is no more.
Bug: 27192644
Change-Id: I44c2ded2da69395f12a8850b2677322b11c2cb91
2016-02-25 16:04:43 +09:00
Nick Kralevich 17e5b23a95 Merge "init: harden socket creation against symlinks" into nyc-dev
am: 53e56b9473

* commit '53e56b9473819fb5058e85e866ac493aaccbae81':
  init: harden socket creation against symlinks
2016-02-25 06:50:49 +00:00
Nick Kralevich 53e56b9473 Merge "init: harden socket creation against symlinks" into nyc-dev 2016-02-25 06:47:11 +00:00
Dimitry Ivanov 36863dbc99 resolve merge conflicts of 8c64eeaefe to nyc-dev-plus-aosp
Change-Id: I311bcc41f14504b8175986a038eab6f37ab119b8
2016-02-24 19:16:58 -08:00
Dimitry Ivanov 8c64eeaefe Merge "Add PreloadPublicNativeLibraries function"
am: 0f8753c6f0

* commit '0f8753c6f0b6acb8cb417e3a310b050d8825df67':
  Add PreloadPublicNativeLibraries function
2016-02-25 02:10:36 +00:00
James Hawkins 375204ebfa Merge "bootstat: Record the time since factory reset on init." into nyc-dev
am: 1f1b327923

* commit '1f1b327923fdacb9d71f218dada3c94988921b7f':
  bootstat: Record the time since factory reset on init.
2016-02-25 02:08:29 +00:00
Dimitry Ivanov e0681f0e5c Add PreloadPublicNativeLibraries function
am: 426799d770

* commit '426799d77014888315233253e96277bef13158eb':
  Add PreloadPublicNativeLibraries function
2016-02-25 02:08:10 +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
James Hawkins 1f1b327923 Merge "bootstat: Record the time since factory reset on init." into nyc-dev 2016-02-25 00:49:07 +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