Commit graph

1164 commits

Author SHA1 Message Date
Daniel Colascione
d49fb1238d Merge "Support * as a wildcard for ATRACE_TAG_APP" am: 53c964f53b am: 2e50045f60
am: 34499aab21

Change-Id: Ie8e78dc2f85c513ba4ba8b4a355a7d4de1e1055d
2018-02-12 23:27:14 +00:00
Ajit Kumar
c2a059fbf0 Enabled SYS_MODULE capability for wifi@1.0-service
Add sys_module capability to enabled insmod operation.

Change-Id: I6436c3297e5318bd00ae3582549a11cb82ccbafd
2018-02-12 18:31:47 +00:00
Daniel Colascione
642ef98b3b Support * as a wildcard for ATRACE_TAG_APP
Test: strcmp
Change-Id: I33ec3ae071e3856538444663bbabb3c779ed8afa
2018-02-09 20:08:19 -08:00
Paul Crowley
c67fd14fd1 Merge "Revert "Don't initialize atrace if it's already disabled."" am: c50d19c0b0 am: 33d3758684
am: 006cd45c86

Change-Id: I1f9e10da302fdb6b0a427dae321551f8e3744f7a
2018-02-08 17:46:30 +00:00
Treehugger Robot
c50d19c0b0 Merge "Revert "Don't initialize atrace if it's already disabled."" 2018-02-08 17:27:41 +00:00
Paul Crowley
738adf7b46 Revert "Don't initialize atrace if it's already disabled."
This reverts commit e184423526.

Reason for revert: b/73081734
Bug: 73081734

Change-Id: I8ae835f5575292ebd3c4457ef26c2e8f98cfa11e
2018-02-08 00:49:37 +00:00
Mark Salyzyn
1e330b0376 Merge "libcutils: Add "daemon" and "bin" users for testing only" am: 718899b415 am: 2500e38093
am: 451ff596cf

Change-Id: Id2abde064963cbb68929c76ff5a47d4f52995190
2018-02-06 04:29:47 +00:00
Mark Salyzyn
8e8648463d libcutils: Add "daemon" and "bin" users for testing only
Multiple LTP tests require a "daemon" or "bin" user.  These user ids
have been defined since UNIX incept, and even up to the '80s remained
in many of the tools as hard coded values.  Add these two ids with
a cautionary note.

Test: compile
Bug: 31152327
Bug: 31226046
Bug: 32385889
Change-Id: Ida2fb6d817b8ada0624870439fcf848667b31fb3
2018-02-05 11:06:08 -08:00
Mark Salyzyn
eac8700cbb Merge "libcutils: test: increase use of ashmem_valid(fd)" am: dd218e6c84 am: 9f3a257536
am: 43f2c5cf38

Change-Id: I5e7b0994b76afbc60446518d08fe36dbf02f3fe5
2018-01-31 17:52:43 +00:00
Treehugger Robot
dd218e6c84 Merge "libcutils: test: increase use of ashmem_valid(fd)" 2018-01-31 17:35:29 +00:00
Paul Crowley
8645dd1204 Merge "Don't initialize atrace if it's already disabled." am: 0e239bbd8b am: 2fc40a6518
am: 65c685e204

Change-Id: I1ab9cff70cd461069f2db651ab96f449aae4666e
2018-01-30 22:14:34 +00:00
Paul Crowley
e184423526 Don't initialize atrace if it's already disabled.
For processes that start very early, atrace initialization can cause
an selinux denial, so make sure it's possible to disable it and avoid
the call to open "trace_marker".

Bug: 63927601
Test: disable atrace early in vold, ensure that selinux denial is
avoided.

Change-Id: I2422e6d0db323bc13c6d6ed1896435151fca21f7
2018-01-30 08:18:24 -08:00
Ruchi Kandoi
838c985416 Merge "Add AID for Secure Element Application" am: d3e7e31d28 am: 66c3eb0e45
am: f9ae0b10e0

Change-Id: I81e91a74c81a8e9854b1f4bab26ed03f033801c6
2018-01-26 20:02:54 +00:00
Mark Salyzyn
276758dab8 libcutils: test: increase use of ashmem_valid(fd)
There may be evidence of ashmem_valid(fd) reporting that the file
descriptor is an ashmem node.  Increase testing of ashmem_valid(fd),
reporting that the node _is_ ashmem, to inspire confidence in the
positive result.  Scan all file descriptors in the system, and for
those that pass ashmem_valid, get a non-zero size reference back.

Some clang-format-isms applied.

Test: libcutils-test --gtest_filter=AshmemTest.*
Bug: 72021458
Change-Id: I77d746b57a89a6afa1b829dddfdc4dd319f6b684
2018-01-26 09:50:57 -08:00
Ruchi Kandoi
d506c068d4 Add AID for Secure Element Application
Test: Test if the correct uid is assigned to the application
Change-Id: Ib0302a2e90ae89499ecbcebffa393bdd037adfbe
2018-01-25 18:21:53 +00:00
Jaekyun Seok
207a211804 Merge "Support /product partition" am: 8f324542a2 am: 10e1ec7de3
am: 83ffef2cb1

Change-Id: Ia1933bbede3db2489151e5ab8ead574582b87f7a
2018-01-25 04:17:36 +00:00
Jaekyun Seok
dff165d3a2 Support /product partition
This CL will enable reading /product/build.prop and add product paths
into ld.config.txt.in.

Bug: 64195575
Test: tested with 'PRODUCT_PRODUCT_PROPERTIES := ro.product.abc=abc' on
sailfish

Change-Id: Ie996def20e25dc1afe0c74af2096af844934b2dc
2018-01-25 09:37:20 +09:00
Roshan Pius
656b75c77c fs_config: Move hostapd to /vendor/bin/hw
Bug: 36646171
Test: Able to turn on softap
Change-Id: Ibd82581a12b4bd2e7d22825361706e35f292ce2b
2018-01-16 12:38:04 -08:00
Yi Jin
31b506679b Add AID_STATSD and AID_INCIDENTD for statsd/incidentd daemons.
Test: manual
Change-Id: Id798519c3b0116529fc698e6b316a1c6b1c293ca
2018-01-09 14:17:50 -08:00
Treehugger Robot
f008571a4f Merge "libcutils: Stop checking the uid of netlink messages" 2018-01-09 17:35:31 +00:00
Treehugger Robot
affd4e9bd9 Merge "Use override_export_include_dirs." 2018-01-08 22:15:51 +00:00
Luis Hector Chavez
84c99136fd libcutils: Stop checking the uid of netlink messages
This is a partial revert of
https://android-review.googlesource.com/c/platform/system/core/+/528619.
The uid-check was done before
https://patchwork.kernel.org/patch/1525551/ was available, and thus is
now unnecessary to perform such check, since we can just rely on the
kernel patch now.

