Commit graph

159 commits

Author SHA1 Message Date
subrahmanyaman
8b83ce6186 Define AIDs for Weaver, Keymint and IdentityCredential applets.
Bug: b/222112165
Test: Run vts/cts tests
Change-Id: I2fc9144fe4a2d55bf091d8371ba2b78486b1b9c7
2022-03-02 02:35:24 +00:00
Treehugger Robot
1889a41c88 Merge "Add systrace tag for thermal" 2022-02-18 16:54:53 +00:00
Patrick Rohr
78b86ae297 Merge "Remove setCounterSet and deleteTagData support from libcutils" 2022-02-16 19:59:14 +00:00
TeYuan Wang
5ad0a9f864 Add systrace tag for thermal
Bug: 218939123
Test: build
Change-Id: Id899df349e83fa7bf4d962e88d683488632df702
2022-02-14 15:13:45 +08:00
Alexander Potapenko
585a214741 Added AID for the new dmesgd
Bug: 215095687
Test: m -j dmesgd
Change-Id: Iee3a1a644115c7808ca545ca8d22cd783a2be114
2022-02-07 13:54:21 +01:00
Patrick Rohr
ccc18d7f11 Remove setCounterSet and deleteTagData support from libcutils
This functionality is now handled in mainline and has been removed from
netd in Android T.

Test: builds & boots
Change-Id: Ic435eee0d89bda30d733efbc655692c697bbe9e8
2022-02-02 14:27:50 +01:00
Treehugger Robot
e71fdca896 Merge "Diced: Added AID for Android's dice daemon diced." 2021-12-16 01:47:23 +00:00
Treehugger Robot
f54ebc7650 Merge "Add instant trace methods" 2021-12-15 18:11:52 +00:00
Lucas Dupin
2c2c5d998e Add instant trace methods
Bug: 207049735
Test: atest TraceDevTest
Change-Id: If2826a9bb1fb99d75ff3c9c03c16c2f5f1ec5d1b
2021-12-15 02:44:36 +00:00
Kalesh Singh
ccf343fa5b Add group ID for reading tracefs
Add AID_READTRACEFS and mount tracefs with gid=AID_READTRACEFS

Bug: 209513178
Test: adb shell ls -l /sys/kernel/tracing/events
Change-Id: Ibbfdf8a4b771bd7520ecbaaf15a1153d6bf0e599
2021-12-06 16:25:04 -08:00
Janis Danisevskis
9c72fe356a Diced: Added AID for Android's dice daemon diced.
Bug: 198197213
Test: N/A
Change-Id: Idc55363272e3e5529d931a17dad8a37af665edcd
2021-11-09 16:12:21 -08:00
Elliott Hughes
6fa2e48db9 cutils: only support safe list iteration.
We've had two use-after-frees in the last month from this nonsense...

Bug: http://b/204925347
Test: treehugger
Change-Id: I5e1485253224e38ca51a7a077dbe65d19e39f817
2021-11-03 10:26:36 -07:00
zhanglongxia
1aac0c01a6 Add a aid/uid for Thread subsystem
Bug: b/202786090
Test: Compiles
Change-Id: I168cf2630c9591df161d0e5df71be0f93bf7ce9a
2021-10-19 09:22:06 +08:00
Bowgo Tsai
ebb79debcc Revert "Add systrace tag for system property"
Revert "Add systrace tag for system property"

Revert "Add systrace tag for system property"

Revert "Adding system property tracing"

Revert submission 1403568-sysprop_trace

Reason for revert: makes property get/set non-reentrant
Reverted Changes:
I6f85f3f52:Add systrace tag for system property
Id2b93acb2:Adding system property tracing
Id78992d23:Add systrace tag for system property
I1ba9fc7bd:Add systrace tag for system property

Ignore-AOSP-First: b/193050299#comment17

