Date: Sat, 6 Jul 2013 00:10:52 +0000 (UTC) From: Jamie Gritton <jamie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252855 - in head/sys: kern sys Message-ID: <201307060010.r660Aqsp036921@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307060010.r660Aqsp036921>