函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\fpu\regset.c Create Date:2022-07-27 08:49:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:xstateregs_set

函数原型:int xstateregs_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf)

返回类型:int

参数:

类型参数名称
struct task_struct *target
const struct user_regset *regset
unsigned intpos
unsigned intcount
const void *kbuf
const void __user *ubuf
117  fpu等于 Floating point and extended processor state
121  如果非boot_cpu_has(XSAVE/XRSTOR/XSETBV/XGETBV instructions )则返回:负ENODEV
127  如果pos不等于0或count小于fpu_user_xstate_size则返回:负EFAULT
130  xsave等于xsave
132  This function must be called before we write a task's fpstate.* Invalidate any cached FPU registers.* After this function call, after registers in the fpstate are* modified and the child task has woken up, the child task will
134  如果using_compacted_format()则
135  如果kbufret等于copy_kernel_to_xstate(xsave, kbuf)
137  否则ret等于copy_user_to_xstate(xsave, ubuf)
139  否则
140  ret等于user_regset_copyin( & pos, & count, & kbuf, & ubuf, xsave, 0, - 1)
141  如果非retret等于Validate an xstate header supplied by userspace (ptrace or sigreturn)
148  MXCSR Register State 与等于Boot time FPU feature detection code:
153  如果retfpstate_init( & @state:* In-memory copy of all FPU registers that we save/restore* over context switches. If the task is using the FPU then* the registers in the FPU are more recent than this state* copy. If the task context-switches away then they get)
156  返回:ret