Bug: 71632076
Test: aosp_sailfish-userdebug still works

Change-Id: I1d1319b774483d1714ecb4dd838a20e055acc2a3
2018-01-08 13:24:32 -08:00
Jeff Sharkey
354417a7fb Allocate GID to use reserved disk space.
Filesystems allow the setting of the "resgid" parameter to designate
a GID that is allowed to use the "reserved" disk space (in addition
to UID 0).  We'll be granting this GID to critical system processes,
so that the system is usable enough for the user to free up disk
space used by abusive apps.

Test: builds, boots
Bug: 62024591
Change-Id: I2d166f3b730f0a3e7279fb40f12db7413c1dadad
2018-01-07 19:21:51 -07:00
Steven Moreland
e1c834db04 Use override_export_include_dirs.
Bug: 62878521
Test: soong build system finds renamed attribute
Change-Id: I51e42f4378db366b8711cd373fb835fecda88416
2018-01-05 14:42:12 -08:00
Elliott Hughes
579e682628 Add std::string StartsWith*/EndsWith* overloads.
We should have done this from the beginning. Thanks to Windows, we're not
going to be able to switch libbase over to std::string_view any time soon.

Bug: N/A
Test: ran tests
Change-Id: Iff2f56986e39de53f3ac484415378af17dacf26b
2017-12-20 09:42:22 -08:00
Elliott Hughes
38d2567c9f Stop defining local "unused" macros now this is C++.
Bug: N/A
Test: builds, boots
Change-Id: I3eb075d5003fa7cdc6690f4af29a296e22be257c
2017-11-30 16:24:36 -08:00
Dan Willemsen
528f144e77 Fix / suppress new unused warnings for mingw+clang
Bug: 69933068
Test: mmma system/core
Change-Id: I089166a979d3d8c5ada38a7745d507b555048499
2017-11-29 21:37:28 -08:00
Jeff Sharkey
53d37ba23f Better, consistent definition of AID_SHARED_GID.
AID_SHARED_GID is a GID shared by a specific app across all users on
the same device.  Bring the UserHandle and multiuser.c implementations
into agreement, and copy/paste the unit tests that verify that both
behave identically.

This fixes a regression where multiuser_get_shared_gid() was applying
per-user isolation when it shouldn't have.

Test: adb shell /data/nativetest64/libcutils_test/libcutils_test64
Bug: 34151068, 64548938
Change-Id: I491dd79d23a214425a68865d1d0f8269916aad4c
2017-11-13 16:49:26 -07:00
Elliott Hughes
1412f5ffe3 Remove dead dlmalloc stubs.
Used to be used by ART, but long gone.

Bug: N/A
Test: ran tests
Change-Id: Id231d97b2b797562619e6fd90536b17dbe39f71e
2017-11-10 16:24:18 -08:00
Elliott Hughes
8e9aeb9053 Move libcutils source to C++.
Just the minimial changes to get this to actually build, because otherwise
we always bog down trying to rewrite everything (when the real answer
is usually "stop using libcutils, it's awful").

