aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/dev_msr.txt
diff options
context:
space:
mode:
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