blob: b9cef64565f99e5af7432b0ad7bc65e08f14b4a3 [file] [log] [blame]
Inseob Kim085f22f2023-11-09 11:13:01 +09001// Copyright (C) 2023 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
Inseob Kimbf7f4a42024-02-14 13:53:39 +090015// This module contains a list of build time flags (defined on AOSP) for sepolicy.
16// Additional se_flags modules can be added anywhere for additional flags.
17se_flags {
18 name: "aosp_selinux_flags",
Chienyuan Huang2e19c762023-12-03 07:39:48 +000019 flags: [
Jeongik Chaf09f43c2024-04-02 14:50:14 +090020 "RELEASE_AVF_SUPPORT_CUSTOM_VM_WITH_PARAVIRTUALIZED_DEVICES",
Inseob Kim9c0d7122024-07-22 18:04:18 +090021 "RELEASE_AVF_ENABLE_EARLY_VM",
Chienyuan Huang2e19c762023-12-03 07:39:48 +000022 "RELEASE_AVF_ENABLE_DEVICE_ASSIGNMENT",
Alan Stokes38131e72024-02-20 11:06:37 +000023 "RELEASE_AVF_ENABLE_LLPVM_CHANGES",
Seungjae Yoof60a1e02024-05-20 14:15:22 +090024 "RELEASE_AVF_ENABLE_NETWORK",
Aidan Wolter56d74cd2024-08-20 19:19:37 +000025 "RELEASE_AVF_ENABLE_MICROFUCHSIA",
Nikita Ioffe48966b62024-10-22 14:01:17 +000026 "RELEASE_AVF_ENABLE_VM_TO_TEE_SERVICES_ALLOWLIST",
Orlando Arbildodf3a5962024-10-21 23:10:11 +000027 "RELEASE_AVF_ENABLE_WIDEVINE_PVM",
Shreshta Manu7ce9b2a2024-09-18 03:39:01 +000028 "RELEASE_RANGING_STACK",
Ted Bauereaeb65f2024-07-01 19:36:21 +000029 "RELEASE_READ_FROM_NEW_STORAGE",
Roman Kalukiewiczd416f1b2024-08-06 00:18:32 +000030 "RELEASE_SUPERVISION_SERVICE",
Chienyuan Huang2e19c762023-12-03 07:39:48 +000031 "RELEASE_HARDWARE_BLUETOOTH_RANGING_SERVICE",
Ellen Arteca27b515e2024-04-30 20:26:55 +000032 "RELEASE_UNLOCKED_STORAGE_API",
Liang Li3e5d33e2024-10-23 01:44:49 +000033 "RELEASE_BLUETOOTH_SOCKET_SERVICE",
Victor Hsiehbf074d22025-03-14 11:18:22 -070034 "RELEASE_SEPOLICY_RESTRICT_KERNEL_KEYRING_SEARCH",
Chienyuan Huang2e19c762023-12-03 07:39:48 +000035 ],
Inseob Kimbf7f4a42024-02-14 13:53:39 +090036 export_to: ["all_selinux_flags"],
37}
38
39// se_flags_collector collects flags from exported se_flags modules and converts it to build flags.
40se_flags_collector {
41 name: "all_selinux_flags",
42}
43
44se_policy_conf_defaults {
45 name: "se_policy_conf_flags_defaults",
46 srcs: [":sepolicy_flagging_macros"],
47 build_flags: ["all_selinux_flags"],
Inseob Kim085f22f2023-11-09 11:13:01 +090048}
49
50contexts_defaults {
51 name: "contexts_flags_defaults",
52 srcs: [":sepolicy_flagging_macros"],
53 neverallow_files: [":sepolicy_flagging_macros"], // for seapp_contexts
Inseob Kimbf7f4a42024-02-14 13:53:39 +090054 build_flags: ["all_selinux_flags"],
Inseob Kim085f22f2023-11-09 11:13:01 +090055}
56
57filegroup {
58 name: "sepolicy_flagging_macros",
Inseob Kim113f4d62024-07-18 11:29:51 +090059 srcs: ["flagging_macros"],
Inseob Kim085f22f2023-11-09 11:13:01 +090060}