This doesn't move a handful of files: two are basically just BSD libc
source, a couple have outstanding code reviews, and one can be deleted
(but I'll do that in a separate change).

I'm also skipping the presubmit hooks because otherwise clang-format
wants to reformat everything. I'll follow up with that...

Bug: N/A
Test: builds
Change-Id: I06403f465b67c8e493bad466dd76b1151eed5993
2017-11-10 13:18:10 -08:00
Treehugger Robot
6707ef139d Merge changes from topic "qtaguidReplace"
* changes:
  Redirect qtaguid native call to netd fwmark client
  Move qtaguid API out of libcutils
2017-11-10 18:34:36 +00:00
Chenbo Feng
baede73bd9 Redirect qtaguid native call to netd fwmark client
In order to replace qtaguid module with new eBPF network monitoring
module. We firstly move the current qtaguid userspace implementation
into netd and hide the detail from other processes. The current API will
talk to netd fwmark client to pass down the qtaguid related request from
high level framework and netd will use the proper method to complete the
request.

Test: Current TrafficStats CTS tests should not fail.
Bug: 30950746
Change-Id: Ie90c28f3594ab2877746b2372a1b6944768bfb18
2017-11-09 18:02:22 -08:00
Chenbo Feng
5b11831aa1 Move qtaguid API out of libcutils
The qtaguid kernel module will be deprecated on devices running 4.9
kernel or above and we need to support both old and new module in
userspace. Netd is responsible for choosing which kernel module to use
and all the current qtaguid native implementation need to be hided
behind it. So the current qtaguid native API implementation will be
moved to a isolate library under system/core and only netd can access to
it. The libcutils qtaguid API will become a wrapper to send request to
netd module. This modification will make sure the apps that currently
using this native API will not be broken.

Bug: 30950746
Test: All cts and vts test related should not fail.
Change-Id: I9de98a25ed5dc71bbf520ee0aadd16d59025699a
2017-11-08 16:28:43 -08:00
Luis Hector Chavez
fae195b1e4 libcutils: Work around the lack of __mulodi4
The parent change ran into an issue where enabling UBSan on an i686
build caused it to use __mulodi4.

https://github.com/android-ndk/ndk/issues/184 documents linking against
libclang_rt.builtins-i686.a, but that's not available from soong either.

Bug: 62378620
Bug: 29412086
Test: x86 builds work again
Change-Id: I730d59558aa4ed28f8a11b5393e037111e320f29
2017-11-04 00:36:01 +00:00
Luis Hector Chavez
e97a4b9799 libcutils: Make uevent_kernel_* namespace-aware
This change adds user namespace-awareness to uevent_kernel_* in
libcutils. Instead of assuming that root is always uid 0, it detects
whether the uid 0 is mapped in the current user namespace and returns
the appropriately mapped uid (or the kernel's "overflowuid" in case it
is not mapped).

In older kernels, or those where user namespaces are not enabled, this
still uses uid 0 for root.

Bug: 62378620
Test: bullhead networking still works
Test: Android in Chrome OS can now receive netlink-related messages

Change-Id: I7ea3454e8f38b9c70c65294d6b2a99e5a88f9d70
2017-11-03 13:02:46 -07:00
Christopher N. Hesse
bdee15ef71 Merge "libcutils: Fix thread ID on macOS"
am: 6958506e82

Change-Id: If328ec31ff2d52b0852fb8e2eb2e061564504586
2017-10-23 20:32:47 +00:00
Christopher N. Hesse
684b442b9f libcutils: Fix thread ID on macOS
macOS 10.12 / Xcode 8 actively prohibit the syscall(2)
usage.

Change-Id: I91ff16600a76e97d0b9b5db7e8905b969fb3482f
2017-10-22 22:58:41 +02:00
Elliott Hughes
bb5ec4a926 resolve merge conflicts of 796987482 to stage-aosp-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ica884c137c5f21e261600b2b011ab963036c0cdb
2017-10-17 12:36:14 -07:00
Treehugger Robot
796987482f Merge "<stdbool.h> not necessary in C++." 2017-10-17 19:26:53 +00:00
Elliott Hughes
a0f73f9bff <stdbool.h> not necessary in C++.
Bug: N/A
Test: builds
Change-Id: I1f32b202e353414e74ace87a7d5b495b5deb5f99
Merged-In: I1f32b202e353414e74ace87a7d5b495b5deb5f99
2017-10-17 16:21:33 +00:00
Nick Kralevich
7e772f8194 Merge "set O_CLOEXEC on /dev/ashmem"
am: be729702ae

Change-Id: Ib308d27bd05d9d824772ab76564b2ed1487e09d3
2017-10-09 22:59:32 +00:00
Nick Kralevich
30046acdb2 set O_CLOEXEC on /dev/ashmem
Ensure FDs don't leak across exec() boundaries.

Test: builds and boots. No obvious issues.
Change-Id: I00347b489ddb146b9d33442626f0e89a6cf26551
2017-10-09 13:19:36 -07:00
Bowgo Tsai
d29ac08509 Merge "Removing $(PRODUCT_OUT)/root/root"
am: 8cbbacdc15

Change-Id: Ia671976f8d7d4b83478c58d566e309f36af125ab
2017-09-29 03:27:38 +00:00
Bowgo Tsai
144893e5ec Removing $(PRODUCT_OUT)/root/root
Bug: 65570851
Test: boot sailfish
Change-Id: I80c3c3de23c57343187fde207980731b5341bc1f
Merged-In: I80c3c3de23c57343187fde207980731b5341bc1f
(cherry picked from commit ededee3e40)
2017-09-28 18:10:58 +08:00
Mark Salyzyn
6818f80dbb Merge changes from topic "b/63736262"
am: 1f666a6be9

Change-Id: I2586aac3d6fe8252ee6728de64fb37102accf0da
2017-09-13 22:45:52 +00:00
Mark Salyzyn
b304f6d4e7 bootstat: introduce sys.boot.reason
Adding functionality to bootstat --record_boot_complete and
--record_boot_reason to initialize sys.boot.reason, the canonical
system boot reason.

Filter out ro.boot.bootreason oem noise into sys.boot.reason.  Add
heuristics to determine what the boot reason is, when otherwise would
be defaulting to the blunt and relatively devoid of detail catch-all
reboot reasons ("reboot", "shutdown", "cold", "warm", "hard").

boot_reason_test.sh is also a compliance test.

Test: boot_reason_test.sh all
Bug: 63736262
Change-Id: Ic9a42cccbcfc89a5c0e081ba66d577a97c8c8c76
2017-09-12 09:28:25 -07:00
Mark Salyzyn
37c6015d9d Merge "Switch /data/misc/reboot/last_reboot_reason to persistent property"
am: 13cb599536

Change-Id: Ib6c1b51668b892288db931b09b099bf5ed28fbae
2017-08-25 14:24:21 +00:00
Mark Salyzyn
73e6b49c0c Switch /data/misc/reboot/last_reboot_reason to persistent property
Switch from /data/misc/reboot/last_reboot_reason to persistent
Android property persist.sys.boot.reason for indicating why the
device is rebooted or shutdown.

persist.sys.boot.reason has a standard as outlined in b/63736262 and
the associated investigation. Made adjustments to the values so that
we did not create a problem even before we started. Compliance is
part of the tests in boot_reason_test.sh.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 64687998
Change-Id: I812c55a12faf7cb7ff92101009be058ad9958d07
2017-08-24 15:13:48 -07:00
Justin Yun
028664fcd3 Merge "Mark the modules as VNDK-SP in Android.bp"
am: bc9924ed40

Change-Id: I5f4802a063a1184ab1d246b3e81211923ab83853
2017-08-23 23:23:26 +00:00
Justin Yun
9ca92458e2 Mark the modules as VNDK-SP in Android.bp
As a VNDK-SP module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK-SP formated as follows:
vndk: {
    enabled: true,
    support_system_process: true,
},

VNDK-SP modules will be installed both in system/lib(64) as normal
and in system/lib(64)/vndk-sp as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: I51fe0859f63ad58b7b91909e7d7d4206443228cd
Change-Id: I51fe0859f63ad58b7b91909e7d7d4206443228cd
(cherry picked from commit aeb68e86e4)
2017-08-23 17:56:13 +09:00
Andrew Scull
e05c35a10b Merge "Add HSM AID." am: 4723d7c66d am: ef1dd0d279
am: a3f425950c

Change-Id: Iabda5247da9a91648772165eb24b5df5bf7e553d
2017-08-10 21:43:47 +00:00
Andrew Scull
a3f425950c Merge "Add HSM AID." am: 4723d7c66d
am: ef1dd0d279

Change-Id: I3b00e1fd0761e9d9daa439cf1ca5eedc0eab84fb
2017-08-10 21:39:47 +00:00
Andrew Scull
ef1dd0d279 Merge "Add HSM AID."
am: 4723d7c66d

Change-Id: If7075378ac5a13bbe79a02843d13d34c5f128d2a
2017-08-10 21:35:47 +00:00
Andrew Scull
f73c5e1f84 Add HSM AID.
This is used by resources related to a hardware security module (HSM).

Bug: 64569509
Change-Id: I30d47e1b275e3c4ae0a00f7ceb286a1096d84273
2017-08-10 20:25:11 +01:00
Robert Quattlebaum
228123a5c8 Merge "Add AID for LoWPAN subsystem" am: f602dd4ced am: 4ff32084d5
am: 91f952dda0

Change-Id: I49a6c9c9db980910a0d2d9289ca1a123f21f3eed
2017-08-08 00:00:55 +00:00
Robert Quattlebaum
91f952dda0 Merge "Add AID for LoWPAN subsystem" am: f602dd4ced
am: 4ff32084d5

Change-Id: Ib4ff4c6eee71e1bf189e5cb945405cd679d77112
2017-08-07 23:56:49 +00:00
Robert Quattlebaum
4ff32084d5 Merge "Add AID for LoWPAN subsystem"
am: f602dd4ced

Change-Id: Idd091e64fd9cab58f38da67e0b32e0aa9c98fb7d
2017-08-07 23:55:19 +00:00
Robert Quattlebaum
01f7576a3e Add AID for LoWPAN subsystem
Bug: b/64399805
Change-Id: Ida6aa60d8beee9151a723826d99c1e9044dc05be
2017-08-04 16:19:34 -07:00
Earl Ou
9435b3ed44 Merge "libcutils: write trace event into socket in container" am: 59b33cb01c am: 08d9cc3744
am: 6cc4df26d6

Change-Id: Ib4a23ef6f3644afe76e6615bdc1be0e4fd7f909c
2017-08-04 01:16:12 +00:00
Earl Ou
6cc4df26d6 Merge "libcutils: write trace event into socket in container" am: 59b33cb01c
am: 08d9cc3744

Change-Id: Ie6f05ca73b0391f6b739e43cf0920d5c52c0d882
2017-08-04 01:10:12 +00:00
Earl Ou
08d9cc3744 Merge "libcutils: write trace event into socket in container"
am: 59b33cb01c

Change-Id: Ie59769f5820a8bb5991ba3dca53df83c5e90f795
2017-08-04 01:04:15 +00:00
Treehugger Robot
59b33cb01c Merge "libcutils: write trace event into socket in container" 2017-08-04 00:50:59 +00:00
Yifan Hong
8a05dd0472 Merge changes from topic 'libcutils_private_headers' am: 472808a570 am: 6c2d927c34
am: 2615527f08

Change-Id: I433589f4691d74f8fcd2a30ad34ab817e9b6a36d
2017-08-03 20:47:53 +00:00
Yifan Hong
2615527f08 Merge changes from topic 'libcutils_private_headers' am: 472808a570
am: 6c2d927c34

Change-Id: I0718ab31e074b716f9be50a25330ffa8bdaae47d
2017-08-03 20:41:40 +00:00
Yifan Hong
6c2d927c34 Merge changes from topic 'libcutils_private_headers'
am: 472808a570

Change-Id: Ia4963b1b2c50bdcc3d9ccc6a954a465cbf9b5de0
2017-08-03 20:34:31 +00:00
Yifan Hong
472808a570 Merge changes from topic 'libcutils_private_headers'
* changes:
  Remove private headers from libcutils.vendor
  Move android_filesystem_config.h => fs_config.h
2017-08-03 18:24:04 +00:00
Earl Ou
e4030384c4 libcutils: write trace event into socket in container
When Android is running in a container, ftrace trace_marker may be
disabled, e.g. Chrome OS verified mode. To enable trace, a socket is
created for everyone to send trace event.

Modify libcutils so apps using it can write trace to the socket.

To achieve this goal without touching code for normal device,
trace-container.c is created for code specific to container. Shared
code between trace-dev.c and trace-container.c is moved to local
trace-dev.h.

Note that to avoid sharing FDs across different processes, Zygote closes
FD and reopen it to /dev/null if it is a socket. Therefore, we need to
manually close FD and reopen it again after forking. This is done in
the atrace_set_tracing_enabled as Zygote also use it to clear flags
during forking.

Related change:
- http://crrev.com/2400163003 (Chromium)
- http://ag/2028075 (Android system/core)
- http://ag/1738271 (Android device/google/cheets2)

Bug: 29776474, 62410809
Test: run chrome://tracing and see data from the host side.
Change-Id: I3fe969e284b972c28e4f32f23cd948aaea61a043
2017-08-03 15:16:44 +08:00
George Burgess IV
c3bc295f11 Merge "cutils: update property_get to use diagnose_if." am: 5c655991f5 am: f5a677a7d3
am: 2bf647ae24

Change-Id: Ib4561d402548195772757b83dc0638c28682dd5a
2017-08-03 02:33:22 +00:00
George Burgess IV
2bf647ae24 Merge "cutils: update property_get to use diagnose_if." am: 5c655991f5
am: f5a677a7d3

Change-Id: I39671d3f090f605d2f9ba3636c342ab5ee46c6bc
2017-08-03 02:28:23 +00:00
George Burgess IV
f5a677a7d3 Merge "cutils: update property_get to use diagnose_if."
am: 5c655991f5

Change-Id: I7dff3fb2ff288800d72d9c632617639fa7e6bf9e
2017-08-03 02:23:30 +00:00
Treehugger Robot
5c655991f5 Merge "cutils: update property_get to use diagnose_if." 2017-08-03 02:15:54 +00:00
Yifan Hong
b6807125df Remove private headers from libcutils.vendor
Bug: 63135587
Test: m -j
Test: BOARD_VNDK_VERSION=current m -j
Test: mma -j
Test: BOARD_VNDK_VERSION=current mma -j

Change-Id: I9eecf23c4c311bd8336a5bfaaeb2afb3b51c6513
Merged-In: I9eecf23c4c311bd8336a5bfaaeb2afb3b51c6513
2017-08-02 16:40:36 -07:00
Yifan Hong
09c89672b6 Move android_filesystem_config.h => fs_config.h
The non AID_ things in android_filesystem_config.h are moved
to fs_config.h. For libcutils.vendor and libcutils_headers.vendor,
fs_config.h is not exported.

An empty system/core/include/private/fs_config.h is placed to
appease the dependency from certain modules (logd, etc.)
that includes system/core/include/private/android_filesystem_config.h
directly.

Test: m -j
Test: BOARD_VNDK_VERSION=current m -j
Bug: 63135587
Change-Id: I95dfb874a426941022b100c0ca26a0576b0f4aa3
Merged-In: I95dfb874a426941022b100c0ca26a0576b0f4aa3
2017-08-02 16:31:19 -07:00
Elliott Hughes
78bc132d32 Merge "Make sure freeaddrinfo is always called on failure." am: f914029057 am: 9e1173aa40
am: 84cd98ceb0

Change-Id: I3d36bf694b20cf423cf1b3b5f647f7e907f20703
2017-08-02 23:28:54 +00:00
Elliott Hughes
84cd98ceb0 Merge "Make sure freeaddrinfo is always called on failure." am: f914029057
am: 9e1173aa40

Change-Id: Ib7936a9034467c38a58b5066472cdd5187a0e1b2
2017-08-02 23:22:36 +00:00
Elliott Hughes
9e1173aa40 Merge "Make sure freeaddrinfo is always called on failure."
am: f914029057

Change-Id: Iff3b186c35bca1f1c7292f5e5567d3ce11037239
2017-08-02 23:10:59 +00:00
George Burgess IV
9bf11c1d05 cutils: update property_get to use diagnose_if.
This lets us redeclare property_get with diagnose_if tagged on it,
so we no longer need to deal with overloads.

Bug: 12231437
Test: m checkbuild on bullhead aosp-master.
Change-Id: Ic55dcfeaa314f83d3713aabac7852cb766330fc8
2017-08-02 15:59:19 -07:00
Elliott Hughes
3ff453aaa0 Make sure freeaddrinfo is always called on failure.
Bug: https://android-review.googlesource.com/#/c/platform/system/core/+/268797/2/libcutils/socket_network_client_unix.c
Test: builds
Signed-off-by: Ivan Maidanski <i.maidanski@samsung.com>
Change-Id: I2d93c8359c3398769d408284f77d56e09713a7f3
2017-08-02 20:32:27 +00:00
Chih-Hung Hsieh
c3357de3fd Merge "Fix misc-macro-parentheses warnings in system/core." am: e4bd153e55 am: dfaa20c069
am: 3d0ff4ee98

Change-Id: Id161056885d346583e66ca49bf10934bc01e619f
2017-08-01 23:34:26 +00:00
Chih-Hung Hsieh
3d0ff4ee98 Merge "Fix misc-macro-parentheses warnings in system/core." am: e4bd153e55
am: dfaa20c069

Change-Id: I2a2376e19bdd415f784f708e2b8c910734e866a9
2017-08-01 23:29:59 +00:00
Chih-Hung Hsieh
dfaa20c069 Merge "Fix misc-macro-parentheses warnings in system/core."
am: e4bd153e55

Change-Id: I6b38149a0fa15874eff68cbf7ee62e4acd41c595
2017-08-01 23:26:06 +00:00
Chih-Hung Hsieh
85244e8bc2 Fix misc-macro-parentheses warnings in system/core.
Add NOLINT comment to work around clang-tidy
error in checking macro arguments used in
type expressions.

Bug: 28705665
Test: make with WITH_TIDY=1 WITH_TIDY_CHECKS=-*,misc-macro-* \
      WITH_TIDY_FLAGS=-header-filter=system/core/.*

Change-Id: I7619978c1804e151a11a8b0477e80076bcf21cab
2017-08-01 22:12:57 +00:00
Lennart Wieboldt
e1332dd01b Merge "Remove LOCAL_CLANG and clang: true" am: 80ec81cf4b am: f7b315c985
am: 8a8b97b271

Change-Id: I7e691abe2e2ccec5d9477c528d603c081c0a5661
2017-07-25 22:35:56 +00:00
Lennart Wieboldt
8a8b97b271 Merge "Remove LOCAL_CLANG and clang: true" am: 80ec81cf4b
am: f7b315c985

Change-Id: Id5ebeb3271a36f21bf28c186f7ec227d31bb10ac
2017-07-25 22:33:27 +00:00
Lennart Wieboldt
f7b315c985 Merge "Remove LOCAL_CLANG and clang: true"
am: 80ec81cf4b

Change-Id: Ia7f79d8e25ee9870fe44d198568d0e5dabdff811
2017-07-25 22:28:56 +00:00
Lennart Wieboldt
cd15fc7ba8 Remove LOCAL_CLANG and clang: true
clang is the default compiler since Android nougat

Test: mma & verified it´s still build with clang
Change-Id: I34adaeef2f6558a09f26027271222bad94780507
Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
2017-07-25 14:29:50 +02:00
Elliott Hughes
f4b01412f1 Merge "Remove more documentation for obsolete board configuration." am: 73a6512bab am: 09181f3dd9
am: 94d5235c25

Change-Id: I128a89de4783b152f4129d0c5f16e766ed349ea2
2017-06-30 00:07:45 +00:00
Elliott Hughes
94d5235c25 Merge "Remove more documentation for obsolete board configuration." am: 73a6512bab
am: 09181f3dd9

Change-Id: I95e37353d84e69df12a2b5ef36b02b771cbbf0eb
2017-06-30 00:03:45 +00:00
Elliott Hughes
09181f3dd9 Merge "Remove more documentation for obsolete board configuration."
am: 73a6512bab

Change-Id: I964c133a654efbc3d40bbebc7247863455e8cb54
2017-06-29 23:59:43 +00:00
Elliott Hughes
73a6512bab Merge "Remove more documentation for obsolete board configuration." 2017-06-29 23:50:37 +00:00
Elliott Hughes
5dc7736f60 Remove more documentation for obsolete board configuration.
Bug: N/A
Test: builds
Change-Id: I0a4ea974a81aadba1a554072ceff9f243a70be0d
2017-06-29 08:52:49 -07:00
Jiyong Park
dfed7fb8ca Merge "Allow SLOG* to vendors" am: 6afbd476ab am: eacf704a6c
am: 708f8295e0

Change-Id: I8895882d557e162388fcc672375f721849b83fc2
2017-06-29 04:07:28 +00:00
Jiyong Park
708f8295e0 Merge "Allow SLOG* to vendors" am: 6afbd476ab
am: eacf704a6c

Change-Id: I234763f63446115ce8726c1c0a0c931b25bcee0b
2017-06-29 04:03:29 +00:00
Jiyong Park
eacf704a6c Merge "Allow SLOG* to vendors"
am: 6afbd476ab

Change-Id: I56d66068757cd962c237a8292aa481d96b417f17
2017-06-29 03:58:59 +00:00
Treehugger Robot
6afbd476ab Merge "Allow SLOG* to vendors" 2017-06-29 03:53:38 +00:00
Jiyong Park
9ffeab85bf Allow SLOG* to vendors
Not only vendor libs, but also Android libs that are marked as
vendor_available are using SLOG*. Since both pure vendor libs and
Android libs available to vendors are using the same liblog headers for
VNDK, SLOG* needs to be visible via the headers.

Bug: 63088165
Test: BOARD_VNDK_VERSION=current m -j ATFWD-daemon
(or any other vendor modules using SLOG*)

Change-Id: Idfb74887a42d2418d3896bfdf5be3b4fc8e4c27f
2017-06-29 10:25:25 +09:00
Elliott Hughes
f067ab479f Merge "Remove documentation for obsolete board configuration." am: 3f4cea940d am: a96d1aebdb
am: 164f9c9e16

Change-Id: Ia475c070327f94eeb439f31d06375e8a5a650722
2017-06-28 16:48:28 +00:00
Elliott Hughes
164f9c9e16 Merge "Remove documentation for obsolete board configuration." am: 3f4cea940d
am: a96d1aebdb

Change-Id: Icaf550946be2fa7a4bf35c5b183e2562b7f2a92b
2017-06-28 16:44:57 +00:00
Elliott Hughes
a96d1aebdb Merge "Remove documentation for obsolete board configuration."
am: 3f4cea940d

Change-Id: I61c8310bbca3690e2b7f9764429c118db780c551
2017-06-28 16:40:41 +00:00
Elliott Hughes
76a934a459 Remove documentation for obsolete board configuration.
Bug: N/A
Test: builds
Change-Id: I5afbf2da35a7defb12b98bb5387ab7d3eee6f15a
2017-06-28 07:50:00 -07:00
Hung-ying Tyan
42388236a4 Merge "Load default prop from /system/etc/prop.default" into oc-dr1-dev
am: d334d69b70

Change-Id: I358c9b60bf20d7852d81006bb37a9efab0dd19ad
2017-06-28 06:31:08 +00:00
TreeHugger Robot
eb274d47e7 Merge "Load default prop from /system/etc/prop.default" into oc-dev-plus-aosp 2017-06-28 06:29:32 +00:00
Ben Fennema
52c61939c3 Merge "libcutils: fs_config: fix "system/<partition>/" aliasing" am: 449bfd7a93 am: cd3584e90b
am: 609b4cf6a5

Change-Id: Ice84d7764a4394b3f101673b5b310860adf59fd6
2017-06-26 22:54:10 +00:00
Ben Fennema
cd3584e90b Merge "libcutils: fs_config: fix "system/<partition>/" aliasing"
am: 449bfd7a93

Change-Id: I9f3d0f0e4dc147d9d2a5a1e41486805ada29d62a
2017-06-26 22:49:41 +00:00
Ben Fennema
acd7b7b0c0 libcutils: fs_config: fix "system/<partition>/" aliasing
Pull prefix checking into fs_config_cmp and make prefix_cmp be a
glorified partial ? strncmp() : strcmp()

Results before:
[ RUN      ] fs_config.system_alias

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: vendor/lib/hw didn't match system/vendor/lib

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/vendor/bin/wifi didn't match vendor/bin/wifi

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/odm/bin/wifi didn't match odm/bin/wifi

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/oem/bin/wifi didn't match oem/bin/wifi
system/core/libcutils/tests/fs_config.cpp:247: Failure
Value of: check_fs_config_cmp(fs_config_cmp_tests)
  Actual: true
Expected: false
[  FAILED  ] fs_config.system_alias (6 ms)

Results after:
[ RUN      ] fs_config.system_alias
[       OK ] fs_config.system_alias (0 ms)

Bug: 62204623
Test: gTest libcutils-unit-test --gtest_filter=fs_config.*
Change-Id: I8282827002816e86ea3014fed29eabf43b837815
Signed-off-by: Ben Fennema <fennema@google.com>
2017-06-26 14:13:52 -07:00
Hung-ying Tyan
aef2b092f5 Load default prop from /system/etc/prop.default
/default.prop is moved to /system/etc/prop.default for full Treblized
devices. Modifies property_service to load it from there first.
In recovery mode, the file is renamed as /prop.default. This path is
tried if /system/etc/prop.default is not available.

Bug: 37815285
Test: Tested with ag/2419001. Booted pixel phones, checked the location
      of prop.default, verified the symlink at /default.prop, checked a
      few properties via adb shell and manually tested a few apps.
      Booted to recovery and ran 'adb sideload' successfully.
Change-Id: I485231f21fc86b0aec58edf867e229a31e77d85e
Merged-In: I485231f21fc86b0aec58edf867e229a31e77d85e
(cherry-picked from 527d80d945)
2017-06-26 01:33:59 +00:00
Alex Naidis
fb5f04285b Merge "libcutils: Clarify schedboost_enabled()" am: 643b4776b5 am: 7ce1bdec47
am: 234fae2823

Change-Id: I9c65ccaf5f52db783b0611ca9c183cc64e8a9ad5
2017-06-20 18:36:40 +00:00
Alex Naidis
234fae2823 Merge "libcutils: Clarify schedboost_enabled()" am: 643b4776b5
am: 7ce1bdec47

Change-Id: Ia1b594ccd71a20d787cb70b2b8750c30158b7ffe
2017-06-20 18:22:26 +00:00
Alex Naidis
2d998ea99b libcutils: Clarify schedboost_enabled()
Commit 795267d4c7 ("Removed cpusets/schedboost build time dependency.")
turned the cpusets and schedtune options into runtime
decisions.

However the kernel option which is mentioned in the
code comment (CONFIG_SCHEDTUNE) is very misleading
as it doesn't exist (CONFIG_SCHED_TUNE does exist)
and it doesn't describe the real functionality of
the method. schedboost_enabled() will still return
false if CONFIG_SCHED_TUNE is set in the kernel but
CONFIG_CGROUP_SCHEDTUNE is not.

So to clarify this, we need to change the comment
to reflect that CONFIG_CGROUP_SCHEDTUNE, which depends
on CONFIG_SCHED_TUNE, is required.

Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-06-16 21:30:49 +00:00
Hung-ying Tyan
527d80d945 Load default prop from /system/etc/prop.default
/default.prop is moved to /system/etc/prop.default for full Treblized
devices. Modifies property_service to load it from there first.
In recovery mode, the file is renamed as /prop.default. This path is
tried if /system/etc/prop.default is not available.

Bug: 37815285
Test: Tested with ag/2419001. Booted pixel phones, checked the location
      of prop.default, verified the symlink at /default.prop, checked a
      few properties via adb shell and manually tested a few apps.
      Booted to recovery and ran 'adb sideload' successfully.
Change-Id: I485231f21fc86b0aec58edf867e229a31e77d85e
2017-06-16 22:46:15 +08:00
Elliott Hughes
2daf8683f3 Merge "Fix prctl argument type" am: 6cc5927e0d am: 316b7334b8
am: 184fa60c23

Change-Id: Ibc96f273e17928f75148ab79c8a0aa1db166ba53
2017-06-12 20:00:05 +00:00
Elliott Hughes
184fa60c23 Merge "Fix prctl argument type" am: 6cc5927e0d
am: 316b7334b8

Change-Id: Iaaf987d8b996a44a0b11eae3a1f1386adf721f3c
2017-06-12 19:56:56 +00:00
Stephen Crane
f5b8e34660 Fix prctl argument type
Although prctl is declared as a varargs function, in actuality it takes
unsigned long arguments (after the first int argument). This patch
ensures that the slack value passed to prctl is correctly sized.

Without this change, the 32-bit ARM compiler places the 64-bit slack
value in registers r2 and r3, but prctl expects the first argument to be
in r1. For kernel versions < 4.6, set_sched_policy has not been
correctly setting the timer slack value in 32-bit ARM code.

Test: Run on bullhead device. Verified assembly of libcutils.so

Change-Id: Ie0e22cbf74a74ff168b257b2e58d0c252449d6c9
2017-06-07 17:25:00 -07:00
Elliott Hughes
99f28f61c2 Merge "Revert "Load {default,build}.prop from /{system,vendor,odm}/etc/"" am: f9259b59e8 am: b2f12e42ca am: 22cdddecba
am: 3e9223f460

Change-Id: Icedc316c4b33a94cc19683213dbdd76e787362bb
2017-05-25 18:21:13 +00:00
Elliott Hughes
3e9223f460 Merge "Revert "Load {default,build}.prop from /{system,vendor,odm}/etc/"" am: f9259b59e8 am: b2f12e42ca
am: 22cdddecba

Change-Id: I6e41d84c76a0d1f31e54d5422638817905f202f4
2017-05-25 18:18:40 +00:00
Hung-ying Tyan
3346338919 Revert "Load {default,build}.prop from /{system,vendor,odm}/etc/"
This reverts commit 723f1a2b31.

Bug: 62075509
2017-05-25 19:18:17 +08:00
Hung-ying Tyan
b1211e9368 Merge "Load {default,build}.prop from /{system,vendor,odm}/etc/" am: a9aa77d259 am: 26c4bcfadd am: 0cd0d52147
am: a22e004f57

Change-Id: Ife17941907dd35507b95c56fe587f83003341684
2017-05-25 02:49:11 +00:00
Hung-ying Tyan
a22e004f57 Merge "Load {default,build}.prop from /{system,vendor,odm}/etc/" am: a9aa77d259 am: 26c4bcfadd
am: 0cd0d52147

Change-Id: Ide638286886cef323e8bb049f5baf4bbe659c47a
2017-05-25 02:46:10 +00:00
Treehugger Robot
a9aa77d259 Merge "Load {default,build}.prop from /{system,vendor,odm}/etc/" 2017-05-25 02:32:37 +00:00
Hung-ying Tyan
723f1a2b31 Load {default,build}.prop from /{system,vendor,odm}/etc/
/default.prop may be moved to /system/etc/ and renamed as prop.default.
/{system,vendor,odm}/build.prop may be moved to /{system,vendor,odm}/etc/
and renamed as prop.build.
This patch makes property_service load prop.* from the new locations
first. Also replaces NULL with nullptr for C++ cleanup.

Bug: 37815285
Test: Booted pixel phones, checked the locations of prop.*, verified
      symlinks, checked a few properties (via adb shell getprop)
      and manually tested a few apps (Camera, Maps etc).
      ODM is not tested as it does not exist on the tested device.
Change-Id: Id8eeb3c1a5728dd04005dfad4733b8e6336f9093
2017-05-25 08:41:08 +08:00
Scott Randolph
a37cce06ba Merge "Add AID_EVS for use by the Automotive EVS system" am: 58620a8d4a am: 39e0f550b9 am: 8ba873809e
am: cd6086b298

Change-Id: I3b1934fe4dc156ce5179c3c0c7ee784671215a20
2017-05-24 00:10:35 +00:00
Scott Randolph
cd6086b298 Merge "Add AID_EVS for use by the Automotive EVS system" am: 58620a8d4a am: 39e0f550b9
am: 8ba873809e

Change-Id: I320848d0ff8ba32d3571110604634656c646a647
2017-05-24 00:05:48 +00:00
Scott Randolph
d5d3276482 Add AID_EVS for use by the Automotive EVS system
The EVS HAL and related software stack will use this id when running
daemons that monitor car state, capture and display video, and interact
with users.
Test:  visual inspection

Change-Id: I53404c624933b7f55f1292c041c6c712522ab13b
2017-05-23 12:44:24 -07:00
Mark Salyzyn
19b47ced71 Merge "libcutils: fs_config: remove aliases" into oc-dev-plus-aosp
am: 7ee349f41f

Change-Id: Id656b715dc5975ded5ee5d7e18735fb01f6ce635
2017-05-19 22:16:32 +00:00
Mark Salyzyn
940a9a08e5 libcutils: fs_config: remove aliases
Covered by the code automatically now. Dropping duplicate wifi.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: I86e29192e321e1e449d2c30161af69c34b8baa16
2017-05-19 13:30:08 -07:00
Mark Salyzyn
7ed7cf3f9f libcutils: fs_config: remove aliases
am: 88c04aae1e

Change-Id: I54438298bc2ffa27e2c831a666afac47ac84d7a3
2017-05-19 18:34:01 +00:00
Mark Salyzyn
88c04aae1e libcutils: fs_config: remove aliases
Covered by the code automatically now.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Iad6ba65e023845aaea7a181b277a7383c44bd937
2017-05-19 18:16:23 +00:00
Mark Salyzyn
2c40768040 Merge "Revert "Partial revert of "libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate" Revert just the wifi hardware part."" into oc-dev am: 6a93fd7e7c
am: de439332ba

Change-Id: I01452558cfe986eed3dcddf6050e8cf6afd95de5
2017-05-19 18:14:29 +00:00
Mark Salyzyn
de439332ba Merge "Revert "Partial revert of "libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate" Revert just the wifi hardware part."" into oc-dev
am: 6a93fd7e7c

Change-Id: Ifc81c5a2b17176711138c34b1a82ac945e7186a6
2017-05-19 18:12:30 +00:00
Mark Salyzyn
9f462a0af2 Merge changes Iad6ba65e,Ia6a7e8c9,Ida9405cb am: 037d2b71dc am: 219e7200be am: 7c466b936a
am: 645d62facb

Change-Id: I8306d0694089e333f65bdae8db0731b825cbf8a9
2017-05-19 14:41:05 +00:00
Mark Salyzyn
645d62facb Merge changes Iad6ba65e,Ia6a7e8c9,Ida9405cb am: 037d2b71dc am: 219e7200be
am: 7c466b936a

Change-Id: I9da0e906b391b9e4846c534eda77fb33d96e191a
2017-05-19 14:35:34 +00:00
Mark Salyzyn
cb0b5e6753 Revert "Partial revert of "libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate" Revert just the wifi hardware part."
This reverts commit 6db432daf7.

Test: Build
Bug: 37921982
Bug: 37483427
Bug: 37703469
Change-Id: Ie19221f4383a45e317bc0b190e9a70459706fc79
2017-05-19 14:31:41 +00:00
Mark Salyzyn
2cf243528f libcutils: fs_config: remove aliases
Covered by the code automatically now.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Iad6ba65e023845aaea7a181b277a7383c44bd937
2017-05-18 15:56:54 -07:00
Mark Salyzyn
fa39110a8f libcutils: fs_config test report aliases
Instead of requiring aliases, let's report when we see
system/<partition>/ all by itself, or in the company of the alias
<partition>/.  Report if we see duplicate entries.  Add checking for
overrides as well.  Report any simple corruptions in internal table
or in the override files.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Ia6a7e8c9bc9f553d0c1c313937b511b2073318a9
2017-05-18 15:55:48 -07:00
Mark Salyzyn
2d37797b68 libcutils: fs_config: alias "system/<partition>/" to "<partition>/"
For the known partitions entrenched in the build system: vendor, oem
and odm only. We will alias entries that reference system/<partition>
and <partition>/ so that if either are specified, the rule will apply
to both possible paths.

Test: gTest libcutils-tests
Bug: 37703469
Change-Id: Ida9405cbed323489a3d0599c1645e9be2c7b9d08
2017-05-18 15:54:31 -07:00
Elliott Hughes
f6d8985b3a Merge "libcutils should #include <sys/sysmacros.h>" am: c3b931aad3 am: 2668f35d31 am: ce49fc9d0a
am: 5d4d139c1e

Change-Id: Ia3958f7e7a3406e83f142dffdb6f2f0d92eb199f
2017-05-17 21:05:13 +00:00
Elliott Hughes
5d4d139c1e Merge "libcutils should #include <sys/sysmacros.h>" am: c3b931aad3 am: 2668f35d31
am: ce49fc9d0a

Change-Id: Iad330e5266e27f412687209f3bd6375f777dc905
2017-05-17 20:54:05 +00:00
Elliott Hughes
d77b537732 libcutils should #include <sys/sysmacros.h>
Bug: https://github.com/android-ndk/ndk/issues/398
Test: builds
Change-Id: I8ca21a74e2856fde09c284aee1343c627d8381e6
2017-05-17 11:36:51 -07:00
Joel Fernandes
88ef9f0629 libcutils: Add support for RT schedtune group
Add an SP_RT_APP group which will be used to provide minimum
capacity guarantees to RT tasks sensitive to frequency drops
such as synthesizer workloads.

Bug: 33085313
Change-Id: I07cca79e52661d1325a1db9ef3b61eb0f8d20989
Signed-off-by: Joel Fernandes <joelaf@google.com>
2017-05-13 19:41:05 +00:00
Siarhei Vishniakou
f608eb283a Merge "Adding 'uhid' permission for access to /dev/uhid." am: cecbc9993d am: 04daed4793 am: d819380f50
am: b995b58631

Change-Id: I0c4f2e22d6195f219a2e1b0ef346ce89b642dc6c
2017-05-12 03:50:14 +00:00
Siarhei Vishniakou
b995b58631 Merge "Adding 'uhid' permission for access to /dev/uhid." am: cecbc9993d am: 04daed4793
am: d819380f50

Change-Id: If06b07c88276c32cdf5b53e6afcf0563e6538544
2017-05-12 01:00:46 +00:00
Siarhei Vishniakou
cecbc9993d Merge "Adding 'uhid' permission for access to /dev/uhid." 2017-05-11 19:02:32 +00:00
Siarhei Vishniakou
0729dd1edb Adding 'uhid' permission for access to /dev/uhid.
This CL is in support of another CL c/2048848, topic
'Refactor hid command in /frameworks/base/cmds' in
internal master. Adding the permissions for
shell here to access uhid_node as part of the
new 'uhid' group.

Bug: 34052337
Test: Tested on angler, bluetooth mouse works OK.

Change-Id: If9e100aa1262d689fb8adc5c0ce93f157c96399e
2017-05-11 01:28:53 +00:00
Mathias Agopian
324a309cfe fix circular dependency libnativewindow <-> libui
Bug: 37647680, 37648355
Test: compile, manual
Change-Id: Ie0d20e6fe7d64641a2b84f536ec17f3e7971f559
2017-05-09 15:15:50 -07:00
Dan Willemsen
8e5c7bf623 Merge "Assume bionic has up-to-date linux/capability.h" am: 1445c4b932 am: c09d16234f
am: c27f7911b1

Change-Id: Ib66ee19c79c85fccd9dcf419891f99b751957c23
2017-05-07 21:20:35 +00:00
Dan Willemsen
0de03b53fc Assume bionic has up-to-date linux/capability.h
The fallback android_filesystem_capability.h doesn't play nicely with
other kernel headers, since it #undef's __user. If we're building with
bionic (either for device or host), we use the same kernel headers, so
just use those.

Bug: 38056396
Test: build with Host_bionic:true
Change-Id: Idc61b6d96d86891164abe71604924638d67aefe2
2017-05-07 12:06:55 -07:00
Greg Hackmann
d0307c25a7 Merge changes If7b13672,I96135a8c am: 484acce026 am: 4f152a5f50
am: 6aa8a19427

Change-Id: If4085e37140b25504f20f3363c63a7c95fb342ee
2017-05-05 21:51:45 +00:00
Greg Hackmann
4a9531d326 AshmemTest: expand ProtTest cases
ashmem buffers start with PROT_EXEC | PROT_READ | PROT_WRITE and can
have bits individually removed (but not added) through the
ASHMEM_SET_PROT_MASK ioctl.  Test that removing prot bits more than once
works, and that the kernel blocks adding prot bits.

Also test that the complementary ASHMEM_GET_PROT_MASK ioctl returns the
expected prot mask.

Test:  /data/nativetest64/libcutils_test/libcutils_test64 \
       --gtest_filter=AshmemTest.* (on hikey)
Test:  /data/nativetest/libcutils_test/libcutils_test32 \
       --gtest_filter=AshmemTest.* (on hikey)

Change-Id: If7b13672547ec4cf6dfd1886197f40f12b2f1c85
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2017-05-05 20:04:12 +00:00
Greg Hackmann
be11d570ec AshmemTest: test lseek() and read() on ashmem fds
ashmem has in-kernel handlers for lseek() and read(), but they aren't
currently being tested.

Add tests for various seeks on a buffer containing holes.  If we land
inside data, then check that we read() the expected data at that offset.

Test:  /data/nativetest64/libcutils_test/libcutils_test64 \
       --gtest_filter=AshmemTest.* (on hikey)
Test:  /data/nativetest/libcutils_test/libcutils_test32 \
       --gtest_filter=AshmemTest.* (on hikey)

Bug: 37254818
Change-Id: I96135a8cea2ce99932e3bc97b5254c95ef6b264a
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2017-05-05 19:58:09 +00:00
Mark Salyzyn
e9e599751b Merge "libcutils: fs_config internal table alias test" am: 8fad110bfa am: bfead93a3a
am: 4bc080ab1a

Change-Id: Iddf608a4082d9442f48355291abd15e2aef6a18d
2017-05-04 21:25:25 +00:00