Bug: 193050299
Change-Id: I9305003531c6a86194d55dc72c613337d213b53d
Merged-In: I9305003531c6a86194d55dc72c613337d213b53d
Test: build and boot a device
(cherry picked from commit 18e0f65cbf)
2021-07-21 09:22:27 +08:00
Andrew Walbran
3aedc7edc8 Rename VirtManager to VirtualizationService.
Bug: 188042280
Test: atest VirtualizationTestCases
Change-Id: I0e549ef02c7327f57c3d04853b3eefed7403d8e8
2021-05-24 11:41:13 +00:00
Roshan Pius
e85201bbeb filesystem_config: Add a aid/uid for UWB subsystem
Bug: 186788640
Test: Compiles
Change-Id: Ib3d1b064e8e68e7b9e59b26f356ac7c4da2eaaf8
2021-04-29 14:57:07 -07:00
Chris Wailes
9fd4627645 Added ARTD user
Test: boot and check for artd process
Bug: 177273468
Change-Id: Ic5a3f626598d5347dfada8f67c07c55c7da29f5f
2021-04-05 15:46:14 -07:00
Jeff Vander Stoep
3502c2be94 Add UID for virtmanager
Bug: 183583115
Test: ps -AZ | grep virtmanager
u: r:virtmanager:s0             virtmanager   2453     1 10930880  4544 0                   0 S virtmanager
Change-Id: Iddf8e21cb1039a5f50aa0619a708b59bec004cfc
2021-03-25 22:17:52 +01:00
Adrian Ratiu
a742158667 threads.h: avoid defining gettid on glibc >= 2.32
Glibc >=2.32 exposes a gettid() which clashes with libcutils
thread.h, so add a check to not expose it if building against
newer glibc (ChromiumOS will still use glibc 2.27 besides 2.32).

Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1182060
Test: Builds without errors on both glibc 2.32 and 2.27.

Change-Id: Ib71fa1bc9fa185e3668002407dbed05a80c87740
2021-03-05 09:55:15 +00:00
Florian Mayer
cae942d7ac Do not check for debuggable / profilable for app tracing.
This is undocumented and surprising behaviour.

Bug: 179883548
Change-Id: I373b176d4ed9f6b0e970d055d7e4e2686c6d3991
2021-02-12 16:54:51 +00:00
Mitch Phillips
391157659b [MemInit] Remove process_disable_memory_mitigations
This function is no longer necessary, and uses a deprecated API
(mallopt(M_BIONIC_DISABLE_MEMORY_MITIGATIONS)). This function was
provided originally as part of libcutils because the original API was a
private android_mallopt.

The API is being reborn as a memory-init-specific mallopt. Given that
regular system components and apps will be able to call it directly,
it's not necessary to have a wrapper function in libcutils any more.

Bug: 135772972
Test: Build the device.
Change-Id: I4a3185b99702c8e445de6837b154c4a96c8295a1
2021-01-20 16:07:49 -08:00
Elliott Hughes
dcf81848cb Remove thread_store_set()/thread_store_get().
C++ thread_local is less code to write, and performs better. All known
users have been moved over already.

Test: treehugger
Change-Id: Idaa2a58bf23342dae08dd6b9003d8f532839b351
2020-12-07 10:54:53 -08:00
Elliott Hughes
0675702c62 Make libcutils' thread local stuff more clearly deprecated.
libcutils' thread local stuff is almost unused already, so let's try
harder to prevent new users. (In parallel I'll try to actually move the
four existing users off it, so we can actually remove this.)

Test: treehugger
Change-Id: Ib5445a43cff1f161ce1c7a45959d5b126f6f6980
2020-12-02 11:22:29 -08:00
Steven Moreland
d22659b8ea libcutils: API to disable memory mitigations
Convenience API to disable memory mitigations, where we can specify
logging and also have a single place to update once a related bug is
fixed.

Bug: 166675194
Test: use API to disable memory mitigations
Change-Id: I4a3529ea1911925c49e31cc3809c2743e401c196
2020-10-10 00:16:24 +00:00
Xin Li
0a112d52f8 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: Id18cb0e2d2f3e776a42b566c4a1af2e250890896
Change-Id: Iba7cab32ab3aa6f47952c840ff6dc8492e8d0704
2020-08-29 01:42:13 -07:00
Bowgo Tsai
f4bf7f3a94 Add systrace tag for system property
Introduce a new systrace tag, TRACE_TAG_SYSPROP, for use with
system property.

