Function report |
Source Code:arch\x86\kernel\fpu\signal.c |
Create Date:2022-07-28 07:50:10 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__fpu__restore_sig
Proto:static int __fpu__restore_sig(void __user *buf, void __user *buf_fx, int size)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
void __user * | buf | |
void __user * | buf_fx | |
int | size |
274 | struct user_i387_ia32_struct * envp = NULL |
276 | ia32_fxstate = buf != buf_fx |
277 | tsk = current process |
280 | xfeatures = 0 |
281 | fx_only = 0 |
282 | ret = 0 |
287 | If Not buf Then |
289 | Return 0 |
295 | If Not static_cpu_has(Onboard FPU ) Then Return fpregs_soft_set(current process, NULL, 0, sizeof(structuser_i387_ia32_struct), NULL, buf) != 0 |
300 | If use_xsave() Then |
333 | If ia32_fxstate Then |
338 | Else |
361 | init_bv = xfeatures_mask & ~xfeatures |
363 | If using_compacted_format() Then |
364 | ret = copy_user_to_xstate( & xsave, buf_fx) |
365 | Else |
366 | ret = __copy_from_user( & xsave, buf_fx, state_size) |
368 | If Not ret && state_size > offsetof(structxregs_state, header) Then ret = Validate an xstate header supplied by userspace (ptrace or sigreturn) |
381 | Else if use_fxsr() Then |
382 | ret = __copy_from_user( & fxsave, buf_fx, state_size) |
383 | If ret Then |
391 | If use_xsave() Then |
396 | ret = copy_kernel_to_fxregs_err( & fxsave) |
397 | Else |
398 | ret = __copy_from_user( & fsave, buf_fx, state_size) |
403 | ret = copy_kernel_to_fregs_err( & fsave) |
405 | If Not ret Then fpregs_mark_activate() |
407 | Else These generally need preemption protection to work,* do try to avoid using these on their own: |
409 | fpregs_unlock() |
411 | err_out : |
412 | If ret Then Clear the FPU state back to init state.* Called by sys_execve(), by the signal handler code and by various* error paths. |
414 | Return ret |
Name | Describe |
---|---|
fpu__restore_sig | Restore FPU state from a sigframe: |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |