Skip to main content

Module gs_info

Module gs_info 

Source
Expand description

Per-CPU GS info struct used by the kernel for things like finding the kernel stack on syscall entry

Authors: MarioS271

Re-exportsยง

use crate::lib::addr::VirtAddr; ๐Ÿ”’
use core::mem::offset_of; ๐Ÿ”’
use core::sync::atomic::AtomicU64; ๐Ÿ”’
use core::sync::atomic::Ordering; ๐Ÿ”’
use x86_64::registers::model_specific::GsBase; ๐Ÿ”’
use x86_64::registers::model_specific::KernelGsBase; ๐Ÿ”’

Structsยง

GsInfo
A per-CPU struct which each CPUโ€™s GS kernel reg points to in order to handle syscall entry

Constantsยง

GS_INFO_KERNEL_STACK_TOP
GS_INFO_SELF_PTR
GS_INFO_USER_RSP