Bug: 147275573
Test: build
Change-Id: I6f85f3f52f6580bab4ff43fc1dc0e87c689b054e
Merged-In: I6f85f3f52f6580bab4ff43fc1dc0e87c689b054e
(cherry picked from commit 573fc58bad)
2020-08-19 12:48:07 +08:00
Jeff Sharkey
7b21637782 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Change-Id: Iafcccbdbdf3ff1078e87000e2ce560ff09b43f68
2020-07-31 16:36:06 -06:00
Elliott Hughes
10b59d4044 Merge "libcutils: reimplement system property functions with libbase." am: 95e79c63a4 am: 854b9898ae
Change-Id: I4f99d73f376e853a0b125439e105ae781af02e30
2020-05-26 18:00:45 +00:00
S Vasudev Prasad
100b08a848 libcutils: reimplement system property functions with libbase.
This makes the system property functions available on the host too, and
ensures a consistent view of system properties between libcutils and
libbase, if you have code running on the host that uses both.

Bug: http://b/151789258
Test: treehugger
Change-Id: Ie524a77d0c392d7b23e9d12becbb1bf53c81eac6
2020-05-21 16:20:16 -07:00
Treehugger Robot
39257c1baa Merge "Fix cutils/ashmem.h copyright header." am: f61377979e am: b40f653314
Change-Id: Id5e9f35b1f1256a426d8b57ff504c076443d1f14
2020-04-28 21:33:04 +00:00
Elliott Hughes
f35feb5389 Fix cutils/ashmem.h copyright header.
The *kernel* header is "GPL-2.0 OR Apache-2.0", but the userspace
libcutils is just Apache-2.0 like all our code.

Test: builds
Change-Id: I25eef8eed16550f4010285479b21b502a2d1fc07
2020-04-28 09:28:29 -07:00
Tom Cherry
ae5d38b071 Merge "Remove EXCLUDE_FS_CONFIG_STRUCTURES" am: 79f3d26b25 am: c336c565a9
Change-Id: If58e8f42237c506fd638dea4329b81479c62659f
2020-04-03 15:16:31 +00:00
Tom Cherry
6ad4d0a601 Remove EXCLUDE_FS_CONFIG_STRUCTURES
Long overdue clean up; there is no reason to include fs_config.h in
android_filesystem_config.h, and the fact that it causes problems if
it's done, necessitating EXCLUDE_FS_CONFIG_STRUCTURES to exist, is a
good reason to fix it.

Bug: 149785767
Test: build
Change-Id: I5ba2541cd1045c22486140649c90db39163081fd
2020-03-04 15:34:09 -08:00
Automerger Merge Worker
bfa910d35e Merge "Always use shared memory for atrace." am: 2ddc5a1932 am: 3d9c20fefd
Change-Id: I8f7cc5b355bee1bbc41ed8ddf5885d9b26382d62
2020-02-27 11:00:50 +00:00
Florian Mayer
fc0adaf89e Always use shared memory for atrace.
Remove ATRACE_SHMEM macro.

Test: atrace ss
      atrace wm
      sanity check output
Bug: 137366208
Change-Id: I1b42243678b9b9a41db18e2ff8cb3cf7bde874de
2020-02-26 15:55:22 +00:00
Automerger Merge Worker
52a4719616 Merge "Adds AID_CONTEXT_HUB" am: 19e4f2b5f3 am: becd114785
Change-Id: Id9a4eff811f6ff331ec0262824320b16f8fdbb38
2020-02-24 19:26:39 +00:00
Arthur Ishiguro
b5693bdae7 Adds AID_CONTEXT_HUB
This will be used to access the Context Hub.

Bug: 149981913
Test: Compile
Change-Id: Ic89cf5b1a8a01ea7077bf7dd89501ed3623f217d
2020-02-21 16:56:00 -08:00
Automerger Merge Worker
89d31aadb3 Merge "Add project ID constants." am: 529605bc9e am: df4f865d7a am: 3781fb4a9a
Change-Id: I61572b4fcfcd57af9fb29dfd37c67a2b956d820e
2020-02-19 22:20:44 +00:00
Martijn Coenen
529605bc9e Merge "Add project ID constants." 2020-02-19 05:23:20 +00:00
Martijn Coenen
1cc2f9d77f Add project ID constants.
These will be used for quota tracking on external storage devices
that don't have sdcardfs.

