From 985076f2cce88f048e83459b99954a86a3f50cf5 Mon Sep 17 00:00:00 2001 From: Vikram Narayanan Date: Mon, 18 Oct 2021 12:46:13 -0700 Subject: sys/linux: add /dev/cpu/X/msr to dev_msr.txt --- sys/linux/dev_msr.txt | 15 +++++++++++++++ sys/linux/dev_msr.txt.const | 7 +++++++ 2 files changed, 22 insertions(+) create mode 100644 sys/linux/dev_msr.txt create mode 100644 sys/linux/dev_msr.txt.const (limited to 'sys/linux') 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 +include +include + +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 diff --git a/sys/linux/dev_msr.txt.const b/sys/linux/dev_msr.txt.const new file mode 100644 index 000000000..8d6ee993f --- /dev/null +++ b/sys/linux/dev_msr.txt.const @@ -0,0 +1,7 @@ +# Code generated by syz-sysgen. DO NOT EDIT. +arches = 386, amd64 +O_RDONLY = 0 +X86_IOC_RDMSR_REGS = 3223348128 +X86_IOC_WRMSR_REGS = 3223348129 +__NR_ioctl = 386:54, amd64:16 +__NR_read = 386:3, amd64:0 -- cgit mrf-deployment