Merge "Replace MALLOC_IMPL with MALLOC_SVELTE."
diff --git a/sepolicy/bluetooth.te b/sepolicy/bluetooth.te
index 3cae60c..d5d6e04 100644
--- a/sepolicy/bluetooth.te
+++ b/sepolicy/bluetooth.te
@@ -1 +1,2 @@
-allow bluetooth bluetooth_control:chr_file { rw_file_perms };
\ No newline at end of file
+allow bluetooth bluetooth_control:chr_file { rw_file_perms };
+allow bluetooth sysfs_bluetooth:file r_file_perms;
diff --git a/sepolicy/file.te b/sepolicy/file.te
index aa203bc..b650049 100644
--- a/sepolicy/file.te
+++ b/sepolicy/file.te
@@ -1,5 +1,8 @@
 type bluetooth_control, dev_type;
 
+type sysfs_bluetooth, fs_type, sysfs_type;
+
+type sysfs_thermal_uevent, fs_type, sysfs_type;
 type sysfs_thermal_writable, fs_type, sysfs_type;
 
 type atvr_device, dev_type;
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index a750600..2cd08ef 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -10,13 +10,18 @@
 /system/vendor/bin/pvrsrvctl u:object_r:pvrsrvctl_exec:s0
 /system/bin/BtFwLoader       u:object_r:btfwloader_exec:s0
 
+/sys/devices/pci0000:00/0000:00:01\.3/mmc_host/mmc2/mmc2:0001/mmc2:0001:2/ieee80211/phy[0-9]+/rfkill[0-9]+/type  u:object_r:sysfs_bluetooth:s0
+/sys/devices/pci0000:00/0000:00:01\.3/mmc_host/mmc2/mmc2:0001/mmc2:0001:2/rfkill/rfkill[0-9]+/type  u:object_r:sysfs_bluetooth:s0
 /sys/devices/platform/bcm_bt_lpm.0/rfkill/rfkill[0-9]/state     u:object_r:sysfs_bluetooth_writable:s0
 /sys/devices/platform/bcm_bt_lpm.0/rfkill/rfkill[0-9]/type      u:object_r:sysfs_bluetooth_writable:s0
 
-/sys/devices/virtual/thermal/cooling_device[0-2]/cur_state      u:object_r:sysfs_thermal_writable:s0
-/sys/devices/virtual/thermal/thermal_zone[6-7]/emul_temp      u:object_r:sysfs_thermal_writable:s0
+/sys/devices/virtual/thermal/cooling_device[0-2]/[^/]+      u:object_r:sysfs_thermal_writable:s0
+/sys/devices/virtual/thermal/cooling_device[0-2]/uevent      u:object_r:sysfs_thermal_uevent:s0
+/sys/devices/virtual/thermal/thermal_zone[0-7]/[^/]+      u:object_r:sysfs_thermal_writable:s0
+/sys/devices/virtual/thermal/thermal_zone[0-7]/uevent     u:object_r:sysfs_thermal_uevent:s0
 /sys/module/intel_mid_osip/parameters/force_shutdown_occured    u:object_r:sysfs_thermal_writable:s0
-/sys/devices/platform/coretemp.0/temp[2-5]_threshold[1-2]    u:object_r:sysfs_coretemp:s0
+
+/sys/devices/platform/coretemp\.0/temp[2-5]_[^/]+                    u:object_r:sysfs_coretemp:s0
 
 /dev/block/pci/pci0000:00/0000:00:01\.0/by-name/system         u:object_r:system_block_device:s0
 /dev/block/pci/pci0000:00/0000:00:01\.0/by-name/cache          u:object_r:cache_block_device:s0
diff --git a/sepolicy/ueventd.te b/sepolicy/ueventd.te
new file mode 100644
index 0000000..36dd564
--- /dev/null
+++ b/sepolicy/ueventd.te
@@ -0,0 +1 @@
+allow ueventd sysfs_thermal_uevent:file w_file_perms;