Fix denials during bugreport.

Bug: 124465994
Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t
android.security.cts.SELinuxHostTest#testNoBugreportDenials
Test: Build all policies.

Change-Id: Ic20b1e0fd3a8bdea408d66f33351b1f5ebc5d84c
(cherry picked from commit f24854f8e859803600b34ecb07be8a449cacc0b0)
diff --git a/private/compat/28.0/28.0.cil b/private/compat/28.0/28.0.cil
index cc3502b..18604bc 100644
--- a/private/compat/28.0/28.0.cil
+++ b/private/compat/28.0/28.0.cil
@@ -1538,6 +1538,7 @@
 (typeattributeset swap_block_device_28_0 (swap_block_device))
 (typeattributeset sysfs_28_0
   ( sysfs
+    sysfs_devices_block
     sysfs_extcon
     sysfs_loop))
 (typeattributeset sysfs_android_usb_28_0 (sysfs_android_usb))
diff --git a/private/genfs_contexts b/private/genfs_contexts
index 8700dc0..9eeb43a 100644
--- a/private/genfs_contexts
+++ b/private/genfs_contexts
@@ -111,6 +111,7 @@
 genfscon sysfs /class/switch                      u:object_r:sysfs_switch:s0
 genfscon sysfs /devices/platform/nfc-power/nfc_power u:object_r:sysfs_nfc_power_writable:s0
 genfscon sysfs /devices/virtual/android_usb     u:object_r:sysfs_android_usb:s0
+genfscon sysfs /devices/virtual/block/            u:object_r:sysfs_devices_block:s0
 genfscon sysfs /devices/virtual/block/dm-       u:object_r:sysfs_dm:s0
 genfscon sysfs /devices/virtual/block/loop       u:object_r:sysfs_loop:s0
 genfscon sysfs /devices/virtual/block/zram0     u:object_r:sysfs_zram:s0
diff --git a/public/dumpstate.te b/public/dumpstate.te
index 3e18b5d..0bd6f83 100644
--- a/public/dumpstate.te
+++ b/public/dumpstate.te
@@ -92,6 +92,7 @@
 allow dumpstate sysfs_type:dir r_dir_perms;
 
 allow dumpstate {
+  sysfs_devices_block
   sysfs_dm
   sysfs_loop
   sysfs_usb
@@ -102,6 +103,8 @@
 allow dumpstate debugfs:file r_file_perms;
 auditallow dumpstate debugfs:file r_file_perms;
 
+allow dumpstate debugfs_mmc:file r_file_perms;
+
 # df for
 allow dumpstate {
   block_device
diff --git a/public/file.te b/public/file.te
index bdcaae7..514f23d 100644
--- a/public/file.te
+++ b/public/file.te
@@ -73,6 +73,7 @@
 type sysfs_uio, sysfs_type, fs_type;
 type sysfs_batteryinfo, fs_type, sysfs_type;
 type sysfs_bluetooth_writable, fs_type, sysfs_type, mlstrustedobject;
+type sysfs_devices_block, fs_type, sysfs_type;
 type sysfs_dm, fs_type, sysfs_type;
 type sysfs_dt_firmware_android, fs_type, sysfs_type;
 type sysfs_extcon, fs_type, sysfs_type;