Function report |
Source Code:arch\x86\kernel\tls.c |
Create Date:2022-07-28 07:52:10 |
| Last Modify:2022-05-18 16:59:10 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Set a given TLS descriptor:
Proto:int do_set_thread_area(struct task_struct *p, int idx, struct user_desc __user *u_info, int can_allocate)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct task_struct * | p | |
| int | idx | |
| struct user_desc __user * | u_info | |
| int | can_allocate |
| 119 | unsigned short __maybe_unused sel, modified_sel |
| 121 | If copy_from_user( & info, u_info, size of info ) Then Return -EFAULT |
| 124 | If Not tls_desc_okay( & info) Then Return -EINVAL |
| 127 | If idx == -1 Then idx = entry_number |
| 134 | If idx == -1 && can_allocate Then |
| 138 | If Write a simple value into user space(idx, & entry_number) Then Return -EFAULT |
| 145 | set_tls_desc(p, idx, & info, 1) |
| 152 | modified_sel = idx << 3 | 3 |
| 154 | If p == current process Then |
| 156 | Save a segment register away:(These functions are used to reference data in other segments. , sel) |
| 157 | If sel == modified_sel Then loadsegment(These functions are used to reference data in other segments. , sel) |
| 161 | If sel == modified_sel Then loadsegment(es, sel) |
| 165 | If sel == modified_sel Then loadsegment(fs, sel) |
| 169 | If sel == modified_sel Then load_gs_index(sel) |
| 178 | Else |
| 180 | If fsindex == modified_sel Then fsbase = base_addr |
| 183 | If gsindex == modified_sel Then gsbase = base_addr |
| 188 | Return 0 |
| Name | Describe |
|---|---|
| arch_ptrace |
| 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 |