Tri Vo | a5cfd3e | 2018-03-22 11:35:02 -0700 | [diff] [blame] | 1 | // Copyright (C) 2018 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Bob Badour | 601ebb4 | 2021-02-03 23:07:40 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["system_sepolicy_license"], |
| 17 | } |
| 18 | |
| 19 | // Added automatically by a large-scale-change that took the approach of |
| 20 | // 'apply every license found to every target'. While this makes sure we respect |
| 21 | // every license restriction, it may not be entirely correct. |
| 22 | // |
| 23 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 24 | // |
| 25 | // Please consider splitting the single license below into multiple licenses, |
| 26 | // taking care not to lose any license_kind information, and overriding the |
| 27 | // default license using the 'licenses: [...]' property on targets as needed. |
| 28 | // |
| 29 | // For unused files, consider creating a 'filegroup' with "//visibility:private" |
| 30 | // to attach the license to, and including a comment whether the files may be |
| 31 | // used in the current project. |
| 32 | // http://go/android-license-faq |
| 33 | license { |
| 34 | name: "system_sepolicy_license", |
| 35 | visibility: [":__subpackages__"], |
| 36 | license_kinds: [ |
| 37 | "SPDX-license-identifier-Apache-2.0", |
| 38 | "legacy_unencumbered", |
| 39 | ], |
| 40 | license_text: [ |
| 41 | "NOTICE", |
| 42 | ], |
| 43 | } |
| 44 | |
Jeff Vander Stoep | ecd288f | 2019-02-15 12:18:15 -0800 | [diff] [blame] | 45 | cc_defaults { name: "selinux_policy_version", cflags: ["-DSEPOLICY_VERSION=30"], } |
| 46 | |
Tri Vo | 84e247a | 2018-03-25 20:03:58 -0700 | [diff] [blame] | 47 | se_filegroup { |
| 48 | name: "26.0.board.compat.map", |
| 49 | srcs: [ |
| 50 | "compat/26.0/26.0.cil", |
| 51 | ], |
| 52 | } |
| 53 | |
| 54 | se_filegroup { |
| 55 | name: "27.0.board.compat.map", |
| 56 | srcs: [ |
| 57 | "compat/27.0/27.0.cil", |
| 58 | ], |
| 59 | } |
| 60 | |
Jae Shin | 1fa9634 | 2018-07-11 18:30:44 +0900 | [diff] [blame] | 61 | se_filegroup { |
| 62 | name: "28.0.board.compat.map", |
| 63 | srcs: [ |
| 64 | "compat/28.0/28.0.cil", |
| 65 | ], |
| 66 | } |
| 67 | |
Jinguang Dong | e012569 | 2019-03-05 17:20:54 +0800 | [diff] [blame] | 68 | se_filegroup { |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 69 | name: "29.0.board.compat.map", |
| 70 | srcs: [ |
| 71 | "compat/29.0/29.0.cil", |
| 72 | ], |
| 73 | } |
| 74 | |
| 75 | se_filegroup { |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 76 | name: "30.0.board.compat.map", |
| 77 | srcs: [ |
| 78 | "compat/30.0/30.0.cil", |
| 79 | ], |
| 80 | } |
| 81 | |
| 82 | se_filegroup { |
Inseob Kim | 4f20ff7 | 2021-06-15 21:05:39 +0900 | [diff] [blame] | 83 | name: "31.0.board.compat.map", |
| 84 | srcs: [ |
| 85 | "compat/31.0/31.0.cil", |
| 86 | ], |
| 87 | } |
| 88 | |
| 89 | se_filegroup { |
Inseob Kim | bee558e | 2021-11-30 14:58:10 +0900 | [diff] [blame^] | 90 | name: "32.0.board.compat.map", |
| 91 | srcs: [ |
| 92 | "compat/32.0/32.0.cil", |
| 93 | ], |
| 94 | } |
| 95 | |
| 96 | se_filegroup { |
Yi-Yo Chiang | 8be93c0 | 2021-04-13 02:49:29 +0800 | [diff] [blame] | 97 | name: "26.0.board.compat.cil", |
| 98 | srcs: [ |
| 99 | "compat/26.0/26.0.compat.cil", |
| 100 | ], |
| 101 | } |
| 102 | |
| 103 | se_filegroup { |
| 104 | name: "27.0.board.compat.cil", |
| 105 | srcs: [ |
| 106 | "compat/27.0/27.0.compat.cil", |
| 107 | ], |
| 108 | } |
| 109 | |
| 110 | se_filegroup { |
| 111 | name: "28.0.board.compat.cil", |
| 112 | srcs: [ |
| 113 | "compat/28.0/28.0.compat.cil", |
| 114 | ], |
| 115 | } |
| 116 | |
| 117 | se_filegroup { |
| 118 | name: "29.0.board.compat.cil", |
| 119 | srcs: [ |
| 120 | "compat/29.0/29.0.compat.cil", |
| 121 | ], |
| 122 | } |
| 123 | |
| 124 | se_filegroup { |
| 125 | name: "30.0.board.compat.cil", |
| 126 | srcs: [ |
| 127 | "compat/30.0/30.0.compat.cil", |
| 128 | ], |
| 129 | } |
| 130 | |
| 131 | se_filegroup { |
Inseob Kim | 4f20ff7 | 2021-06-15 21:05:39 +0900 | [diff] [blame] | 132 | name: "31.0.board.compat.cil", |
| 133 | srcs: [ |
| 134 | "compat/31.0/31.0.compat.cil", |
| 135 | ], |
| 136 | } |
| 137 | |
| 138 | se_filegroup { |
Inseob Kim | bee558e | 2021-11-30 14:58:10 +0900 | [diff] [blame^] | 139 | name: "32.0.board.compat.cil", |
| 140 | srcs: [ |
| 141 | "compat/32.0/32.0.compat.cil", |
| 142 | ], |
| 143 | } |
| 144 | |
| 145 | se_filegroup { |
Jinguang Dong | e012569 | 2019-03-05 17:20:54 +0800 | [diff] [blame] | 146 | name: "26.0.board.ignore.map", |
| 147 | srcs: [ |
| 148 | "compat/26.0/26.0.ignore.cil", |
| 149 | ], |
| 150 | } |
| 151 | |
| 152 | se_filegroup { |
| 153 | name: "27.0.board.ignore.map", |
| 154 | srcs: [ |
| 155 | "compat/27.0/27.0.ignore.cil", |
| 156 | ], |
| 157 | } |
| 158 | |
| 159 | se_filegroup { |
| 160 | name: "28.0.board.ignore.map", |
| 161 | srcs: [ |
| 162 | "compat/28.0/28.0.ignore.cil", |
| 163 | ], |
| 164 | } |
| 165 | |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 166 | se_filegroup { |
| 167 | name: "29.0.board.ignore.map", |
| 168 | srcs: [ |
| 169 | "compat/29.0/29.0.ignore.cil", |
| 170 | ], |
| 171 | } |
| 172 | |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 173 | se_filegroup { |
| 174 | name: "30.0.board.ignore.map", |
| 175 | srcs: [ |
| 176 | "compat/30.0/30.0.ignore.cil", |
| 177 | ], |
| 178 | } |
| 179 | |
Inseob Kim | 4f20ff7 | 2021-06-15 21:05:39 +0900 | [diff] [blame] | 180 | se_filegroup { |
| 181 | name: "31.0.board.ignore.map", |
| 182 | srcs: [ |
| 183 | "compat/31.0/31.0.ignore.cil", |
| 184 | ], |
| 185 | } |
| 186 | |
Inseob Kim | bee558e | 2021-11-30 14:58:10 +0900 | [diff] [blame^] | 187 | se_filegroup { |
| 188 | name: "32.0.board.ignore.map", |
| 189 | srcs: [ |
| 190 | "compat/32.0/32.0.ignore.cil", |
| 191 | ], |
| 192 | } |
| 193 | |
Tri Vo | a5cfd3e | 2018-03-22 11:35:02 -0700 | [diff] [blame] | 194 | se_cil_compat_map { |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 195 | name: "plat_26.0.cil", |
| 196 | stem: "26.0.cil", |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 197 | bottom_half: [":26.0.board.compat.map"], |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 198 | top_half: "plat_27.0.cil", |
Tri Vo | a5cfd3e | 2018-03-22 11:35:02 -0700 | [diff] [blame] | 199 | } |
| 200 | |
| 201 | se_cil_compat_map { |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 202 | name: "plat_27.0.cil", |
| 203 | stem: "27.0.cil", |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 204 | bottom_half: [":27.0.board.compat.map"], |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 205 | top_half: "plat_28.0.cil", |
Tri Vo | a5cfd3e | 2018-03-22 11:35:02 -0700 | [diff] [blame] | 206 | } |
Jae Shin | 1fa9634 | 2018-07-11 18:30:44 +0900 | [diff] [blame] | 207 | |
| 208 | se_cil_compat_map { |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 209 | name: "plat_28.0.cil", |
| 210 | stem: "28.0.cil", |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 211 | bottom_half: [":28.0.board.compat.map"], |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 212 | top_half: "plat_29.0.cil", |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 213 | } |
| 214 | |
| 215 | se_cil_compat_map { |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 216 | name: "plat_29.0.cil", |
| 217 | stem: "29.0.cil", |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 218 | bottom_half: [":29.0.board.compat.map"], |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 219 | top_half: "plat_30.0.cil", |
| 220 | } |
| 221 | |
| 222 | se_cil_compat_map { |
| 223 | name: "plat_30.0.cil", |
| 224 | stem: "30.0.cil", |
| 225 | bottom_half: [":30.0.board.compat.map"], |
Inseob Kim | 4f20ff7 | 2021-06-15 21:05:39 +0900 | [diff] [blame] | 226 | top_half: "plat_31.0.cil", |
| 227 | } |
| 228 | |
| 229 | se_cil_compat_map { |
| 230 | name: "plat_31.0.cil", |
| 231 | stem: "31.0.cil", |
| 232 | bottom_half: [":31.0.board.compat.map"], |
Inseob Kim | bee558e | 2021-11-30 14:58:10 +0900 | [diff] [blame^] | 233 | top_half: "plat_32.0.cil", |
| 234 | } |
| 235 | |
| 236 | se_cil_compat_map { |
| 237 | name: "plat_32.0.cil", |
| 238 | stem: "32.0.cil", |
| 239 | bottom_half: [":32.0.board.compat.map"], |
| 240 | // top_half: "plat_33.0.cil", |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 241 | } |
| 242 | |
| 243 | se_cil_compat_map { |
| 244 | name: "system_ext_26.0.cil", |
| 245 | stem: "26.0.cil", |
| 246 | bottom_half: [":26.0.board.compat.map"], |
| 247 | top_half: "system_ext_27.0.cil", |
| 248 | system_ext_specific: true, |
| 249 | } |
| 250 | |
| 251 | se_cil_compat_map { |
| 252 | name: "system_ext_27.0.cil", |
| 253 | stem: "27.0.cil", |
| 254 | bottom_half: [":27.0.board.compat.map"], |
| 255 | top_half: "system_ext_28.0.cil", |
| 256 | system_ext_specific: true, |
| 257 | } |
| 258 | |
| 259 | se_cil_compat_map { |
| 260 | name: "system_ext_28.0.cil", |
| 261 | stem: "28.0.cil", |
| 262 | bottom_half: [":28.0.board.compat.map"], |
| 263 | top_half: "system_ext_29.0.cil", |
| 264 | system_ext_specific: true, |
| 265 | } |
| 266 | |
| 267 | se_cil_compat_map { |
| 268 | name: "system_ext_29.0.cil", |
| 269 | stem: "29.0.cil", |
| 270 | bottom_half: [":29.0.board.compat.map"], |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 271 | top_half: "system_ext_30.0.cil", |
| 272 | system_ext_specific: true, |
| 273 | } |
| 274 | |
| 275 | se_cil_compat_map { |
| 276 | name: "system_ext_30.0.cil", |
| 277 | stem: "30.0.cil", |
| 278 | bottom_half: [":30.0.board.compat.map"], |
Inseob Kim | 4f20ff7 | 2021-06-15 21:05:39 +0900 | [diff] [blame] | 279 | top_half: "system_ext_31.0.cil", |
| 280 | system_ext_specific: true, |
| 281 | } |
| 282 | |
| 283 | se_cil_compat_map { |
| 284 | name: "system_ext_31.0.cil", |
| 285 | stem: "31.0.cil", |
| 286 | bottom_half: [":31.0.board.compat.map"], |
Inseob Kim | bee558e | 2021-11-30 14:58:10 +0900 | [diff] [blame^] | 287 | top_half: "system_ext_32.0.cil", |
| 288 | system_ext_specific: true, |
| 289 | } |
| 290 | |
| 291 | se_cil_compat_map { |
| 292 | name: "system_ext_32.0.cil", |
| 293 | stem: "32.0.cil", |
| 294 | bottom_half: [":32.0.board.compat.map"], |
| 295 | // top_half: "system_ext_33.0.cil", |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 296 | system_ext_specific: true, |
| 297 | } |
| 298 | |
| 299 | se_cil_compat_map { |
| 300 | name: "product_26.0.cil", |
| 301 | stem: "26.0.cil", |
| 302 | bottom_half: [":26.0.board.compat.map"], |
| 303 | top_half: "product_27.0.cil", |
| 304 | product_specific: true, |
| 305 | } |
| 306 | |
| 307 | se_cil_compat_map { |
| 308 | name: "product_27.0.cil", |
| 309 | stem: "27.0.cil", |
| 310 | bottom_half: [":27.0.board.compat.map"], |
| 311 | top_half: "product_28.0.cil", |
| 312 | product_specific: true, |
| 313 | } |
| 314 | |
| 315 | se_cil_compat_map { |
| 316 | name: "product_28.0.cil", |
| 317 | stem: "28.0.cil", |
| 318 | bottom_half: [":28.0.board.compat.map"], |
| 319 | top_half: "product_29.0.cil", |
| 320 | product_specific: true, |
| 321 | } |
| 322 | |
| 323 | se_cil_compat_map { |
| 324 | name: "product_29.0.cil", |
| 325 | stem: "29.0.cil", |
| 326 | bottom_half: [":29.0.board.compat.map"], |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 327 | top_half: "product_30.0.cil", |
| 328 | product_specific: true, |
| 329 | } |
| 330 | |
| 331 | se_cil_compat_map { |
| 332 | name: "product_30.0.cil", |
| 333 | stem: "30.0.cil", |
| 334 | bottom_half: [":30.0.board.compat.map"], |
Inseob Kim | 4f20ff7 | 2021-06-15 21:05:39 +0900 | [diff] [blame] | 335 | top_half: "product_31.0.cil", |
| 336 | product_specific: true, |
| 337 | } |
| 338 | |
| 339 | se_cil_compat_map { |
| 340 | name: "product_31.0.cil", |
| 341 | stem: "31.0.cil", |
| 342 | bottom_half: [":31.0.board.compat.map"], |
Inseob Kim | bee558e | 2021-11-30 14:58:10 +0900 | [diff] [blame^] | 343 | top_half: "product_32.0.cil", |
| 344 | product_specific: true, |
| 345 | } |
| 346 | |
| 347 | se_cil_compat_map { |
| 348 | name: "product_32.0.cil", |
| 349 | stem: "32.0.cil", |
| 350 | bottom_half: [":32.0.board.compat.map"], |
| 351 | // top_half: "product_33.0.cil", |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 352 | product_specific: true, |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 353 | } |
| 354 | |
| 355 | se_cil_compat_map { |
| 356 | name: "26.0.ignore.cil", |
Jinguang Dong | e012569 | 2019-03-05 17:20:54 +0800 | [diff] [blame] | 357 | bottom_half: [":26.0.board.ignore.map"], |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 358 | top_half: "27.0.ignore.cil", |
| 359 | } |
| 360 | |
| 361 | se_cil_compat_map { |
| 362 | name: "27.0.ignore.cil", |
Jinguang Dong | e012569 | 2019-03-05 17:20:54 +0800 | [diff] [blame] | 363 | bottom_half: [":27.0.board.ignore.map"], |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 364 | top_half: "28.0.ignore.cil", |
| 365 | } |
| 366 | |
| 367 | se_cil_compat_map { |
| 368 | name: "28.0.ignore.cil", |
Jinguang Dong | e012569 | 2019-03-05 17:20:54 +0800 | [diff] [blame] | 369 | bottom_half: [":28.0.board.ignore.map"], |
Tri Vo | e381deb | 2019-06-12 15:52:30 -0700 | [diff] [blame] | 370 | top_half: "29.0.ignore.cil", |
Jae Shin | 1fa9634 | 2018-07-11 18:30:44 +0900 | [diff] [blame] | 371 | } |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 372 | |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 373 | se_cil_compat_map { |
| 374 | name: "29.0.ignore.cil", |
| 375 | bottom_half: [":29.0.board.ignore.map"], |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 376 | top_half: "30.0.ignore.cil", |
| 377 | } |
| 378 | |
| 379 | se_cil_compat_map { |
| 380 | name: "30.0.ignore.cil", |
| 381 | bottom_half: [":30.0.board.ignore.map"], |
Inseob Kim | 4f20ff7 | 2021-06-15 21:05:39 +0900 | [diff] [blame] | 382 | top_half: "31.0.ignore.cil", |
| 383 | } |
| 384 | |
| 385 | se_cil_compat_map { |
| 386 | name: "31.0.ignore.cil", |
| 387 | bottom_half: [":31.0.board.ignore.map"], |
Inseob Kim | bee558e | 2021-11-30 14:58:10 +0900 | [diff] [blame^] | 388 | top_half: "32.0.ignore.cil", |
| 389 | } |
| 390 | |
| 391 | se_cil_compat_map { |
| 392 | name: "32.0.ignore.cil", |
| 393 | bottom_half: [":32.0.board.ignore.map"], |
| 394 | // top_half: "33.0.ignore.cil", |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 395 | } |
| 396 | |
P.Adarsh Reddy | 07dd59f | 2021-03-22 15:55:09 +0530 | [diff] [blame] | 397 | se_cil_compat_map { |
| 398 | name: "system_ext_30.0.ignore.cil", |
| 399 | bottom_half: [":30.0.board.ignore.map"], |
Inseob Kim | 4f20ff7 | 2021-06-15 21:05:39 +0900 | [diff] [blame] | 400 | top_half: "system_ext_31.0.ignore.cil", |
| 401 | system_ext_specific: true, |
| 402 | } |
| 403 | |
| 404 | se_cil_compat_map { |
| 405 | name: "system_ext_31.0.ignore.cil", |
| 406 | bottom_half: [":31.0.board.ignore.map"], |
Inseob Kim | bee558e | 2021-11-30 14:58:10 +0900 | [diff] [blame^] | 407 | top_half: "system_ext_32.0.ignore.cil", |
| 408 | system_ext_specific: true, |
| 409 | } |
| 410 | |
| 411 | se_cil_compat_map { |
| 412 | name: "system_ext_32.0.ignore.cil", |
| 413 | bottom_half: [":32.0.board.ignore.map"], |
| 414 | // top_half: "system_ext_33.0.ignore.cil", |
P.Adarsh Reddy | 07dd59f | 2021-03-22 15:55:09 +0530 | [diff] [blame] | 415 | system_ext_specific: true, |
| 416 | } |
| 417 | |
| 418 | se_cil_compat_map { |
| 419 | name: "product_30.0.ignore.cil", |
| 420 | bottom_half: [":30.0.board.ignore.map"], |
Inseob Kim | 4f20ff7 | 2021-06-15 21:05:39 +0900 | [diff] [blame] | 421 | top_half: "product_31.0.ignore.cil", |
| 422 | product_specific: true, |
| 423 | } |
| 424 | |
| 425 | se_cil_compat_map { |
| 426 | name: "product_31.0.ignore.cil", |
| 427 | bottom_half: [":31.0.board.ignore.map"], |
Inseob Kim | bee558e | 2021-11-30 14:58:10 +0900 | [diff] [blame^] | 428 | top_half: "product_32.0.ignore.cil", |
| 429 | product_specific: true, |
| 430 | } |
| 431 | |
| 432 | se_cil_compat_map { |
| 433 | name: "product_32.0.ignore.cil", |
| 434 | bottom_half: [":32.0.board.ignore.map"], |
| 435 | // top_half: "product_33.0.ignore.cil", |
P.Adarsh Reddy | 07dd59f | 2021-03-22 15:55:09 +0530 | [diff] [blame] | 436 | product_specific: true, |
| 437 | } |
| 438 | |
Yi-Yo Chiang | a225112 | 2021-04-13 02:51:48 +0800 | [diff] [blame] | 439 | se_compat_cil { |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 440 | name: "26.0.compat.cil", |
Yi-Yo Chiang | a225112 | 2021-04-13 02:51:48 +0800 | [diff] [blame] | 441 | srcs: [":26.0.board.compat.cil"], |
Jeff Vander Stoep | 564e292 | 2019-05-02 13:48:44 -0700 | [diff] [blame] | 442 | } |
| 443 | |
Yi-Yo Chiang | a225112 | 2021-04-13 02:51:48 +0800 | [diff] [blame] | 444 | se_compat_cil { |
Jeff Vander Stoep | 564e292 | 2019-05-02 13:48:44 -0700 | [diff] [blame] | 445 | name: "27.0.compat.cil", |
Yi-Yo Chiang | a225112 | 2021-04-13 02:51:48 +0800 | [diff] [blame] | 446 | srcs: [":27.0.board.compat.cil"], |
Jeff Vander Stoep | 564e292 | 2019-05-02 13:48:44 -0700 | [diff] [blame] | 447 | } |
| 448 | |
Yi-Yo Chiang | a225112 | 2021-04-13 02:51:48 +0800 | [diff] [blame] | 449 | se_compat_cil { |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 450 | name: "28.0.compat.cil", |
Yi-Yo Chiang | a225112 | 2021-04-13 02:51:48 +0800 | [diff] [blame] | 451 | srcs: [":28.0.board.compat.cil"], |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 452 | } |
| 453 | |
Yi-Yo Chiang | a225112 | 2021-04-13 02:51:48 +0800 | [diff] [blame] | 454 | se_compat_cil { |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 455 | name: "29.0.compat.cil", |
Yi-Yo Chiang | a225112 | 2021-04-13 02:51:48 +0800 | [diff] [blame] | 456 | srcs: [":29.0.board.compat.cil"], |
Jeff Vander Stoep | 564e292 | 2019-05-02 13:48:44 -0700 | [diff] [blame] | 457 | } |
| 458 | |
Yi-Yo Chiang | a225112 | 2021-04-13 02:51:48 +0800 | [diff] [blame] | 459 | se_compat_cil { |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 460 | name: "30.0.compat.cil", |
Yi-Yo Chiang | a225112 | 2021-04-13 02:51:48 +0800 | [diff] [blame] | 461 | srcs: [":30.0.board.compat.cil"], |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 462 | } |
| 463 | |
Yi-Yo Chiang | 8be93c0 | 2021-04-13 02:49:29 +0800 | [diff] [blame] | 464 | se_compat_cil { |
Inseob Kim | 4f20ff7 | 2021-06-15 21:05:39 +0900 | [diff] [blame] | 465 | name: "31.0.compat.cil", |
| 466 | srcs: [":31.0.board.compat.cil"], |
| 467 | } |
| 468 | |
| 469 | se_compat_cil { |
Inseob Kim | bee558e | 2021-11-30 14:58:10 +0900 | [diff] [blame^] | 470 | name: "32.0.compat.cil", |
| 471 | srcs: [":32.0.board.compat.cil"], |
| 472 | } |
| 473 | |
| 474 | se_compat_cil { |
Yi-Yo Chiang | 8be93c0 | 2021-04-13 02:49:29 +0800 | [diff] [blame] | 475 | name: "system_ext_26.0.compat.cil", |
| 476 | srcs: [":26.0.board.compat.cil"], |
| 477 | stem: "26.0.compat.cil", |
| 478 | system_ext_specific: true, |
| 479 | } |
| 480 | |
| 481 | se_compat_cil { |
| 482 | name: "system_ext_27.0.compat.cil", |
| 483 | srcs: [":27.0.board.compat.cil"], |
| 484 | stem: "27.0.compat.cil", |
| 485 | system_ext_specific: true, |
| 486 | } |
| 487 | |
| 488 | se_compat_cil { |
| 489 | name: "system_ext_28.0.compat.cil", |
| 490 | srcs: [":28.0.board.compat.cil"], |
| 491 | stem: "28.0.compat.cil", |
| 492 | system_ext_specific: true, |
| 493 | } |
| 494 | |
| 495 | se_compat_cil { |
| 496 | name: "system_ext_29.0.compat.cil", |
| 497 | srcs: [":29.0.board.compat.cil"], |
| 498 | stem: "29.0.compat.cil", |
| 499 | system_ext_specific: true, |
| 500 | } |
| 501 | |
| 502 | se_compat_cil { |
| 503 | name: "system_ext_30.0.compat.cil", |
| 504 | srcs: [":30.0.board.compat.cil"], |
| 505 | stem: "30.0.compat.cil", |
| 506 | system_ext_specific: true, |
| 507 | } |
| 508 | |
Inseob Kim | 4f20ff7 | 2021-06-15 21:05:39 +0900 | [diff] [blame] | 509 | se_compat_cil { |
| 510 | name: "system_ext_31.0.compat.cil", |
| 511 | srcs: [":31.0.board.compat.cil"], |
| 512 | stem: "31.0.compat.cil", |
| 513 | system_ext_specific: true, |
| 514 | } |
| 515 | |
Inseob Kim | bee558e | 2021-11-30 14:58:10 +0900 | [diff] [blame^] | 516 | se_compat_cil { |
| 517 | name: "system_ext_32.0.compat.cil", |
| 518 | srcs: [":32.0.board.compat.cil"], |
| 519 | stem: "32.0.compat.cil", |
| 520 | system_ext_specific: true, |
| 521 | } |
| 522 | |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 523 | se_filegroup { |
| 524 | name: "file_contexts_files", |
| 525 | srcs: ["file_contexts"], |
| 526 | } |
| 527 | |
| 528 | se_filegroup { |
| 529 | name: "file_contexts_asan_files", |
| 530 | srcs: ["file_contexts_asan"], |
| 531 | } |
| 532 | |
| 533 | se_filegroup { |
| 534 | name: "file_contexts_overlayfs_files", |
| 535 | srcs: ["file_contexts_overlayfs"], |
| 536 | } |
| 537 | |
| 538 | se_filegroup { |
| 539 | name: "hwservice_contexts_files", |
| 540 | srcs: ["hwservice_contexts"], |
| 541 | } |
| 542 | |
| 543 | se_filegroup { |
| 544 | name: "property_contexts_files", |
| 545 | srcs: ["property_contexts"], |
| 546 | } |
| 547 | |
| 548 | se_filegroup { |
| 549 | name: "service_contexts_files", |
| 550 | srcs: ["service_contexts"], |
| 551 | } |
| 552 | |
Janis Danisevskis | c40681f | 2020-07-25 13:02:29 -0700 | [diff] [blame] | 553 | se_filegroup { |
| 554 | name: "keystore2_key_contexts_files", |
| 555 | srcs: ["keystore2_key_contexts"], |
| 556 | } |
| 557 | |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 558 | file_contexts { |
| 559 | name: "plat_file_contexts", |
| 560 | srcs: [":file_contexts_files"], |
| 561 | product_variables: { |
| 562 | address_sanitize: { |
| 563 | srcs: [":file_contexts_asan_files"], |
| 564 | }, |
| 565 | debuggable: { |
| 566 | srcs: [":file_contexts_overlayfs_files"], |
| 567 | }, |
| 568 | }, |
| 569 | |
| 570 | flatten_apex: { |
| 571 | srcs: ["apex/*-file_contexts"], |
| 572 | }, |
Yuntao Xu | 42e732c | 2021-11-18 22:33:02 +0000 | [diff] [blame] | 573 | } |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 574 | |
Yuntao Xu | 42e732c | 2021-11-18 22:33:02 +0000 | [diff] [blame] | 575 | file_contexts { |
| 576 | name: "plat_file_contexts.recovery", |
| 577 | srcs: [":file_contexts_files"], |
| 578 | stem: "plat_file_contexts", |
| 579 | product_variables: { |
| 580 | address_sanitize: { |
| 581 | srcs: [":file_contexts_asan_files"], |
| 582 | }, |
| 583 | debuggable: { |
| 584 | srcs: [":file_contexts_overlayfs_files"], |
| 585 | }, |
| 586 | }, |
| 587 | |
| 588 | flatten_apex: { |
| 589 | srcs: ["apex/*-file_contexts"], |
| 590 | }, |
| 591 | |
| 592 | recovery: true, |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 593 | } |
| 594 | |
| 595 | file_contexts { |
| 596 | name: "vendor_file_contexts", |
| 597 | srcs: [":file_contexts_files"], |
| 598 | soc_specific: true, |
| 599 | recovery_available: true, |
| 600 | } |
| 601 | |
| 602 | file_contexts { |
Bowgo Tsai | 86a048d | 2019-09-09 22:04:06 +0800 | [diff] [blame] | 603 | name: "system_ext_file_contexts", |
| 604 | srcs: [":file_contexts_files"], |
| 605 | system_ext_specific: true, |
| 606 | recovery_available: true, |
| 607 | } |
| 608 | |
| 609 | file_contexts { |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 610 | name: "product_file_contexts", |
| 611 | srcs: [":file_contexts_files"], |
| 612 | product_specific: true, |
| 613 | recovery_available: true, |
| 614 | } |
| 615 | |
| 616 | file_contexts { |
| 617 | name: "odm_file_contexts", |
| 618 | srcs: [":file_contexts_files"], |
| 619 | device_specific: true, |
| 620 | recovery_available: true, |
| 621 | } |
| 622 | |
| 623 | hwservice_contexts { |
| 624 | name: "plat_hwservice_contexts", |
| 625 | srcs: [":hwservice_contexts_files"], |
| 626 | } |
| 627 | |
| 628 | hwservice_contexts { |
Bowgo Tsai | 241d36e | 2019-09-09 22:05:10 +0800 | [diff] [blame] | 629 | name: "system_ext_hwservice_contexts", |
| 630 | srcs: [":hwservice_contexts_files"], |
| 631 | system_ext_specific: true, |
| 632 | } |
| 633 | |
| 634 | hwservice_contexts { |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 635 | name: "product_hwservice_contexts", |
| 636 | srcs: [":hwservice_contexts_files"], |
| 637 | product_specific: true, |
| 638 | } |
| 639 | |
| 640 | hwservice_contexts { |
| 641 | name: "vendor_hwservice_contexts", |
| 642 | srcs: [":hwservice_contexts_files"], |
| 643 | reqd_mask: true, |
| 644 | soc_specific: true, |
| 645 | } |
| 646 | |
| 647 | hwservice_contexts { |
| 648 | name: "odm_hwservice_contexts", |
| 649 | srcs: [":hwservice_contexts_files"], |
| 650 | device_specific: true, |
| 651 | } |
| 652 | |
| 653 | property_contexts { |
| 654 | name: "plat_property_contexts", |
| 655 | srcs: [":property_contexts_files"], |
Yuntao Xu | 42e732c | 2021-11-18 22:33:02 +0000 | [diff] [blame] | 656 | } |
| 657 | |
| 658 | property_contexts { |
| 659 | name: "plat_property_contexts.recovery", |
| 660 | srcs: [":property_contexts_files"], |
| 661 | stem: "plat_property_contexts", |
| 662 | recovery: true, |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 663 | } |
| 664 | |
| 665 | property_contexts { |
Bowgo Tsai | 1864cd0 | 2019-09-09 18:09:22 +0800 | [diff] [blame] | 666 | name: "system_ext_property_contexts", |
| 667 | srcs: [":property_contexts_files"], |
| 668 | system_ext_specific: true, |
| 669 | recovery_available: true, |
| 670 | } |
| 671 | |
| 672 | property_contexts { |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 673 | name: "product_property_contexts", |
| 674 | srcs: [":property_contexts_files"], |
| 675 | product_specific: true, |
| 676 | recovery_available: true, |
| 677 | } |
| 678 | |
| 679 | property_contexts { |
| 680 | name: "vendor_property_contexts", |
| 681 | srcs: [":property_contexts_files"], |
| 682 | reqd_mask: true, |
| 683 | soc_specific: true, |
| 684 | recovery_available: true, |
| 685 | } |
| 686 | |
| 687 | property_contexts { |
| 688 | name: "odm_property_contexts", |
| 689 | srcs: [":property_contexts_files"], |
| 690 | device_specific: true, |
| 691 | recovery_available: true, |
| 692 | } |
| 693 | |
| 694 | service_contexts { |
| 695 | name: "plat_service_contexts", |
| 696 | srcs: [":service_contexts_files"], |
Yuntao Xu | 42e732c | 2021-11-18 22:33:02 +0000 | [diff] [blame] | 697 | } |
| 698 | |
| 699 | service_contexts { |
| 700 | name: "plat_service_contexts.recovery", |
| 701 | srcs: [":service_contexts_files"], |
| 702 | stem: "plat_service_contexts", |
| 703 | recovery: true, |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 704 | } |
| 705 | |
| 706 | service_contexts { |
Bowgo Tsai | 9823116 | 2019-09-09 22:05:29 +0800 | [diff] [blame] | 707 | name: "system_ext_service_contexts", |
| 708 | srcs: [":service_contexts_files"], |
| 709 | system_ext_specific: true, |
Yifan Hong | d6b2901 | 2021-11-13 00:22:01 -0800 | [diff] [blame] | 710 | recovery_available: true, |
Bowgo Tsai | 9823116 | 2019-09-09 22:05:29 +0800 | [diff] [blame] | 711 | } |
| 712 | |
| 713 | service_contexts { |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 714 | name: "product_service_contexts", |
| 715 | srcs: [":service_contexts_files"], |
| 716 | product_specific: true, |
Yifan Hong | d6b2901 | 2021-11-13 00:22:01 -0800 | [diff] [blame] | 717 | recovery_available: true, |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 718 | } |
| 719 | |
| 720 | service_contexts { |
| 721 | name: "vendor_service_contexts", |
| 722 | srcs: [":service_contexts_files"], |
| 723 | reqd_mask: true, |
| 724 | soc_specific: true, |
Yifan Hong | d6b2901 | 2021-11-13 00:22:01 -0800 | [diff] [blame] | 725 | recovery_available: true, |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 726 | } |
yangbill | 3e34537 | 2020-04-15 13:55:47 +0800 | [diff] [blame] | 727 | |
Janis Danisevskis | c40681f | 2020-07-25 13:02:29 -0700 | [diff] [blame] | 728 | keystore2_key_contexts { |
| 729 | name: "plat_keystore2_key_contexts", |
| 730 | srcs: [":keystore2_key_contexts_files"], |
| 731 | } |
| 732 | |
| 733 | keystore2_key_contexts { |
| 734 | name: "system_keystore2_key_contexts", |
| 735 | srcs: [":keystore2_key_contexts_files"], |
| 736 | system_ext_specific: true, |
| 737 | } |
| 738 | |
| 739 | keystore2_key_contexts { |
| 740 | name: "product_keystore2_key_contexts", |
| 741 | srcs: [":keystore2_key_contexts_files"], |
| 742 | product_specific: true, |
| 743 | } |
| 744 | |
| 745 | keystore2_key_contexts { |
| 746 | name: "vendor_keystore2_key_contexts", |
| 747 | srcs: [":keystore2_key_contexts_files"], |
| 748 | reqd_mask: true, |
| 749 | soc_specific: true, |
| 750 | } |
| 751 | |
yangbill | 3e34537 | 2020-04-15 13:55:47 +0800 | [diff] [blame] | 752 | // For vts_treble_sys_prop_test |
| 753 | filegroup { |
| 754 | name: "private_property_contexts", |
| 755 | srcs: ["private/property_contexts"], |
| 756 | visibility: [ |
| 757 | "//test/vts-testcase/security/system_property", |
| 758 | ], |
| 759 | } |
Inseob Kim | e35b49b | 2021-02-18 19:15:41 +0900 | [diff] [blame] | 760 | |
Inseob Kim | a49e724 | 2021-03-22 10:26:13 +0900 | [diff] [blame] | 761 | se_build_files { |
| 762 | name: "se_build_files", |
Inseob Kim | e35b49b | 2021-02-18 19:15:41 +0900 | [diff] [blame] | 763 | srcs: [ |
Inseob Kim | a49e724 | 2021-03-22 10:26:13 +0900 | [diff] [blame] | 764 | "security_classes", |
| 765 | "initial_sids", |
| 766 | "access_vectors", |
| 767 | "global_macros", |
| 768 | "neverallow_macros", |
| 769 | "mls_macros", |
| 770 | "mls_decl", |
| 771 | "mls", |
| 772 | "policy_capabilities", |
| 773 | "te_macros", |
| 774 | "attributes", |
| 775 | "ioctl_defines", |
| 776 | "ioctl_macros", |
| 777 | "*.te", |
| 778 | "roles_decl", |
| 779 | "roles", |
| 780 | "users", |
| 781 | "initial_sid_contexts", |
| 782 | "fs_use", |
| 783 | "genfs_contexts", |
| 784 | "port_contexts", |
Inseob Kim | e35b49b | 2021-02-18 19:15:41 +0900 | [diff] [blame] | 785 | ], |
| 786 | } |
| 787 | |
Inseob Kim | a49e724 | 2021-03-22 10:26:13 +0900 | [diff] [blame] | 788 | // reqd_policy_mask - a policy.conf file which contains only the bare minimum |
| 789 | // policy necessary to use checkpolicy. |
| 790 | // |
| 791 | // This bare-minimum policy needs to be present in all policy.conf files, but |
| 792 | // should not necessarily be exported as part of the public policy. |
| 793 | // |
| 794 | // The rules generated by reqd_policy_mask will allow the compilation of public |
| 795 | // policy and subsequent removal of CIL policy that should not be exported. |
| 796 | se_policy_conf { |
| 797 | name: "reqd_policy_mask.conf", |
| 798 | srcs: [":se_build_files{.reqd_mask}"], |
Inseob Kim | e35b49b | 2021-02-18 19:15:41 +0900 | [diff] [blame] | 799 | installable: false, |
| 800 | } |
| 801 | |
Inseob Kim | a49e724 | 2021-03-22 10:26:13 +0900 | [diff] [blame] | 802 | se_policy_cil { |
| 803 | name: "reqd_policy_mask.cil", |
| 804 | src: ":reqd_policy_mask.conf", |
| 805 | secilc_check: false, |
| 806 | installable: false, |
Inseob Kim | e35b49b | 2021-02-18 19:15:41 +0900 | [diff] [blame] | 807 | } |
| 808 | |
Inseob Kim | a49e724 | 2021-03-22 10:26:13 +0900 | [diff] [blame] | 809 | // pub_policy - policy that will be exported to be a part of non-platform |
| 810 | // policy corresponding to this platform version. |
| 811 | // |
| 812 | // This is a limited subset of policy that would not compile in checkpolicy on |
| 813 | // its own. |
| 814 | // |
| 815 | // To get around this limitation, add only the required files from private |
| 816 | // policy, which will generate CIL policy that will then be filtered out by the |
| 817 | // reqd_policy_mask. |
| 818 | // |
| 819 | // There are three pub_policy.cil files below: |
| 820 | // - pub_policy.cil: exported 'product', 'system_ext' and 'system' policy. |
| 821 | // - system_ext_pub_policy.cil: exported 'system_ext' and 'system' policy. |
| 822 | // - plat_pub_policy.cil: exported 'system' policy. |
| 823 | // |
| 824 | // Those above files will in turn be used to generate the following versioned cil files: |
| 825 | // - product_mapping_file: the versioned, exported 'product' policy in product partition. |
| 826 | // - system_ext_mapping_file: the versioned, exported 'system_ext' policy in system_ext partition. |
| 827 | // - plat_mapping_file: the versioned, exported 'system' policy in system partition. |
| 828 | // - plat_pub_versioned.cil: the versioned, exported 'product', 'system_ext' and 'system' policy |
| 829 | // in vendor partition. |
| 830 | // |
| 831 | se_policy_conf { |
| 832 | name: "pub_policy.conf", |
| 833 | srcs: [":se_build_files{.product_public}"], // product_ includes system and system_ext |
| 834 | installable: false, |
| 835 | } |
| 836 | |
| 837 | se_policy_cil { |
| 838 | name: "pub_policy.cil", |
| 839 | src: ":pub_policy.conf", |
| 840 | filter_out: [":reqd_policy_mask.cil"], |
| 841 | secilc_check: false, |
| 842 | installable: false, |
| 843 | } |
| 844 | |
| 845 | se_policy_conf { |
| 846 | name: "system_ext_pub_policy.conf", |
| 847 | srcs: [":se_build_files{.system_ext_public}"], // system_ext_public includes system |
| 848 | installable: false, |
| 849 | } |
| 850 | |
| 851 | se_policy_cil { |
| 852 | name: "system_ext_pub_policy.cil", |
| 853 | src: ":system_ext_pub_policy.conf", |
| 854 | filter_out: [":reqd_policy_mask.cil"], |
| 855 | secilc_check: false, |
| 856 | installable: false, |
| 857 | } |
| 858 | |
| 859 | se_policy_conf { |
| 860 | name: "plat_pub_policy.conf", |
| 861 | srcs: [":se_build_files{.plat_public}"], |
| 862 | installable: false, |
| 863 | } |
| 864 | |
| 865 | se_policy_cil { |
| 866 | name: "plat_pub_policy.cil", |
| 867 | src: ":plat_pub_policy.conf", |
| 868 | filter_out: [":reqd_policy_mask.cil"], |
| 869 | secilc_check: false, |
| 870 | installable: false, |
| 871 | } |
| 872 | |
| 873 | // plat_policy.conf - A combination of the private and public platform policy |
| 874 | // which will ship with the device. |
| 875 | // |
| 876 | // The platform will always reflect the most recent platform version and is not |
| 877 | // currently being attributized. |
| 878 | se_policy_conf { |
| 879 | name: "plat_sepolicy.conf", |
| 880 | srcs: [":se_build_files{.plat}"], |
| 881 | installable: false, |
| 882 | } |
| 883 | |
| 884 | se_policy_cil { |
| 885 | name: "plat_sepolicy.cil", |
| 886 | src: ":plat_sepolicy.conf", |
| 887 | additional_cil_files: ["private/technical_debt.cil"], |
| 888 | } |
| 889 | |
Inseob Kim | 6cc75f4 | 2021-04-29 13:53:20 +0000 | [diff] [blame] | 890 | // userdebug_plat_policy.conf - the userdebug version plat_sepolicy.cil |
| 891 | se_policy_conf { |
| 892 | name: "userdebug_plat_sepolicy.conf", |
| 893 | srcs: [":se_build_files{.plat}"], |
| 894 | build_variant: "userdebug", |
| 895 | installable: false, |
| 896 | } |
| 897 | |
| 898 | se_policy_cil { |
| 899 | name: "userdebug_plat_sepolicy.cil", |
| 900 | src: ":userdebug_plat_sepolicy.conf", |
| 901 | additional_cil_files: ["private/technical_debt.cil"], |
| 902 | debug_ramdisk: true, |
Yi-Yo Chiang | 68478b1 | 2021-10-16 03:23:05 +0800 | [diff] [blame] | 903 | dist: { |
| 904 | targets: ["droidcore"], |
| 905 | }, |
Inseob Kim | 6cc75f4 | 2021-04-29 13:53:20 +0000 | [diff] [blame] | 906 | } |
| 907 | |
Yi-Yo Chiang | 857ffc4 | 2021-09-23 14:14:16 +0000 | [diff] [blame] | 908 | // A copy of the userdebug_plat_policy in GSI. |
| 909 | soong_config_module_type { |
| 910 | name: "gsi_se_policy_cil", |
| 911 | module_type: "se_policy_cil", |
| 912 | config_namespace: "ANDROID", |
| 913 | bool_variables: [ |
| 914 | "PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT", |
| 915 | ], |
| 916 | properties: [ |
| 917 | "enabled", |
| 918 | "installable", |
| 919 | ], |
| 920 | } |
| 921 | |
| 922 | gsi_se_policy_cil { |
| 923 | name: "system_ext_userdebug_plat_sepolicy.cil", |
| 924 | stem: "userdebug_plat_sepolicy.cil", |
| 925 | src: ":userdebug_plat_sepolicy.conf", |
| 926 | additional_cil_files: ["private/technical_debt.cil"], |
| 927 | system_ext_specific: true, |
| 928 | enabled: false, |
| 929 | installable: false, |
| 930 | soong_config_variables: { |
| 931 | PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT: { |
| 932 | enabled: true, |
| 933 | installable: true, |
| 934 | }, |
| 935 | }, |
| 936 | } |
| 937 | |
Inseob Kim | a49e724 | 2021-03-22 10:26:13 +0900 | [diff] [blame] | 938 | // system_ext_policy.conf - A combination of the private and public system_ext |
| 939 | // policy which will ship with the device. System_ext policy is not attributized |
| 940 | se_policy_conf { |
| 941 | name: "system_ext_sepolicy.conf", |
| 942 | srcs: [":se_build_files{.system_ext}"], |
| 943 | installable: false, |
| 944 | } |
| 945 | |
| 946 | se_policy_cil { |
| 947 | name: "system_ext_sepolicy.cil", |
| 948 | src: ":system_ext_sepolicy.conf", |
| 949 | system_ext_specific: true, |
| 950 | filter_out: [":plat_sepolicy.cil"], |
| 951 | remove_line_marker: true, |
| 952 | } |
| 953 | |
| 954 | // product_policy.conf - A combination of the private and public product policy |
| 955 | // which will ship with the device. Product policy is not attributized |
| 956 | se_policy_conf { |
| 957 | name: "product_sepolicy.conf", |
| 958 | srcs: [":se_build_files{.product}"], |
| 959 | installable: false, |
| 960 | } |
| 961 | |
| 962 | se_policy_cil { |
| 963 | name: "product_sepolicy.cil", |
| 964 | src: ":product_sepolicy.conf", |
| 965 | product_specific: true, |
| 966 | filter_out: [":plat_sepolicy.cil", ":system_ext_sepolicy.cil"], |
| 967 | remove_line_marker: true, |
| 968 | } |
| 969 | |
Inseob Kim | 039175b | 2021-03-25 15:37:34 +0900 | [diff] [blame] | 970 | // policy mapping files |
| 971 | // auto-generate the mapping file for current platform policy, since it needs to |
| 972 | // track platform policy development |
| 973 | se_versioned_policy { |
| 974 | name: "plat_mapping_file", |
| 975 | base: ":plat_pub_policy.cil", |
| 976 | mapping: true, |
| 977 | version: "current", |
| 978 | relative_install_path: "mapping", // install to /system/etc/selinux/mapping |
| 979 | } |
| 980 | |
| 981 | se_versioned_policy { |
| 982 | name: "system_ext_mapping_file", |
| 983 | base: ":system_ext_pub_policy.cil", |
| 984 | mapping: true, |
| 985 | version: "current", |
| 986 | filter_out: [":plat_mapping_file"], |
| 987 | relative_install_path: "mapping", // install to /system_ext/etc/selinux/mapping |
| 988 | system_ext_specific: true, |
| 989 | } |
| 990 | |
| 991 | se_versioned_policy { |
| 992 | name: "product_mapping_file", |
| 993 | base: ":pub_policy.cil", |
| 994 | mapping: true, |
| 995 | version: "current", |
| 996 | filter_out: [":plat_mapping_file", ":system_ext_mapping_file"], |
| 997 | relative_install_path: "mapping", // install to /product/etc/selinux/mapping |
| 998 | product_specific: true, |
| 999 | } |
| 1000 | |
| 1001 | // plat_pub_versioned.cil - the exported platform policy associated with the version |
| 1002 | // that non-platform policy targets. |
| 1003 | se_versioned_policy { |
| 1004 | name: "plat_pub_versioned.cil", |
| 1005 | base: ":pub_policy.cil", |
| 1006 | target_policy: ":pub_policy.cil", |
| 1007 | version: "current", |
| 1008 | dependent_cils: [ |
| 1009 | ":plat_sepolicy.cil", |
| 1010 | ":system_ext_sepolicy.cil", |
| 1011 | ":product_sepolicy.cil", |
| 1012 | ":plat_mapping_file", |
| 1013 | ":system_ext_mapping_file", |
| 1014 | ":product_mapping_file", |
| 1015 | ], |
| 1016 | vendor: true, |
| 1017 | } |
| 1018 | |
| 1019 | ////////////////////////////////// |
| 1020 | // Precompiled sepolicy is loaded if and only if: |
| 1021 | // - plat_sepolicy_and_mapping.sha256 equals |
| 1022 | // precompiled_sepolicy.plat_sepolicy_and_mapping.sha256 |
| 1023 | // AND |
| 1024 | // - system_ext_sepolicy_and_mapping.sha256 equals |
| 1025 | // precompiled_sepolicy.system_ext_sepolicy_and_mapping.sha256 |
| 1026 | // AND |
| 1027 | // - product_sepolicy_and_mapping.sha256 equals |
| 1028 | // precompiled_sepolicy.product_sepolicy_and_mapping.sha256 |
| 1029 | // See system/core/init/selinux.cpp for details. |
| 1030 | ////////////////////////////////// |
| 1031 | genrule { |
| 1032 | name: "plat_sepolicy_and_mapping.sha256_gen", |
| 1033 | srcs: [":plat_sepolicy.cil", ":plat_mapping_file"], |
| 1034 | out: ["plat_sepolicy_and_mapping.sha256"], |
| 1035 | cmd: "cat $(in) | sha256sum | cut -d' ' -f1 > $(out)", |
| 1036 | } |
| 1037 | |
| 1038 | prebuilt_etc { |
| 1039 | name: "plat_sepolicy_and_mapping.sha256", |
| 1040 | filename: "plat_sepolicy_and_mapping.sha256", |
| 1041 | src: ":plat_sepolicy_and_mapping.sha256_gen", |
| 1042 | relative_install_path: "selinux", |
| 1043 | } |
| 1044 | |
| 1045 | genrule { |
| 1046 | name: "system_ext_sepolicy_and_mapping.sha256_gen", |
| 1047 | srcs: [":system_ext_sepolicy.cil", ":system_ext_mapping_file"], |
| 1048 | out: ["system_ext_sepolicy_and_mapping.sha256"], |
| 1049 | cmd: "cat $(in) | sha256sum | cut -d' ' -f1 > $(out)", |
| 1050 | } |
| 1051 | |
| 1052 | prebuilt_etc { |
| 1053 | name: "system_ext_sepolicy_and_mapping.sha256", |
| 1054 | filename: "system_ext_sepolicy_and_mapping.sha256", |
| 1055 | src: ":system_ext_sepolicy_and_mapping.sha256_gen", |
| 1056 | relative_install_path: "selinux", |
| 1057 | system_ext_specific: true, |
| 1058 | } |
| 1059 | |
| 1060 | genrule { |
| 1061 | name: "product_sepolicy_and_mapping.sha256_gen", |
| 1062 | srcs: [":product_sepolicy.cil", ":product_mapping_file"], |
| 1063 | out: ["product_sepolicy_and_mapping.sha256"], |
| 1064 | cmd: "cat $(in) | sha256sum | cut -d' ' -f1 > $(out)", |
| 1065 | } |
| 1066 | |
| 1067 | prebuilt_etc { |
| 1068 | name: "product_sepolicy_and_mapping.sha256", |
| 1069 | filename: "product_sepolicy_and_mapping.sha256", |
| 1070 | src: ":product_sepolicy_and_mapping.sha256_gen", |
| 1071 | relative_install_path: "selinux", |
| 1072 | product_specific: true, |
| 1073 | } |
| 1074 | |
Inseob Kim | 1c056b1 | 2021-04-30 00:11:43 +0900 | [diff] [blame] | 1075 | sepolicy_vers { |
| 1076 | name: "plat_sepolicy_vers.txt", |
| 1077 | version: "vendor", |
| 1078 | vendor: true, |
| 1079 | } |
| 1080 | |
Inseob Kim | 731182a | 2021-05-06 11:44:37 +0000 | [diff] [blame] | 1081 | soong_config_module_type { |
| 1082 | name: "precompiled_sepolicy_defaults", |
| 1083 | module_type: "prebuilt_defaults", |
| 1084 | config_namespace: "ANDROID", |
| 1085 | bool_variables: ["BOARD_USES_ODMIMAGE"], |
| 1086 | properties: ["vendor", "device_specific"], |
| 1087 | } |
| 1088 | |
| 1089 | precompiled_sepolicy_defaults { |
| 1090 | name: "precompiled_sepolicy", |
| 1091 | soong_config_variables: { |
| 1092 | BOARD_USES_ODMIMAGE: { |
| 1093 | device_specific: true, |
| 1094 | conditions_default: { |
| 1095 | vendor: true, |
| 1096 | }, |
| 1097 | }, |
| 1098 | }, |
| 1099 | } |
| 1100 | |
| 1101 | ////////////////////////////////// |
| 1102 | // SHA-256 digest of the plat_sepolicy.cil and plat_mapping_file against |
| 1103 | // which precompiled_policy was built. |
| 1104 | ////////////////////////////////// |
| 1105 | prebuilt_etc { |
| 1106 | defaults: ["precompiled_sepolicy"], |
| 1107 | name: "precompiled_sepolicy.plat_sepolicy_and_mapping.sha256", |
| 1108 | filename: "precompiled_sepolicy.plat_sepolicy_and_mapping.sha256", |
| 1109 | src: ":plat_sepolicy_and_mapping.sha256_gen", |
| 1110 | relative_install_path: "selinux", |
| 1111 | } |
| 1112 | |
| 1113 | ////////////////////////////////// |
| 1114 | // SHA-256 digest of the system_ext_sepolicy.cil and system_ext_mapping_file against |
| 1115 | // which precompiled_policy was built. |
| 1116 | ////////////////////////////////// |
| 1117 | prebuilt_etc { |
| 1118 | defaults: ["precompiled_sepolicy"], |
| 1119 | name: "precompiled_sepolicy.system_ext_sepolicy_and_mapping.sha256", |
| 1120 | filename: "precompiled_sepolicy.system_ext_sepolicy_and_mapping.sha256", |
| 1121 | src: ":system_ext_sepolicy_and_mapping.sha256_gen", |
| 1122 | relative_install_path: "selinux", |
| 1123 | } |
| 1124 | |
| 1125 | ////////////////////////////////// |
| 1126 | // SHA-256 digest of the product_sepolicy.cil and product_mapping_file against |
| 1127 | // which precompiled_policy was built. |
| 1128 | ////////////////////////////////// |
| 1129 | prebuilt_etc { |
| 1130 | defaults: ["precompiled_sepolicy"], |
| 1131 | name: "precompiled_sepolicy.product_sepolicy_and_mapping.sha256", |
| 1132 | filename: "precompiled_sepolicy.product_sepolicy_and_mapping.sha256", |
| 1133 | src: ":product_sepolicy_and_mapping.sha256_gen", |
| 1134 | relative_install_path: "selinux", |
| 1135 | } |
| 1136 | |
| 1137 | |
Inseob Kim | a49e724 | 2021-03-22 10:26:13 +0900 | [diff] [blame] | 1138 | ////////////////////////////////// |
| 1139 | // SELinux policy embedded into CTS. |
| 1140 | // CTS checks neverallow rules of this policy against the policy of the device under test. |
| 1141 | ////////////////////////////////// |
| 1142 | se_policy_conf { |
| 1143 | name: "general_sepolicy.conf", |
| 1144 | srcs: [":se_build_files{.plat}"], |
| 1145 | build_variant: "user", |
| 1146 | cts: true, |
| 1147 | exclude_build_test: true, |
| 1148 | } |
Inseob Kim | d581661 | 2021-09-15 03:01:05 +0000 | [diff] [blame] | 1149 | |
| 1150 | ////////////////////////////////// |
Inseob Kim | 4d90b7e | 2021-09-27 13:43:01 +0000 | [diff] [blame] | 1151 | // Base system policy for treble sepolicy tests. |
| 1152 | // If system sepolicy is extended (e.g. by SoC vendors), their plat_pub_versioned.cil may differ |
| 1153 | // with system/sepolicy/prebuilts/api/{version}/plat_pub_versioned.cil. In that case, |
| 1154 | // BOARD_PLAT_PUB_VERSIONED_POLICY can be used to specify extended plat_pub_versioned.cil. |
| 1155 | // See treble_sepolicy_tests_for_release.mk for more details. |
| 1156 | ////////////////////////////////// |
| 1157 | se_policy_conf { |
| 1158 | name: "base_plat_sepolicy.conf", |
| 1159 | srcs: [":se_build_files{.plat}"], |
| 1160 | build_variant: "user", |
| 1161 | installable: false, |
| 1162 | } |
| 1163 | |
| 1164 | se_policy_cil { |
| 1165 | name: "base_plat_sepolicy.cil", |
| 1166 | src: ":base_plat_sepolicy.conf", |
| 1167 | additional_cil_files: ["private/technical_debt.cil"], |
| 1168 | installable: false, |
| 1169 | secilc_check: false, // done by se_policy_binary |
| 1170 | } |
| 1171 | |
| 1172 | se_policy_binary { |
| 1173 | name: "base_plat_sepolicy", |
| 1174 | srcs: [":base_plat_sepolicy.cil"], |
| 1175 | installable: false, |
| 1176 | } |
| 1177 | |
| 1178 | se_policy_conf { |
| 1179 | name: "base_system_ext_sepolicy.conf", |
| 1180 | srcs: [":se_build_files{.system_ext}"], |
| 1181 | build_variant: "user", |
| 1182 | installable: false, |
| 1183 | } |
| 1184 | |
| 1185 | se_policy_cil { |
| 1186 | name: "base_system_ext_sepolicy.cil", |
| 1187 | src: ":base_system_ext_sepolicy.conf", |
| 1188 | additional_cil_files: ["private/technical_debt.cil"], |
| 1189 | system_ext_specific: true, |
| 1190 | installable: false, |
| 1191 | secilc_check: false, // done by se_policy_binary |
| 1192 | } |
| 1193 | |
| 1194 | se_policy_binary { |
| 1195 | name: "base_system_ext_sepolicy", |
| 1196 | srcs: [":base_system_ext_sepolicy.cil"], |
| 1197 | system_ext_specific: true, |
| 1198 | installable: false, |
| 1199 | } |
| 1200 | |
| 1201 | se_policy_conf { |
| 1202 | name: "base_product_sepolicy.conf", |
| 1203 | srcs: [":se_build_files{.product}"], |
| 1204 | build_variant: "user", |
| 1205 | installable: false, |
| 1206 | } |
| 1207 | |
| 1208 | se_policy_cil { |
| 1209 | name: "base_product_sepolicy.cil", |
| 1210 | src: ":base_product_sepolicy.conf", |
| 1211 | additional_cil_files: ["private/technical_debt.cil"], |
| 1212 | product_specific: true, |
| 1213 | installable: false, |
| 1214 | secilc_check: false, // done by se_policy_binary |
| 1215 | } |
| 1216 | |
| 1217 | se_policy_binary { |
| 1218 | name: "base_product_sepolicy", |
| 1219 | srcs: [":base_product_sepolicy.cil"], |
| 1220 | product_specific: true, |
| 1221 | installable: false, |
| 1222 | } |
| 1223 | |
| 1224 | se_policy_conf { |
| 1225 | name: "base_plat_pub_policy.conf", |
| 1226 | srcs: [":se_build_files{.plat_public}"], |
| 1227 | build_variant: "user", |
| 1228 | installable: false, |
| 1229 | } |
| 1230 | |
| 1231 | se_policy_cil { |
| 1232 | name: "base_plat_pub_policy.cil", |
| 1233 | src: ":base_plat_pub_policy.conf", |
| 1234 | filter_out: [":reqd_policy_mask.cil"], |
| 1235 | secilc_check: false, |
| 1236 | installable: false, |
| 1237 | } |
| 1238 | |
| 1239 | se_policy_conf { |
| 1240 | name: "base_system_ext_pub_policy.conf", |
| 1241 | srcs: [":se_build_files{.system_ext_public}"], // system_ext_public includes system |
| 1242 | build_variant: "user", |
| 1243 | installable: false, |
| 1244 | } |
| 1245 | |
| 1246 | se_policy_cil { |
| 1247 | name: "base_system_ext_pub_policy.cil", |
| 1248 | src: ":base_system_ext_pub_policy.conf", |
| 1249 | filter_out: [":reqd_policy_mask.cil"], |
| 1250 | secilc_check: false, |
| 1251 | installable: false, |
| 1252 | } |
| 1253 | |
| 1254 | se_policy_conf { |
| 1255 | name: "base_product_pub_policy.conf", |
| 1256 | srcs: [":se_build_files{.product_public}"], // product_ includes system and system_ext |
| 1257 | build_variant: "user", |
| 1258 | installable: false, |
| 1259 | } |
| 1260 | |
| 1261 | se_policy_cil { |
| 1262 | name: "base_product_pub_policy.cil", |
| 1263 | src: ":base_product_pub_policy.conf", |
| 1264 | filter_out: [":reqd_policy_mask.cil"], |
| 1265 | secilc_check: false, |
| 1266 | installable: false, |
| 1267 | } |
| 1268 | |
Yi-Yo Chiang | 2c18965 | 2021-11-08 19:30:04 +0800 | [diff] [blame] | 1269 | // bug_map - Bug tracking information for selinux denials loaded by auditd. |
| 1270 | se_filegroup { |
| 1271 | name: "bug_map_files", |
| 1272 | srcs: ["bug_map"], |
| 1273 | } |
| 1274 | |
| 1275 | se_bug_map { |
| 1276 | name: "plat_bug_map", |
| 1277 | srcs: [":bug_map_files"], |
| 1278 | stem: "bug_map", |
| 1279 | } |
| 1280 | |
| 1281 | se_bug_map { |
| 1282 | name: "system_ext_bug_map", |
| 1283 | srcs: [":bug_map_files"], |
| 1284 | stem: "bug_map", |
| 1285 | system_ext_specific: true, |
| 1286 | } |
| 1287 | |
| 1288 | se_bug_map { |
| 1289 | name: "vendor_bug_map", |
| 1290 | srcs: [":bug_map_files"], |
| 1291 | // Legacy file name of the vendor partition bug_map. |
| 1292 | stem: "selinux_denial_metadata", |
| 1293 | vendor: true, |
| 1294 | } |
| 1295 | |
Inseob Kim | 4d90b7e | 2021-09-27 13:43:01 +0000 | [diff] [blame] | 1296 | ////////////////////////////////// |
Inseob Kim | d581661 | 2021-09-15 03:01:05 +0000 | [diff] [blame] | 1297 | // se_freeze_test compares the plat sepolicy with the prebuilt sepolicy |
| 1298 | // Additional directories can be specified via Makefile variables: |
| 1299 | // SEPOLICY_FREEZE_TEST_EXTRA_DIRS and SEPOLICY_FREEZE_TEST_EXTRA_PREBUILT_DIRS. |
| 1300 | ////////////////////////////////// |
| 1301 | se_freeze_test { |
| 1302 | name: "sepolicy_freeze_test", |
| 1303 | } |
Yuntao Xu | 42e732c | 2021-11-18 22:33:02 +0000 | [diff] [blame] | 1304 | |
| 1305 | ////////////////////////////////// |
| 1306 | // Makefile rules temporary imported to Soong |
| 1307 | // TODO(b/33691272): remove these after migrating seapp to Soong |
| 1308 | ////////////////////////////////// |
| 1309 | makefile_goal { |
| 1310 | name: "plat_seapp_contexts_rule", |
| 1311 | product_out_path: "obj/ETC/plat_seapp_contexts_intermediates/plat_seapp_contexts", |
| 1312 | } |
| 1313 | |
| 1314 | makefile_goal { |
| 1315 | name: "plat_seapp_neverallows_rule", |
| 1316 | product_out_path: "obj/ETC/plat_seapp_neverallows_intermediates/plat_seapp_neverallows", |
| 1317 | } |