Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ib_prctl_set

Proto:static int ib_prctl_set(struct task_struct *task, unsigned long ctrl)

Type:int

Parameter:

TypeParameterName
struct task_struct *task
unsigned longctrl
1159  Case ctrl == PR_SPEC_ENABLE
1160  If spectre_v2_user == SPECTRE_V2_USER_NONE Then Return 0
1166  If spectre_v2_user == SPECTRE_V2_USER_STRICT || spectre_v2_user == SPECTRE_V2_USER_STRICT_PREFERRED Then Return -EPERM
1169  task_clear_spec_ib_disable(task)
1170  task_update_spec_tif(task)
1171  Break
1172  Case ctrl == PR_SPEC_DISABLE
1173  Case ctrl == PR_SPEC_FORCE_DISABLE
1178  If spectre_v2_user == SPECTRE_V2_USER_NONE Then Return -EPERM
1180  If spectre_v2_user == SPECTRE_V2_USER_STRICT || spectre_v2_user == SPECTRE_V2_USER_STRICT_PREFERRED Then Return 0
1183  task_set_spec_ib_disable(task)
1184  If ctrl == PR_SPEC_FORCE_DISABLE Then task_set_spec_ib_force_disable(task)
1186  task_update_spec_tif(task)
1187  Break
1188  Default
1189  Return -ERANGE
1191  Return 0
Caller
NameDescribe
arch_prctl_spec_ctrl_set