1# Copyright (c) 2023 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14#avc:  denied {write} for comm="foundation" name="userlist" dev="sysfs" ino=80052 scontext=u:r:foundation:s0 tcontext=u:object_r:sysfs_hungtask_userlist:s0 tclass=file permissive=1
15#avc:  denied {ioctl} for pid=1088 comm="DfxWatchdog" path="/sys/kernel/hungtask/userlist" dev="sysfs" ino=80052 ioctlcmd=0x5413 scontext=u:r:foundation:s0 tcontext=u:object_r:sysfs_hungtask_userlist:s0 tclass=file permissive=1
16#avc:  denied {getattr} for pid=1088 comm="DfxWatchdog" path="/sys/kernel/hungtask/userlist" dev="sysfs" ino=80052 scontext=u:r:foundation:s0 tcontext=u:object_r:sysfs_hungtask_userlist:s0 tclass=file permissive=1
17allow foundation sysfs_hungtask_userlist:file { open write ioctl getattr };
18
19#avc:  denied { read } for pid=4718 comm="/bin/param" path="/dev/__parameters__/u:object_r:hiviewdfx_hiview_param:s0" dev="" ino=239 scontext=u:r:foundation:s0 tcontext=u:object_r:hiviewdfx_hiview_param:s0 tclass=file permissive=1
20#avc:  denied { open } for pid=4718 comm="/bin/param" path="/dev/__parameters__/u:object_r:hiviewdfx_hiview_param:s0" dev="" ino=239 scontext=u:r:foundation:s0 tcontext=u:object_r:hiviewdfx_hiview_param:s0 tclass=file permissive=1
21allow foundation hiviewdfx_hiview_param:file { map open read };
22
23#avc:  denied { write } for pid=6966 comm="/system/bin/sa_main" path="/data/log/eventlog/freeze" dev="/dev/block/platform/fa500000.ufs/by-name/userdata" ino=17796 scontext=u:r:foundation:s0 tcontext=u:object_r:data_log:s0 tclass=dir permissive=1
24#avc:  denied { setattr } for pid=6966 comm="/system/bin/sa_main" path="/data/log/eventlog/freeze" dev="/dev/block/platform/fa500000.ufs/by-name/userdata" ino=17796 scontext=u:r:foundation:s0 tcontext=u:object_r:data_log:s0 tclass=dir permissive=1
25#avc:  denied { add_name } for pid=6966 comm="/system/bin/sa_main" path="/data/log/eventlog/freeze" dev="/dev/block/platform/fa500000.ufs/by-name/userdata" ino=17796 scontext=u:r:foundation:s0 tcontext=u:object_r:data_log:s0 tclass=dir permissive=1
26#avc:  denied { create } for pid=6966 comm="/system/bin/sa_main" path="/data/log/eventlog/freeze" dev="/dev/block/platform/fa500000.ufs/by-name/userdata" ino=17796 scontext=u:r:foundation:s0 tcontext=u:object_r:data_log:s0 tclass=dir permissive=1
27#avc:  denied { open } for pid=6966 comm="/system/bin/sa_main" path="/data/log/eventlog/freeze" dev="/dev/block/platform/fa500000.ufs/by-name/userdata" ino=17796 scontext=u:r:foundation:s0 tcontext=u:object_r:data_log:s0 tclass=dir permissive=1
28#avc:  denied { read } for pid=6966 comm="/system/bin/sa_main" path="/data/log/eventlog/freeze" dev="/dev/block/platform/fa500000.ufs/by-name/userdata" ino=17796 scontext=u:r:foundation:s0 tcontext=u:object_r:data_log:s0 tclass=dir permissive=1
29allow foundation data_log:dir { write setattr add_name create open read };
30#avc:  denied { read } for pid=6966 comm="/system/bin/sa_main" path="/data/log/eventlog/freeze" dev="/dev/block/platform/fa500000.ufs/by-name/userdata" ino=17796 scontext=u:r:foundation:s0 tcontext=u:object_r:data_log:s0 tclass=file permissive=1
31#avc:  denied { write } for pid=6966 comm="/system/bin/sa_main" path="/data/log/eventlog/freeze" dev="/dev/block/platform/fa500000.ufs/by-name/userdata" ino=17796 scontext=u:r:foundation:s0 tcontext=u:object_r:data_log:s0 tclass=file permissive=1
32#avc:  denied { create } for pid=6966 comm="/system/bin/sa_main" path="/data/log/eventlog/freeze" dev="/dev/block/platform/fa500000.ufs/by-name/userdata" ino=17796 scontext=u:r:foundation:s0 tcontext=u:object_r:data_log:s0 tclass=file permissive=1
33#avc:  denied { setattr } for pid=6966 comm="/system/bin/sa_main" path="/data/log/eventlog/freeze" dev="/dev/block/platform/fa500000.ufs/by-name/userdata" ino=17796 scontext=u:r:foundation:s0 tcontext=u:object_r:data_log:s0 tclass=file permissive=1
34#avc:  denied { getattr } for pid=6966 comm="/system/bin/sa_main" path="/data/log/eventlog/freeze" dev="/dev/block/platform/fa500000.ufs/by-name/userdata" ino=17796 scontext=u:r:foundation:s0 tcontext=u:object_r:data_log:s0 tclass=file permissive=1
35#avc:  denied { open } for pid=6966 comm="/system/bin/sa_main" path="/data/log/eventlog/freeze" dev="/dev/block/platform/fa500000.ufs/by-name/userdata" ino=17796 scontext=u:r:foundation:s0 tcontext=u:object_r:data_log:s0 tclass=file permissive=1
36#avc:  denied { append } for pid=6966 comm="/system/bin/sa_main" path="/data/log/eventlog/freeze" dev="/dev/block/platform/fa500000.ufs/by-name/userdata" ino=17796 scontext=u:r:foundation:s0 tcontext=u:object_r:data_log:s0 tclass=file permissive=1
37#avc:  denied { ioctl } for pid=6966 comm="/system/bin/sa_main" path="/data/log/eventlog/freeze" dev="/dev/block/platform/fa500000.ufs/by-name/userdata" ino=17796 ioctlcmd=0x5413 scontext=u:r:foundation:s0 tcontext=u:object_r:data_log:s0 tclass=file permissive=1
38allow foundation data_log:file { ioctl read write create setattr getattr open append };
39allowxperm foundation data_log:file ioctl { 0x5413 };
40
41allow foundation hiview:fd { use };
42#avc:  denied { write } for pid=1431 comm="/system/bin/sa_main" path="pipe:[4036]" dev="tmpfs" ino=4036 scontext=u:r:foundation:s0 tcontext=u:r:hiview:s0 tclass=fifo_file permissive=1
43allow foundation hiview:fifo_file { write };
44
45#avc:  denied { open } for pid=1386 comm="/system/bin/sa_main" path="/proc/meminfo" dev="" ino=5 scontext=u:r:foundation:s0 tcontext=u:object_r:proc_meminfo_file:s0 tclass=file permissive=1
46#avc:  denied { getattr } for pid=1386 comm="/system/bin/sa_main" path="/proc/meminfo" dev="" ino=5 ioctlcmd=0x5413 scontext=u:r:foundation:s0 tcontext=u:object_r:proc_meminfo_file:s0 tclass=file permissive=1
47allow foundation proc_meminfo_file:file { open getattr read };
48
49allow foundation hiview_file:file { write };
50