aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/dev_msr.txt
diff options
context:
space:
mode:
authorVikram Narayanan <vikram186@gmail.com>2021-10-18 12:46:13 -0700
committerDmitry Vyukov <dvyukov@google.com>2021-11-18 14:32:23 +0100
commit985076f2cce88f048e83459b99954a86a3f50cf5 (patch)
tree9f53920457a310fd220d1ed725a58fda5346fa83 /sys/linux/dev_msr.txt
parentcafff8b6ce51d6d1fa82eb96612a943db3c03541 (diff)
sys/linux: add /dev/cpu/X/msr to dev_msr.txt
Diffstat (limited to 'sys/linux/dev_msr.txt')
-rw-r--r--sys/linux/dev_msr.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/linux/dev_msr.txt b/sys/linux/dev_msr.txt
new file mode 100644
index 000000000..07a3d3554
--- /dev/null
+++ b/sys/linux/dev_msr.txt
@@ -0,0 +1,15 @@
+# Copyright 2021 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+include <asm/msr.h>
+include <uapi/asm/msr.h>
+include <uapi/linux/fcntl.h>
+
+resource fd_msr[fd]
+
+syz_open_dev$MSR(dev ptr[in, string["/dev/cpu/#/msr"]], id intptr, flags const[O_RDONLY]) fd_msr
+read$msr(fd fd_msr, buf buffer[out], count len[buf])
+
+ioctl$X86_IOC_RDMSR_REGS(fd fd_msr, cmd const[X86_IOC_RDMSR_REGS], arg ptr[in, array[int32, 8]])
+# Disallow writing to MSRs
+_ = X86_IOC_WRMSR_REGS