函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\tls.c Create Date:2022-07-27 08:52:25
Last Modify:2022-05-18 16:59:10 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:regset_tls_get

函数原型:int regset_tls_get(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf)

返回类型:int

参数:

类型参数名称
struct task_struct *target
const struct user_regset *regset
unsigned intpos
unsigned intcount
void *kbuf
void __user *ubuf
264  如果pos大于等于GDT_ENTRY_TLS_ENTRIESsizeof(structuser_desc)或pos取模sizeof(structuser_desc)不等于0或count取模sizeof(structuser_desc)不等于0则返回:负EINVAL
269  pos除等于sizeof(structuser_desc)
270  count除等于sizeof(structuser_desc)
272  tls等于 Cached TLS descriptors: [pos]
274  如果kbuf
275  info等于kbuf
276 count自减大于0循环
277  Get the current Thread-Local Storage area:
279  否则
280  __useru_info等于ubuf
281 count自减大于0循环
284  如果__copy_to_user(u_info++, & info, info的长度)则返回:负EFAULT
289  返回:0