From dee896c00032abf2faf2f1593626d365f8d874b9 Mon Sep 17 00:00:00 2001 From: wenlong_12 Date: Tue, 27 Jun 2023 10:24:24 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9bytrace=E4=B8=BAhitrace?= =?UTF-8?q?=E5=90=8E=E6=B7=BB=E5=8A=A0selinux=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wenlong_12 Change-Id: I6a1a1f4f5947512aaa60acebe83930bf674aea9d --- .../developtools/profiler/system/hitrace.te | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sepolicy/ohos_policy/developtools/profiler/system/hitrace.te diff --git a/sepolicy/ohos_policy/developtools/profiler/system/hitrace.te b/sepolicy/ohos_policy/developtools/profiler/system/hitrace.te new file mode 100644 index 000000000..dae8787cf --- /dev/null +++ b/sepolicy/ohos_policy/developtools/profiler/system/hitrace.te @@ -0,0 +1,55 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License + +allow hitrace hiprofiler_plugins:fifo_file read; +allow hitrace hiprofiler_plugins:unix_stream_socket { read write }; +allow hitrace hiprofilerd:fd use; + +allow hitrace hiprofiler_plugins:fd use; +allow hitrace hiprofiler_plugins:fifo_file write; + +allow hitrace domain:file { map open read write }; + +allow hitrace data_local_tmp:dir read; + +allow hitrace const_param:file { read map open }; +allow hitrace hw_sc_build_os_param:file map; +allow hitrace init_param:file { map open read }; +allow hitrace init_svc_param:file { map open read }; +allow hitrace ohos_boot_param:file open; +allow hitrace tmpfs:file { read write }; + +allow hitrace const_postinstall_fstab_param:file { read map open }; +allow hitrace const_postinstall_param:file { read map open }; + +allow hitrace bootevent_param:file { read map open }; +allow hitrace build_version_param:file { read map open }; +allow hitrace const_build_param:file { read map open }; +allow hitrace const_product_param:file { read map open }; +allow hitrace debug_param:file { read map open }; +allow hitrace hilog_param:file { read map open }; +allow hitrace persist_param:file { read map open }; +allow hitrace persist_sys_param:file { read map open }; +allow hitrace security_param:file { read map open }; +allow hitrace startup_param:file { read map open }; + +allow hitrace bootevent_samgr_param:file { read map open }; +allow hitrace const_display_brightness_param:file { read map open }; +allow hitrace default_param:file { read map open }; +allow hitrace distributedsche_param:file { read map open }; +allow hitrace input_pointer_device_param:file { read map open }; + +allow hitrace hiprofiler_plugins:fifo_file ioctl; + +allow hitrace const_allow_mock_param:file { read map open }; +allow hitrace const_allow_param:file { read map open }; From 62ecc37640fc18368fe44b94fdbe498501c6e37f Mon Sep 17 00:00:00 2001 From: wenlong_12 Date: Tue, 27 Jun 2023 07:24:25 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wenlong_12 --- .../developtools/profiler/system/hitrace.te | 40 +------------------ 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/sepolicy/ohos_policy/developtools/profiler/system/hitrace.te b/sepolicy/ohos_policy/developtools/profiler/system/hitrace.te index dae8787cf..31e5ff2b5 100644 --- a/sepolicy/ohos_policy/developtools/profiler/system/hitrace.te +++ b/sepolicy/ohos_policy/developtools/profiler/system/hitrace.te @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -14,42 +14,6 @@ allow hitrace hiprofiler_plugins:fifo_file read; allow hitrace hiprofiler_plugins:unix_stream_socket { read write }; allow hitrace hiprofilerd:fd use; - allow hitrace hiprofiler_plugins:fd use; allow hitrace hiprofiler_plugins:fifo_file write; - -allow hitrace domain:file { map open read write }; - -allow hitrace data_local_tmp:dir read; - -allow hitrace const_param:file { read map open }; -allow hitrace hw_sc_build_os_param:file map; -allow hitrace init_param:file { map open read }; -allow hitrace init_svc_param:file { map open read }; -allow hitrace ohos_boot_param:file open; -allow hitrace tmpfs:file { read write }; - -allow hitrace const_postinstall_fstab_param:file { read map open }; -allow hitrace const_postinstall_param:file { read map open }; - -allow hitrace bootevent_param:file { read map open }; -allow hitrace build_version_param:file { read map open }; -allow hitrace const_build_param:file { read map open }; -allow hitrace const_product_param:file { read map open }; -allow hitrace debug_param:file { read map open }; -allow hitrace hilog_param:file { read map open }; -allow hitrace persist_param:file { read map open }; -allow hitrace persist_sys_param:file { read map open }; -allow hitrace security_param:file { read map open }; -allow hitrace startup_param:file { read map open }; - -allow hitrace bootevent_samgr_param:file { read map open }; -allow hitrace const_display_brightness_param:file { read map open }; -allow hitrace default_param:file { read map open }; -allow hitrace distributedsche_param:file { read map open }; -allow hitrace input_pointer_device_param:file { read map open }; - -allow hitrace hiprofiler_plugins:fifo_file ioctl; - -allow hitrace const_allow_mock_param:file { read map open }; -allow hitrace const_allow_param:file { read map open }; +allow hitrace hiprofiler_plugins:fifo_file ioctl; \ No newline at end of file From 7c93a24a8a8257f1a022b0340b32afda53ae4083 Mon Sep 17 00:00:00 2001 From: wenlong_12 Date: Tue, 27 Jun 2023 08:00:52 +0000 Subject: [PATCH 3/3] add empty line Signed-off-by: wenlong_12 --- sepolicy/ohos_policy/developtools/profiler/system/hitrace.te | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sepolicy/ohos_policy/developtools/profiler/system/hitrace.te b/sepolicy/ohos_policy/developtools/profiler/system/hitrace.te index 31e5ff2b5..c41abba55 100644 --- a/sepolicy/ohos_policy/developtools/profiler/system/hitrace.te +++ b/sepolicy/ohos_policy/developtools/profiler/system/hitrace.te @@ -16,4 +16,4 @@ allow hitrace hiprofiler_plugins:unix_stream_socket { read write }; allow hitrace hiprofilerd:fd use; allow hitrace hiprofiler_plugins:fd use; allow hitrace hiprofiler_plugins:fifo_file write; -allow hitrace hiprofiler_plugins:fifo_file ioctl; \ No newline at end of file +allow hitrace hiprofiler_plugins:fifo_file ioctl;