+ * Reads and prints the SELinux policy info for the given nodemap.
+ *
+ * \param m seq file in proc fs
+ * \param data unused
+ * \retval 0 success
+ */
+static int nodemap_sepol_seq_show(struct seq_file *m, void *data)
+{
+ struct lu_nodemap *nodemap;
+ int rc = 0;
+
+ mutex_lock(&active_config_lock);
+ nodemap = nodemap_lookup(m->private);
+ mutex_unlock(&active_config_lock);
+ if (IS_ERR(nodemap)) {
+ rc = PTR_ERR(nodemap);
+ CERROR("cannot find nodemap '%s': rc = %d\n",
+ (char *)m->private, rc);
+ return rc;
+ }
+
+ seq_printf(m, "%s\n", nodemap_get_sepol(nodemap));
+ nodemap_putref(nodemap);
+ return rc;
+}
+
+/**
+ * Set SELinux policy info on a nodemap.
+ *
+ * \param[in] file proc file
+ * \param[in] buffer string, "<sepol>"
+ * \param[in] count \a buffer length
+ * \param[in] off unused
+ * \retval \a count on success
+ * \retval negative number on error
+ */
+static ssize_t
+nodemap_sepol_seq_write(struct file *file,
+ const char __user *buffer,
+ size_t count, loff_t *off)
+{
+ struct seq_file *m = file->private_data;
+ char sepol[LUSTRE_NODEMAP_SEPOL_LENGTH + 1];
+ int rc = 0;
+
+ CLASSERT(sizeof(sepol) == sizeof(((struct lu_nodemap *)0)->nm_sepol));
+
+ if (count > 0) {
+ if (count >= sizeof(sepol))
+ GOTO(out, rc = -ENAMETOOLONG);
+
+ if (copy_from_user(sepol, buffer, count))
+ GOTO(out, rc = -EFAULT);
+
+ sepol[count] = '\0';
+
+ rc = nodemap_set_sepol(m->private, sepol);
+ }
+
+out:
+ if (rc != 0)
+ return rc;
+
+ return count;
+}
+LPROC_SEQ_FOPS(nodemap_sepol);
+
+/**