Inseob Kim | ff43be2 | 2021-06-07 16:56:56 +0900 | [diff] [blame] | 1 | ###################################### |
| 2 | # Attribute declarations |
| 3 | # |
| 4 | |
| 5 | # All types used for devices. |
| 6 | # On change, update CHECK_FC_ASSERT_ATTRS |
| 7 | # in tools/checkfc.c |
| 8 | attribute dev_type; |
| 9 | |
| 10 | # All types used for processes. |
| 11 | attribute domain; |
| 12 | |
| 13 | # All types used for filesystems. |
| 14 | # On change, update CHECK_FC_ASSERT_ATTRS |
| 15 | # definition in tools/checkfc.c. |
| 16 | attribute fs_type; |
| 17 | |
| 18 | # All types used for context= mounts. |
| 19 | attribute contextmount_type; |
| 20 | |
| 21 | # All types used for files that can exist on a labeled fs. |
| 22 | # Do not use for pseudo file types. |
| 23 | # On change, update CHECK_FC_ASSERT_ATTRS |
| 24 | # definition in tools/checkfc.c. |
| 25 | attribute file_type; |
| 26 | |
| 27 | # All types used for domain entry points. |
| 28 | attribute exec_type; |
| 29 | |
| 30 | # All types used for /data files. |
| 31 | attribute data_file_type; |
| 32 | expandattribute data_file_type false; |
| 33 | # All types in /data, not in /data/vendor |
| 34 | attribute core_data_file_type; |
| 35 | expandattribute core_data_file_type false; |
| 36 | |
| 37 | # All types used for app private data files in seapp_contexts. |
| 38 | # Such types should not be applied to any other files. |
| 39 | attribute app_data_file_type; |
| 40 | expandattribute app_data_file_type false; |
| 41 | |
| 42 | # All types in /system |
| 43 | attribute system_file_type; |
| 44 | |
| 45 | # All types in /vendor |
| 46 | attribute vendor_file_type; |
| 47 | |
| 48 | # All types used for procfs files. |
| 49 | attribute proc_type; |
| 50 | expandattribute proc_type false; |
| 51 | |
| 52 | # Types in /proc/net, excluding qtaguid types. |
| 53 | # TODO(b/9496886) Lock down access to /proc/net. |
| 54 | # This attribute is used to audit access to proc_net. it is temporary and will |
| 55 | # be removed. |
| 56 | attribute proc_net_type; |
| 57 | expandattribute proc_net_type true; |
| 58 | |
| 59 | # All types used for sysfs files. |
| 60 | attribute sysfs_type; |
| 61 | |
| 62 | # All types use for debugfs files. |
| 63 | attribute debugfs_type; |
| 64 | |
| 65 | # All types used for tracefs files. |
| 66 | attribute tracefs_type; |
| 67 | |
| 68 | # Attribute used for all sdcards |
| 69 | attribute sdcard_type; |
| 70 | |
| 71 | # All types used for nodes/hosts. |
| 72 | attribute node_type; |
| 73 | |
| 74 | # All types used for network interfaces. |
| 75 | attribute netif_type; |
| 76 | |
| 77 | # All types used for network ports. |
| 78 | attribute port_type; |
| 79 | |
| 80 | # All types used for property service |
| 81 | # On change, update CHECK_PC_ASSERT_ATTRS |
| 82 | # definition in tools/checkfc.c. |
| 83 | attribute property_type; |
| 84 | |
| 85 | # All properties defined in core SELinux policy. Should not be |
| 86 | # used by device specific properties |
| 87 | attribute core_property_type; |
| 88 | |
| 89 | # All properties used to configure log filtering. |
| 90 | attribute log_property_type; |
| 91 | |
| 92 | # All properties that are not specific to device but are added from |
| 93 | # outside of AOSP. (e.g. OEM-specific properties) |
| 94 | # These properties are not accessible from device-specific domains |
| 95 | attribute extended_core_property_type; |
| 96 | |
| 97 | # Properties used for representing ownership. All properties should have one |
| 98 | # of: system_property_type, product_property_type, or vendor_property_type. |
| 99 | |
| 100 | # All properties defined by /system. |
| 101 | attribute system_property_type; |
| 102 | expandattribute system_property_type false; |
| 103 | |
| 104 | # All /system-defined properties used only in /system. |
| 105 | attribute system_internal_property_type; |
| 106 | expandattribute system_internal_property_type false; |
| 107 | |
| 108 | # All /system-defined properties which can't be written outside /system. |
| 109 | attribute system_restricted_property_type; |
| 110 | expandattribute system_restricted_property_type false; |
| 111 | |
| 112 | # All /system-defined properties with no restrictions. |
| 113 | attribute system_public_property_type; |
| 114 | expandattribute system_public_property_type false; |
| 115 | |
| 116 | # All keystore2_key labels. |
| 117 | attribute keystore2_key_type; |
| 118 | |
| 119 | # All properties defined by /product. |
| 120 | # Currently there are no enforcements between /system and /product, so for now |
| 121 | # /product attributes are just replaced to /system attributes. |
| 122 | define(`product_property_type', `system_property_type') |
| 123 | define(`product_internal_property_type', `system_internal_property_type') |
| 124 | define(`product_restricted_property_type', `system_restricted_property_type') |
| 125 | define(`product_public_property_type', `system_public_property_type') |
| 126 | |
| 127 | # All properties defined by /vendor. |
| 128 | attribute vendor_property_type; |
| 129 | expandattribute vendor_property_type false; |
| 130 | |
| 131 | # All /vendor-defined properties used only in /vendor. |
| 132 | attribute vendor_internal_property_type; |
| 133 | expandattribute vendor_internal_property_type false; |
| 134 | |
| 135 | # All /vendor-defined properties which can't be written outside /vendor. |
| 136 | attribute vendor_restricted_property_type; |
| 137 | expandattribute vendor_restricted_property_type false; |
| 138 | |
| 139 | # All /vendor-defined properties with no restrictions. |
| 140 | attribute vendor_public_property_type; |
| 141 | expandattribute vendor_public_property_type false; |
| 142 | |
| 143 | # All service_manager types created by system_server |
| 144 | attribute system_server_service; |
| 145 | |
| 146 | # services which should be available to all but isolated apps |
| 147 | attribute app_api_service; |
| 148 | |
| 149 | # services which should be available to all ephemeral apps |
| 150 | attribute ephemeral_app_api_service; |
| 151 | |
| 152 | # services which export only system_api |
| 153 | attribute system_api_service; |
| 154 | |
| 155 | # services which are explicitly disallowed for untrusted apps to access |
| 156 | attribute protected_service; |
| 157 | |
| 158 | # services which served by vendor and also using the copy of libbinder on |
| 159 | # system (for instance via libbinder_ndk). services using a different copy |
| 160 | # of libbinder currently need their own context manager (e.g. |
| 161 | # vndservicemanager) |
| 162 | attribute vendor_service; |
| 163 | |
| 164 | # All types used for services managed by servicemanager. |
| 165 | # On change, update CHECK_SC_ASSERT_ATTRS |
| 166 | # definition in tools/checkfc.c. |
| 167 | attribute service_manager_type; |
| 168 | |
| 169 | # All types used for services managed by hwservicemanager |
| 170 | attribute hwservice_manager_type; |
| 171 | |
| 172 | # All HwBinder services guaranteed to be passthrough. These services always run |
| 173 | # in the process of their clients, and thus operate with the same access as |
| 174 | # their clients. |
| 175 | attribute same_process_hwservice; |
| 176 | |
| 177 | # All HwBinder services guaranteed to be offered only by core domain components |
| 178 | attribute coredomain_hwservice; |
| 179 | |
| 180 | # All HwBinder services that untrusted apps can't directly access |
| 181 | attribute protected_hwservice; |
| 182 | |
| 183 | # All types used for services managed by vndservicemanager |
| 184 | attribute vndservice_manager_type; |
| 185 | |
| 186 | |
| 187 | # All domains that can override MLS restrictions. |
| 188 | # i.e. processes that can read up and write down. |
| 189 | attribute mlstrustedsubject; |
| 190 | |
| 191 | # All types that can override MLS restrictions. |
| 192 | # i.e. files that can be read by lower and written by higher |
| 193 | attribute mlstrustedobject; |
| 194 | |
| 195 | # All domains used for apps. |
| 196 | attribute appdomain; |
| 197 | |
| 198 | # All third party apps (except isolated_app and ephemeral_app) |
| 199 | attribute untrusted_app_all; |
| 200 | |
| 201 | # All domains used for apps with network access. |
| 202 | attribute netdomain; |
| 203 | |
| 204 | # All domains used for apps with bluetooth access. |
| 205 | attribute bluetoothdomain; |
| 206 | |
| 207 | # All domains used for binder service domains. |
| 208 | attribute binderservicedomain; |
| 209 | |
| 210 | # update_engine related domains that need to apply an update and run |
| 211 | # postinstall. This includes the background daemon and the sideload tool from |
| 212 | # recovery for A/B devices. |
| 213 | attribute update_engine_common; |
| 214 | |
| 215 | # All core domains (as opposed to vendor/device-specific domains) |
| 216 | attribute coredomain; |
| 217 | |
| 218 | # All vendor hwservice. |
| 219 | attribute vendor_hwservice_type; |
| 220 | |
| 221 | # All socket devices owned by core domain components |
| 222 | attribute coredomain_socket; |
| 223 | expandattribute coredomain_socket false; |
| 224 | |
| 225 | # All vendor domains which violate the requirement of not using sockets for |
| 226 | # communicating with core components |
| 227 | # TODO(b/36577153): Remove this once there are no violations |
| 228 | attribute socket_between_core_and_vendor_violators; |
| 229 | expandattribute socket_between_core_and_vendor_violators false; |
| 230 | |
| 231 | # All vendor domains which violate the requirement of not executing |
| 232 | # system processes |
| 233 | # TODO(b/36463595) |
| 234 | attribute vendor_executes_system_violators; |
| 235 | expandattribute vendor_executes_system_violators false; |
| 236 | |
| 237 | # All domains which violate the requirement of not sharing files by path |
| 238 | # between between vendor and core domains. |
| 239 | # TODO(b/34980020) |
| 240 | attribute data_between_core_and_vendor_violators; |
| 241 | expandattribute data_between_core_and_vendor_violators false; |
| 242 | |
| 243 | # All system domains which violate the requirement of not executing vendor |
| 244 | # binaries/libraries. |
| 245 | # TODO(b/62041836) |
| 246 | attribute system_executes_vendor_violators; |
| 247 | expandattribute system_executes_vendor_violators false; |
| 248 | |
| 249 | # All system domains which violate the requirement of not writing vendor |
| 250 | # properties. |
| 251 | # TODO(b/78598545): Remove this once there are no violations |
| 252 | attribute system_writes_vendor_properties_violators; |
| 253 | expandattribute system_writes_vendor_properties_violators false; |
| 254 | |
| 255 | # All system domains which violate the requirement of not writing to |
| 256 | # /mnt/vendor/*. Must not be used on devices launched with P or later. |
| 257 | attribute system_writes_mnt_vendor_violators; |
| 258 | expandattribute system_writes_mnt_vendor_violators false; |
| 259 | |
| 260 | # hwservices that are accessible from untrusted applications |
| 261 | # WARNING: Use of this attribute should be avoided unless |
| 262 | # absolutely necessary. It is a temporary allowance to aid the |
| 263 | # transition to treble and will be removed in a future platform |
| 264 | # version, requiring all hwservices that are labeled with this |
| 265 | # attribute to be submitted to AOSP in order to maintain their |
| 266 | # app-visibility. |
| 267 | attribute untrusted_app_visible_hwservice_violators; |
| 268 | expandattribute untrusted_app_visible_hwservice_violators false; |
| 269 | |
| 270 | # halserver domains that are accessible to untrusted applications. These |
| 271 | # domains are typically those hosting hwservices attributed by the |
| 272 | # untrusted_app_visible_hwservice_violators. |
| 273 | # WARNING: Use of this attribute should be avoided unless absolutely necessary. |
| 274 | # It is a temporary allowance to aid the transition to treble and will be |
| 275 | # removed in the future platform version, requiring all halserver domains that |
| 276 | # are labeled with this attribute to be submitted to AOSP in order to maintain |
| 277 | # their app-visibility. |
| 278 | attribute untrusted_app_visible_halserver_violators; |
| 279 | expandattribute untrusted_app_visible_halserver_violators false; |
| 280 | |
| 281 | # PDX services |
| 282 | attribute pdx_endpoint_dir_type; |
| 283 | attribute pdx_endpoint_socket_type; |
| 284 | expandattribute pdx_endpoint_socket_type false; |
| 285 | attribute pdx_channel_socket_type; |
| 286 | expandattribute pdx_channel_socket_type false; |
| 287 | |
| 288 | pdx_service_attributes(display_client) |
| 289 | pdx_service_attributes(display_manager) |
| 290 | pdx_service_attributes(display_screenshot) |
| 291 | pdx_service_attributes(display_vsync) |
| 292 | pdx_service_attributes(performance_client) |
| 293 | pdx_service_attributes(bufferhub_client) |
| 294 | |
| 295 | # All HAL servers |
| 296 | attribute halserverdomain; |
| 297 | # All HAL clients |
| 298 | attribute halclientdomain; |
| 299 | expandattribute halclientdomain true; |
| 300 | |
| 301 | # Exempt for halserverdomain to access sockets. Only builds for automotive |
| 302 | # device types are allowed to use this attribute (enforced by CTS). |
| 303 | # Unlike phone, in a car many modules are external from Android perspective and |
| 304 | # HALs should be able to communicate with those devices through sockets. |
| 305 | attribute hal_automotive_socket_exemption; |
| 306 | |
| 307 | # HALs |
| 308 | hal_attribute(allocator); |
| 309 | hal_attribute(atrace); |
| 310 | hal_attribute(audio); |
| 311 | hal_attribute(audiocontrol); |
| 312 | hal_attribute(authsecret); |
| 313 | hal_attribute(bluetooth); |
| 314 | hal_attribute(bootctl); |
| 315 | hal_attribute(bufferhub); |
| 316 | hal_attribute(broadcastradio); |
| 317 | hal_attribute(camera); |
| 318 | hal_attribute(can_bus); |
| 319 | hal_attribute(can_controller); |
| 320 | hal_attribute(cas); |
| 321 | hal_attribute(codec2); |
| 322 | hal_attribute(configstore); |
| 323 | hal_attribute(confirmationui); |
| 324 | hal_attribute(contexthub); |
| 325 | hal_attribute(drm); |
Inseob Kim | ff43be2 | 2021-06-07 16:56:56 +0900 | [diff] [blame] | 326 | hal_attribute(evs); |
| 327 | hal_attribute(face); |
| 328 | hal_attribute(fingerprint); |
| 329 | hal_attribute(gatekeeper); |
| 330 | hal_attribute(gnss); |
| 331 | hal_attribute(graphics_allocator); |
| 332 | hal_attribute(graphics_composer); |
| 333 | hal_attribute(health); |
| 334 | hal_attribute(health_storage); |
| 335 | hal_attribute(identity); |
| 336 | hal_attribute(input_classifier); |
| 337 | hal_attribute(ir); |
| 338 | hal_attribute(keymaster); |
| 339 | hal_attribute(keymint); |
| 340 | hal_attribute(light); |
| 341 | hal_attribute(lowpan); |
| 342 | hal_attribute(memtrack); |
| 343 | hal_attribute(neuralnetworks); |
| 344 | hal_attribute(nfc); |
| 345 | hal_attribute(oemlock); |
| 346 | hal_attribute(omx); |
| 347 | hal_attribute(power); |
| 348 | hal_attribute(power_stats); |
| 349 | hal_attribute(rebootescrow); |
| 350 | hal_attribute(secure_element); |
| 351 | hal_attribute(sensors); |
| 352 | hal_attribute(telephony); |
| 353 | hal_attribute(tetheroffload); |
| 354 | hal_attribute(thermal); |
| 355 | hal_attribute(tv_cec); |
| 356 | hal_attribute(tv_input); |
| 357 | hal_attribute(tv_tuner); |
| 358 | hal_attribute(usb); |
| 359 | hal_attribute(usb_gadget); |
| 360 | hal_attribute(vehicle); |
| 361 | hal_attribute(vibrator); |
| 362 | hal_attribute(vr); |
| 363 | hal_attribute(weaver); |
| 364 | hal_attribute(wifi); |
| 365 | hal_attribute(wifi_hostapd); |
| 366 | hal_attribute(wifi_supplicant); |
| 367 | |
| 368 | # HwBinder services offered across the core-vendor boundary |
| 369 | # |
| 370 | # We annotate server domains with x_server to loosen the coupling between |
| 371 | # system and vendor images. For example, it should be possible to move a service |
| 372 | # from one core domain to another, without having to update the vendor image |
| 373 | # which contains clients of this service. |
| 374 | |
| 375 | attribute automotive_display_service_server; |
| 376 | attribute camera_service_server; |
| 377 | attribute display_service_server; |
| 378 | attribute scheduler_service_server; |
| 379 | attribute sensor_service_server; |
| 380 | attribute stats_service_server; |
| 381 | attribute system_suspend_internal_server; |
| 382 | attribute system_suspend_server; |
| 383 | attribute wifi_keystore_service_server; |
| 384 | |
| 385 | # All types used for super partition block devices. |
| 386 | attribute super_block_device_type; |
| 387 | |
| 388 | # All types used for DMA-BUF heaps |
| 389 | attribute dmabuf_heap_device_type; |
| 390 | expandattribute dmabuf_heap_device_type false; |
| 391 | |
| 392 | # All types used for DSU metadata files. |
| 393 | attribute gsi_metadata_file_type; |
Inseob Kim | 4eb5660 | 2021-07-09 15:51:12 +0900 | [diff] [blame] | 394 | |
| 395 | attribute fusefs_type; |