Bug: 146419093
Test: N/A
Change-Id: If00961cc3807bcc3e93675e5d27dd6444007fdba
2020-02-18 17:19:09 -08:00
Treehugger Robot
15c0b798bd Merge "bootstat: enhance last reboot reason property with file backing" am: 7550e6f882 am: ffd276388f am: c0210f1d0e
Change-Id: I6d953d6b9308dc46619e52f81cb5469b22df55d0
2020-02-17 10:12:25 +00:00
Mark Salyzyn
ee016ce0b3 bootstat: enhance last reboot reason property with file backing
Helps with support of recovery and rollback boot reason history, by
also using /metadata/bootstat/persist.sys.boot.reason to file the
reboot reason.

Test: manual
Bug: 129007837
Change-Id: Id1d21c404067414847bef14a0c43f70cafe1a3e2
2020-02-14 13:24:16 -08:00
Automerger Merge Worker
d17586e9d9 Merge "Add AID_EXT_DATA_RW / AID_EXT_OBB_RW GIDs." am: e6acbfe556 am: e9b7b464bd am: 2d5970ffc2
Change-Id: I8ffa385724b0b49b3f5b329187ba1a75edb5ba87
2020-02-03 10:42:41 +00:00
Martijn Coenen
4501ed5c2e Add AID_EXT_DATA_RW / AID_EXT_OBB_RW GIDs.
These will be used as a GID for the Android/data and Android/obb
directories respectively, on devices that don't have sdcardfs.

Bug: 146419093
Test: builds
Change-Id: I52a3235e872eb4b0402f918d5c47661f16626ba6
2020-01-31 15:12:31 +01:00
Automerger Merge Worker
3d81374fd5 Merge "Add external_storage gid" am: 8e4cf5b436 am: ed326eafc0 am: 92fe152517
Change-Id: If39cab9fa0cbab8d997492c2be9962ea519eaef7
2020-01-27 12:51:13 +00:00
Zim
bdeaf57da3 Add external_storage gid
This gid allows processes full access to public areas of external
storage. This includes the following:
1. EmulatedVolumes: All files and directories excluding the app
specific directories under Android/
2. PublicVolumes: Including 'unreliable' volumes (USB OTG) that are
not typically accesible to ordinary apps

Apps with the MANAGE_EXTERNAL_STORAGE permission will automatically
have this gid

Test: m
Bug: 144914977
Change-Id: I17da0b2367e356edc031d063e214574463afc985
2020-01-24 16:54:03 +00:00
Automerger Merge Worker
5c2d51d588 Merge "Add user for credstore." am: 4659cdaf5c am: 66e60c7b77 am: 8e0e2797e6
Change-Id: I86961943c8ffb05878313db09ae8166d9fe59358
2020-01-17 03:44:26 +00:00
David Zeuthen
e83f386653 Add user for credstore.
The credstore system daemon is running as an unprivileged user. This
CL adds this user and also creates a directory (/data/misc/credstore/)
where this daemon can store its data.

Bug: 111446262
Test: N/A
Change-Id: I8da2c32dd04fef797870b8a7bbc5e499bed71f9e
2020-01-16 07:32:04 -05:00
Automerger Merge Worker
e7fbe55a98 Merge "Use sequence number to check if to reload atrace tags." am: 445234c76c am: d371ad8665 am: 0549118e91
Change-Id: I364d217f7447b7b4f4cf7c042e9f26844e245d46
2020-01-14 10:10:44 +00:00
Florian Mayer
b06766cbbf Use sequence number to check if to reload atrace tags.
This is to deprecate the sysprop change notification in atrace.
After this change, processes will only update their enabled tags
at the first atrace event. Previously we reloaded the tags as a
result of the sysprop changed Binder notification, which woke up
every process in the system.

Test: adb shell su root atrace -t 10 ss
Test: #define ATRACE_SHMEM 0; adb shell su root atrace -t 10 ss

Bug: 137366208

Change-Id: Idffba5fd4ba23fba2f6b9f594365df68ac0c1626
2020-01-13 17:02:58 +00:00