Date: Sun, 19 Mar 2017 21:25:27 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315588 - head/sys/dev/cpuctl Message-ID: <201703192125.v2JLPRH5038722@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sun Mar 19 21:25:27 2017 New Revision: 315588 URL: https://svnweb.freebsd.org/changeset/base/315588 Log: Update the list of cpudev ioctls which require write access. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/dev/cpuctl/cpuctl.c Modified: head/sys/dev/cpuctl/cpuctl.c ============================================================================== --- head/sys/dev/cpuctl/cpuctl.c Sun Mar 19 21:25:13 2017 (r315587) +++ head/sys/dev/cpuctl/cpuctl.c Sun Mar 19 21:25:27 2017 (r315588) @@ -156,8 +156,9 @@ cpuctl_ioctl(struct cdev *dev, u_long cm return (ENXIO); } /* Require write flag for "write" requests. */ - if ((cmd == CPUCTL_WRMSR || cmd == CPUCTL_UPDATE) && - ((flags & FWRITE) == 0)) + if ((cmd == CPUCTL_MSRCBIT || cmd == CPUCTL_MSRSBIT || + cmd == CPUCTL_UPDATE || cmd == CPUCTL_WRMSR) && + (flags & FWRITE) == 0) return (EPERM); switch (cmd) { case CPUCTL_RDMSR:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703192125.v2JLPRH5038722>