Function report |
Source Code:arch\x86\kernel\ldt.c |
Create Date:2022-07-28 07:35:41 |
Last Modify:2022-05-18 16:20:29 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:write_ldt
Proto:static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
void __user * | ptr | |
unsigned long | bytecount | |
int | oldmode |
477 | If copy_from_user( & ldt_info, ptr, size of ldt_info ) Then Go to out |
481 | If entry_number >= Maximum number of LDT entries supported. Then Go to out |
483 | If contents == 3 Then |
486 | If seg_not_present == 0 Then Go to out |
490 | If oldmode && Not base_addr && Not limit || This intentionally ignores lm, since 32-bit apps don't have that field. ( & ldt_info) Then |
494 | Else |
505 | If down_write_killable( & ldt_usr_sem) Then Return -EINTR |
509 | old_nr_entries = If old_ldt Then nr_entries Else 0 |
510 | new_nr_entries = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(entry_number + 1, old_nr_entries) |
514 | If Not new_ldt Then Go to out_unlock |
517 | If old_ldt Then memcpy(entries, entries, old_nr_entries * The size of each LDT entry. ) |
520 | entries[entry_number] = ldt |
530 | If error Then |
536 | If Not WARN_ON_ONCE(old_ldt) Then free_ldt_pgtables(mm) |
538 | free_ldt_struct(new_ldt) |
539 | Go to out_unlock |
542 | install_ldt(mm, new_ldt) |
543 | unmap_ldt_struct(mm, old_ldt) |
544 | free_ldt_struct(old_ldt) |
545 | error = 0 |
547 | out_unlock : |
549 | out : |
550 | Return error |
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 |