gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/sentry/platform/systrap/sysmsg/sysmsg_offsets_amd64.h (about) 1 // Copyright 2022 The gVisor Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef THIRD_PARTY_GVISOR_PKG_SENTRY_PLATFORM_SYSTRAP_SYSMSG_SYSMSG_OFFSETS_AMD64_H_ 16 #define THIRD_PARTY_GVISOR_PKG_SENTRY_PLATFORM_SYSTRAP_SYSMSG_SYSMSG_OFFSETS_AMD64_H_ 17 18 // LINT.IfChange 19 20 #define offsetof_arch_state_xsave_mode (0x0) 21 #define offsetof_arch_state_fpLen (0x4) 22 #define offsetof_arch_state_fsgsbase (0x8) 23 24 #define XSAVE_MODE_FXSAVE (0x0) 25 #define XSAVE_MODE_XSAVE (0x1) 26 #define XSAVE_MODE_XSAVEOPT (0x2) 27 28 // LINT.ThenChange(sysmsg.h, sysmsg_amd64.go) 29 // LINT.IfChange 30 31 #define offsetof_thread_context_ptregs_r15 \ 32 (0x0 + offsetof_thread_context_ptregs) 33 #define offsetof_thread_context_ptregs_r14 \ 34 (0x8 + offsetof_thread_context_ptregs) 35 #define offsetof_thread_context_ptregs_r13 \ 36 (0x10 + offsetof_thread_context_ptregs) 37 #define offsetof_thread_context_ptregs_r12 \ 38 (0x18 + offsetof_thread_context_ptregs) 39 #define offsetof_thread_context_ptregs_rbp \ 40 (0x20 + offsetof_thread_context_ptregs) 41 #define offsetof_thread_context_ptregs_rbx \ 42 (0x28 + offsetof_thread_context_ptregs) 43 #define offsetof_thread_context_ptregs_r11 \ 44 (0x30 + offsetof_thread_context_ptregs) 45 #define offsetof_thread_context_ptregs_r10 \ 46 (0x38 + offsetof_thread_context_ptregs) 47 #define offsetof_thread_context_ptregs_r9 \ 48 (0x40 + offsetof_thread_context_ptregs) 49 #define offsetof_thread_context_ptregs_r8 \ 50 (0x48 + offsetof_thread_context_ptregs) 51 #define offsetof_thread_context_ptregs_rax \ 52 (0x50 + offsetof_thread_context_ptregs) 53 #define offsetof_thread_context_ptregs_rcx \ 54 (0x58 + offsetof_thread_context_ptregs) 55 #define offsetof_thread_context_ptregs_rdx \ 56 (0x60 + offsetof_thread_context_ptregs) 57 #define offsetof_thread_context_ptregs_rsi \ 58 (0x68 + offsetof_thread_context_ptregs) 59 #define offsetof_thread_context_ptregs_rdi \ 60 (0x70 + offsetof_thread_context_ptregs) 61 #define offsetof_thread_context_ptregs_orig_rax \ 62 (0x78 + offsetof_thread_context_ptregs) 63 #define offsetof_thread_context_ptregs_rip \ 64 (0x80 + offsetof_thread_context_ptregs) 65 #define offsetof_thread_context_ptregs_cs \ 66 (0x88 + offsetof_thread_context_ptregs) 67 #define offsetof_thread_context_ptregs_eflags \ 68 (0x90 + offsetof_thread_context_ptregs) 69 #define offsetof_thread_context_ptregs_rsp \ 70 (0x98 + offsetof_thread_context_ptregs) 71 #define offsetof_thread_context_ptregs_ss \ 72 (0xa0 + offsetof_thread_context_ptregs) 73 #define offsetof_thread_context_ptregs_fs_base \ 74 (0xa8 + offsetof_thread_context_ptregs) 75 #define offsetof_thread_context_ptregs_gs_base \ 76 (0xb0 + offsetof_thread_context_ptregs) 77 #define offsetof_thread_context_ptregs_ds \ 78 (0xb8 + offsetof_thread_context_ptregs) 79 #define offsetof_thread_context_ptregs_es \ 80 (0xc0 + offsetof_thread_context_ptregs) 81 #define offsetof_thread_context_ptregs_fs \ 82 (0xc8 + offsetof_thread_context_ptregs) 83 #define offsetof_thread_context_ptregs_gs \ 84 (0xd0 + offsetof_thread_context_ptregs) 85 86 // LINT.ThenChange(sysmsg.h, sighandler_amd64.c) 87 88 #endif // THIRD_PARTY_GVISOR_PKG_SENTRY_PLATFORM_SYSTRAP_SYSMSG_SYSMSG_OFFSETS_AMD64_H_