Remove regex and label the whole directory.

This is cleaner, as it allows us to remove a regex and label the
entire directory, and it will hopefully improve performance.

Bug: 74209458
Bug: 74366296
Test: Boot device, verify file labels, and test wifi and camera.
Test: Locally flashed OTA by following go/manual-ab-ota.
Test: Locally tested updated_verifier by following b/74366296#comment8.
Merged-In: I4d269d98e5ac6ef6964145f4aeba2464508b942e
Change-Id: Ifb61807799c6319868e547725947c41ed667d73a
(cherry picked from commit 003eddfb08975b6773d6d80e2ab538ea737f83a0)
diff --git a/sepolicy/dumpstate.te b/sepolicy/dumpstate.te
index 8b9a564..06f113a 100644
--- a/sepolicy/dumpstate.te
+++ b/sepolicy/dumpstate.te
@@ -6,6 +6,6 @@
 # For collecting bugreports.
 allow dumpstate sysfs_scsi_devices_0000:file r_file_perms;
 allow dumpstate sysfs_scsi_devices_other:file r_file_perms;
-allow dumpstate sysfs_devices_block_stat:file r_file_perms;
+allow dumpstate sysfs_devices_block:file r_file_perms;
 allow dumpstate persist_file:dir getattr;
 dontaudit dumpstate kernel:system module_request;
diff --git a/sepolicy/file.te b/sepolicy/file.te
index 3d7d750..876e7d8 100644
--- a/sepolicy/file.te
+++ b/sepolicy/file.te
@@ -37,7 +37,7 @@
 type sysfs_diag, fs_type, sysfs_type;
 type sysfs_scsi_devices_0000, sysfs_type, fs_type;
 type sysfs_scsi_devices_other, sysfs_type, fs_type;
-type sysfs_devices_block_stat, sysfs_type, fs_type;
+type sysfs_devices_block, sysfs_type, fs_type;
 # b/70518189 vDSO experiments
 type sysfs_vdso, fs_type, sysfs_type;
 
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 3e67179..198c7ee 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -208,5 +208,3 @@
 
 # b/70518189 vDSO experiments
 /sys/module/vdso/parameters  u:object_r:sysfs_vdso:s0
-
-/sys/devices/virtual/block/.*/stat u:object_r:sysfs_devices_block_stat:s0
diff --git a/sepolicy/genfs_contexts b/sepolicy/genfs_contexts
index 73a078a..670ec8a 100644
--- a/sepolicy/genfs_contexts
+++ b/sepolicy/genfs_contexts
@@ -69,6 +69,7 @@
 genfscon sysfs /devices/soc/624000.ufshc/host0/target0:0:0/0:0:0:5    u:object_r:sysfs_scsi_devices_other:s0
 genfscon sysfs /devices/soc/624000.ufshc/health                       u:object_r:sysfs_scsi_devices_0000:s0
 genfscon sysfs /module/diagchar                       u:object_r:sysfs_diag:s0
+genfscon sysfs /devices/virtual/block/                                u:object_r:sysfs_devices_block:s0
 
 # debugfs
 genfscon debugfs /kgsl/proc                u:object_r:debugfs_kgsl:s0
diff --git a/sepolicy/vold.te b/sepolicy/vold.te
index 3fdcfad..c6ba6e6 100644
--- a/sepolicy/vold.te
+++ b/sepolicy/vold.te
@@ -3,4 +3,5 @@
 
 allow vold sysfs_scsi_devices_0000:file w_file_perms;
 allow vold sysfs_scsi_devices_other:file w_file_perms;
+allow vold sysfs_devices_block:file w_file_perms;
 allow vold persist_file:dir r_dir_perms;