commit: f495b8102b9b87e36761d9a1628a8ef115ab91c3
Author: Chris PeBenito <pebenito <AT> ieee <DOT> org>
AuthorDate: Mon Sep 29 13:21:11 2025 +0000
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sun Nov 16 00:22:34 2025 +0000
URL:
https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=f495b810
devices: Add iio write and rw interfaces.
Also fix docs for dev_read_iio().
Signed-off-by: Chris PeBenito <pebenito <AT> ieee.org>
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>
policy/modules/kernel/devices.if | 38 +++++++++++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/policy/modules/kernel/devices.if b/policy/modules/kernel/devices.if
index 5191ba496..c674ad004 100644
--- a/policy/modules/kernel/devices.if
+++ b/policy/modules/kernel/devices.if
@@ -2570,7 +2570,7 @@ interface(`dev_rw_hyperv_vss',`
########################################
## <summary>
-## Allow read/write access to InfiniBand devices.
+## Allow read access to InfiniBand devices.
## </summary>
## <param name="domain">
## <summary>
@@ -2586,6 +2586,42 @@ interface(`dev_read_iio',`
read_chr_files_pattern($1, device_t, iio_device_t)
')
+########################################
+## <summary>
+## Allow write access to InfiniBand devices.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`dev_write_iio',`
+ gen_require(`
+ type device_t, iio_device_t;
+ ')
+
+ write_chr_files_pattern($1, device_t, iio_device_t)
+')
+
+########################################
+## <summary>
+## Allow read/write access to InfiniBand devices.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`dev_rw_iio',`
+ gen_require(`
+ type device_t, iio_device_t;
+ ')
+
+ rw_chr_files_pattern($1, device_t, iio_device_t)
+')
+
########################################
## <summary>
## Allow read/write access to InfiniBand devices.