From 768fef104a655208a7d5e039dced8c3074564a4b Mon Sep 17 00:00:00 2001 From: Nicholas Lim Date: Sun, 5 Apr 2020 03:35:57 +0800 Subject: [PATCH] sepolicy: Resolve denials from setting swappiness Change-Id: I20c6e2b60ce3a7802992aa7dca767efbd7480f6f --- sepolicy/file.te | 3 +++ sepolicy/genfs_contexts | 1 + sepolicy/vendor_init.te | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 sepolicy/genfs_contexts create mode 100644 sepolicy/vendor_init.te diff --git a/sepolicy/file.te b/sepolicy/file.te index bb06b524..6e138281 100644 --- a/sepolicy/file.te +++ b/sepolicy/file.te @@ -1,3 +1,6 @@ +# /proc +type proc_swap, fs_type; + # /sys type sysfs_als, fs_type, sysfs_type; type sysfs_block_iosched, fs_type, sysfs_type; diff --git a/sepolicy/genfs_contexts b/sepolicy/genfs_contexts new file mode 100644 index 00000000..4d11cd6e --- /dev/null +++ b/sepolicy/genfs_contexts @@ -0,0 +1 @@ +genfscon proc /sys/vm/swappiness u:object_r:proc_swap:s0 diff --git a/sepolicy/vendor_init.te b/sepolicy/vendor_init.te new file mode 100644 index 00000000..e7e70e48 --- /dev/null +++ b/sepolicy/vendor_init.te @@ -0,0 +1,2 @@ +#============= vendor_init ============== +allow vendor_init proc_swap:file write;