diff options
| author | Mark Johnston <markjdb@gmail.com> | 2021-05-31 11:20:55 -0400 |
|---|---|---|
| committer | Mark Johnston <markjdb@gmail.com> | 2021-07-28 17:10:45 -0400 |
| commit | 31d4ec532f0f1945179dcd13e390086f7c5246ed (patch) | |
| tree | e9c0b87bfd142f8f0cee4a6950e48409d39e499f /sys | |
| parent | cc26c8ab1310ab55083946a8225b456135e48846 (diff) | |
sys/freebsd: add sysarch(2)
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/freebsd/amd64.txt | 66 | ||||
| -rw-r--r-- | sys/freebsd/amd64.txt.const | 23 |
2 files changed, 89 insertions, 0 deletions
diff --git a/sys/freebsd/amd64.txt b/sys/freebsd/amd64.txt new file mode 100644 index 000000000..df2e0566b --- /dev/null +++ b/sys/freebsd/amd64.txt @@ -0,0 +1,66 @@ +# 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 <x86/include/sysarch.h> + +sysarch$I386_GET_LDT(cmd const[I386_GET_LDT], args ptr[out, i386_ldt_args]) +sysarch$I386_SET_LDT(cmd const[I386_SET_LDT], args ptr[in, i386_ldt_args]) +sysarch$I386_GET_IOPERM(cmd const[I386_GET_IOPERM], args ptr[out, i386_ioperm_args]) +sysarch$I386_SET_IOPERM(cmd const[I386_SET_IOPERM], args ptr[in, i386_ioperm_args]) +sysarch$I386_GET_FSBASE(cmd const[I386_GET_FSBASE], args ptr[out, int32]) +sysarch$I386_SET_FSBASE(cmd const[I386_SET_FSBASE], args ptr[in, int32]) +sysarch$I386_GET_GSBASE(cmd const[I386_GET_GSBASE], args ptr[out, int32]) +sysarch$I386_SET_GSBASE(cmd const[I386_SET_GSBASE], args ptr[in, int32]) +sysarch$I386_GET_XFPUSTATE(cmd const[I386_GET_XFPUSTATE], args ptr[out, i386_get_xfpustate]) +sysarch$I386_SET_PKRU(cmd const[I386_SET_PKRU], args ptr[in, i386_set_pkru]) +sysarch$I386_CLEAR_PKRU(cmd const[I386_CLEAR_PKRU], args ptr[in, i386_set_pkru]) + +sysarch$AMD64_GET_FSBASE(cmd const[AMD64_GET_FSBASE], args ptr[in, int64]) +sysarch$AMD64_SET_FSBASE(cmd const[AMD64_SET_FSBASE], args ptr[out, int64]) +sysarch$AMD64_GET_GSBASE(cmd const[AMD64_GET_GSBASE], args ptr[in, int64]) +sysarch$AMD64_SET_GSBASE(cmd const[AMD64_SET_GSBASE], args ptr[out, int64]) +sysarch$AMD64_GET_XFPUSTATE(cmd const[AMD64_GET_XFPUSTATE], args ptr[out, amd64_get_xfpustate]) +sysarch$AMD64_SET_PKRU(cmd const[AMD64_SET_PKRU], args ptr[in, amd64_set_pkru]) +sysarch$AMD64_CLEAR_PKRU(cmd const[AMD64_CLEAR_PKRU], args ptr[in, amd64_set_pkru]) + +user_segment_descriptor { + fields int64 +} + +i386_ldt_args { + start int32 + descs ptr[inout, array[user_segment_descriptor]] + num len[descs, int32] +} + +i386_ioperm_args { + start int32 + length int32 + enable int32 +} + +i386_get_xfpustate { + addr int32 + len int32 +} + +i386_set_pkru { + addr int32 + len int32 + keyidx int32 + flags int32 +} + +amd64_get_xfpustate { + addr buffer[inout] + len len[addr, int32] +} + +amd64_set_pkru { + addr buffer[in] + len len[addr, int32] + keyidx int32 + flags flags[pkru_flags, int32] +} + +pkru_flags = 0, AMD64_PKRU_EXCL, AMD64_PKRU_PERSIST diff --git a/sys/freebsd/amd64.txt.const b/sys/freebsd/amd64.txt.const new file mode 100644 index 000000000..7fe7305ce --- /dev/null +++ b/sys/freebsd/amd64.txt.const @@ -0,0 +1,23 @@ +# Code generated by syz-sysgen. DO NOT EDIT. +arches = 386, amd64 +AMD64_CLEAR_PKRU = 134 +AMD64_GET_FSBASE = 128 +AMD64_GET_GSBASE = 130 +AMD64_GET_XFPUSTATE = 132 +AMD64_PKRU_EXCL = 1 +AMD64_PKRU_PERSIST = 2 +AMD64_SET_FSBASE = 129 +AMD64_SET_GSBASE = 131 +AMD64_SET_PKRU = 133 +I386_CLEAR_PKRU = 13 +I386_GET_FSBASE = 7 +I386_GET_GSBASE = 9 +I386_GET_IOPERM = 3 +I386_GET_LDT = 0 +I386_GET_XFPUSTATE = 11 +I386_SET_FSBASE = 8 +I386_SET_GSBASE = 10 +I386_SET_IOPERM = 4 +I386_SET_LDT = 1 +I386_SET_PKRU = 12 +SYS_sysarch = 165 |
