svn commit: r252855 - in head/sys: kern sys
Jamie Gritton
jamie at FreeBSD.org
Sat Jul 6 00:10:53 UTC 2013
Author: jamie
Date: Sat Jul 6 00:10:52 2013
New Revision: 252855
URL: http://svnweb.freebsd.org/changeset/base/252855
Log:
Make the comments a little more clear about PRIV_KMEM_*, explicitly
referring to /dev/[k]mem and noting it's about opening the files rather
than actually reading and writing.
Reviewed by: jmallett
Modified:
head/sys/kern/kern_priv.c
head/sys/sys/priv.h
Modified: head/sys/kern/kern_priv.c
==============================================================================
--- head/sys/kern/kern_priv.c Fri Jul 5 23:40:08 2013 (r252854)
+++ head/sys/kern/kern_priv.c Sat Jul 6 00:10:52 2013 (r252855)
@@ -142,8 +142,9 @@ priv_check_cred(struct ucred *cred, int
}
/*
- * Writes to kernel memory are a typical root-only operation,
- * but non-root users are expected to be able to read it.
+ * Writes to kernel/physical memory are a typical root-only operation,
+ * but non-root users are expected to be able to read it (provided they
+ * have permission to access /dev/[k]mem).
*/
if (priv == PRIV_KMEM_READ) {
error = 0;
Modified: head/sys/sys/priv.h
==============================================================================
--- head/sys/sys/priv.h Fri Jul 5 23:40:08 2013 (r252854)
+++ head/sys/sys/priv.h Sat Jul 6 00:10:52 2013 (r252855)
@@ -494,10 +494,10 @@
#define PRIV_RCTL_REMOVE_RULE 674
/*
- * Kernel memory privileges.
+ * mem(4) privileges.
*/
-#define PRIV_KMEM_READ 680 /* Read from kernel memory. */
-#define PRIV_KMEM_WRITE 681 /* Write to kernel memory. */
+#define PRIV_KMEM_READ 680 /* Open mem/kmem for reading. */
+#define PRIV_KMEM_WRITE 681 /* Open mem/kmem for writing. */
/*
* Track end of privilege list.
More information about the svn-src-all
mailing list