Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Signal frame handlers.

Proto:static inline int save_fsave_header(struct task_struct *tsk, void __user *buf)

Type:int

Parameter:

TypeParameterName
struct task_struct *tsk
void __user *buf
60  If use_fxsr() Then
61  xsave = xsave
63  __user * fp = buf
65  Use fpregs_lock() while editing CPU's FPU registers or fpu->state.* A context switch will (and softirq might) save CPU's FPU registers to* fpu->state and set TIF_NEED_FPU_LOAD leaving CPU's FPU registers in* a random state.
66  If Not test_thread_flag(load FPU on return to userspace ) Then copy_fxregs_to_kernel( & Floating point and extended processor state )
68  fpregs_unlock()
70  FXSR floating point environment conversions.
72  If __copy_to_user(buf, & env, size of env ) || Write a simple value into user space, with less checking(Status Word , & status) || Write a simple value into user space, with less checking(X86_FXSR_MAGIC, & 0xffff: regular FPU data only ) Then Return -1
76  Else
77  __user * fp = buf
79  If Get a simple variable from user space, with less checking(swd, & FPU Status Word ) || Write a simple value into user space, with less checking(swd, & Software status information [not touched by FSAVE]: ) Then Return -1
83  Return 0
Caller
NameDescribe
copy_fpstate_to_sigframeSave the fpu, extended register state to the user signal frame.* 'buf_fx' is the 64-byte aligned pointer at which the [f|fx|x]save* state is copied.* 'buf' points to the 'buf_fx' or to the fsave header followed by 'buf_fx'.