Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Mar 2017 00:56:24 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r315970 - stable/11/sys/dev/cpuctl
Message-ID:  <201703260056.v2Q0uOhC080636@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Mar 26 00:56:24 2017
New Revision: 315970
URL: https://svnweb.freebsd.org/changeset/base/315970

Log:
  MFC r315588:
  Update the list of cpudev ioctls which require write access.

Modified:
  stable/11/sys/dev/cpuctl/cpuctl.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/cpuctl/cpuctl.c
==============================================================================
--- stable/11/sys/dev/cpuctl/cpuctl.c	Sun Mar 26 00:53:34 2017	(r315969)
+++ stable/11/sys/dev/cpuctl/cpuctl.c	Sun Mar 26 00:56:24 2017	(r315970)
@@ -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?201703260056.v2Q0uOhC080636>