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:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Check for the presence of extended state information in the* user fpstate pointer in the sigcontext.

Proto:static inline int check_for_xstate(struct fxregs_state __user *buf, void __user *fpstate, struct _fpx_sw_bytes *fx_sw)

Type:int

Parameter:

TypeParameterName
struct fxregs_state __user *buf
void __user *fpstate
struct _fpx_sw_bytes *fx_sw
28  min_xstate_size = sizeof(structfxregs_state) + sizeof(structxstate_header)
32  If __copy_from_user(fx_sw, & sw_reserved[0], size of fx_sw ) Then Return -1
36  If If set to FP_XSTATE_MAGIC1 then this is an xstate context.* 0 if a legacy frame. != FP_XSTATE_MAGIC1 || Actual XSAVE state size, based on the xfeatures saved in the layout.* 'extended_size' is greater than 'xstate_size': < min_xstate_size || Actual XSAVE state size, based on the xfeatures saved in the layout.* 'extended_size' is greater than 'xstate_size': > fpu_user_xstate_size || Actual XSAVE state size, based on the xfeatures saved in the layout.* 'extended_size' is greater than 'xstate_size': > Total size of the fpstate area:* - if magic1 == 0 then it's sizeof(struct _fpstate)* - if magic1 == FP_XSTATE_MAGIC1 then it's sizeof(struct _xstate)* plus extensions (if any) Then Return -1
48  If Get a simple variable from user space, with less checking(magic2, (__u32__user * )(fpstate + Actual XSAVE state size, based on the xfeatures saved in the layout.* 'extended_size' is greater than 'xstate_size':)) || magic2 != FP_XSTATE_MAGIC2 Then Return -1
52  Return 0
Caller
NameDescribe
__fpu__restore_sig