函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Save 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'.

函数原型:int copy_fpstate_to_sigframe(void __user *buf, void __user *buf_fx, int size)

返回类型:int

参数:

类型参数名称
void __user *buf
void __user *buf_fx
intsize
166  tsk等于当前进程
167  ia32_fxstate等于buf不等于buf_fx
170  ia32_fxstate与等于IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_X86_32)或IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_IA32_EMULATION)
173  如果非access_ok - Checks if a user space pointer is valid*@addr: User space pointer to start of block to check*@size: Size of block to check* Context: User context only. This function may sleep if pagefaults are* enabled.(buf, size)则返回:负EACCES
176  如果非static_cpu_has(Onboard FPU )则返回:如果fpregs_soft_get(当前进程, NULL, 0, sizeof(structuser_i387_ia32_struct), NULL, (struct_fpstate_32__user * )buf)则负1否则1
181  retry :
188  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.
189  如果test_thread_flag(load FPU on return to userspace )则Internal helper, do not use directly. Use switch_fpu_return() instead.
192  These routines enable/disable the pagefault handler. If disabled, it will* not take any locks and go straight to the fixup table.* User access methods will not sleep when called from a pagefault_disabled()* environment.
193  ret等于copy_fpregs_to_sigframe(buf_fx)
194  pagefault_enable()
195  fpregs_unlock()
197  如果ret
198  如果非Fault everything in given userspace address range in.则转到:retry
200  返回:负EFAULT
204  如果ia32_fxstate或非use_fxsr()的值且Signal frame handlers.则返回:负1
207  如果use_fxsr()且save_xstate_epilog(buf_fx, ia32_fxstate)则返回:负1
210  返回:0
调用者
名称描述
get_sigframe