Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\fpu\xstate.c Create Date:2022-07-28 07:50:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Given an xstate feature nr, calculate where in the xsave* buffer the state is. Callers should ensure that the buffer* is valid.

Proto:static void *__raw_xsave_addr(struct xregs_state *xsave, int xfeature_nr)

Type:void

Parameter:

TypeParameterName
struct xregs_state *xsave
intxfeature_nr
812  If Not Note that in the future we will likely need a pair of* functions here: one for user xstates and the other for* system xstates. For now, they are the same. Then
813  WARN_ON_FPU(1)
814  Return NULL
817  Return xsave + xstate_comp_offsets[xfeature_nr]
Caller
NameDescribe
get_xsave_addrGiven the xsave area and a state inside, this function returns the* address of the state
copy_xstate_to_kernelConvert from kernel XSAVES compacted format to standard format and copy* to a kernel-space ptrace buffer.* It supports partial copy but pos always starts from zero. This is called* from xstateregs_get() and there we check the CPU has XSAVES.
copy_xstate_to_userConvert from kernel XSAVES compacted format to standard format and copy* to a user-space buffer. It supports partial copy but pos always starts from* zero. This is called from xstateregs_get() and there we check the CPU* has XSAVES.
copy_kernel_to_xstateConvert from a ptrace standard-format kernel buffer to kernel XSAVES format* and copy to the target thread. This is called from xstateregs_set().
copy_user_to_xstateConvert from a ptrace or sigreturn standard-format user-space buffer to* kernel XSAVES format and copy to the target thread. This is called from* xstateregs_set(), as well as potentially from the sigreturn() and* rt_sigreturn() system calls.