函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:The caller must call finalize_ldt_struct on the result. LDT starts zeroed.

函数原型:static struct *alloc_ldt_struct(unsigned int num_entries)

返回类型:struct

参数:

类型参数名称
unsigned intnum_entries
70  如果num_entries大于Maximum number of LDT entries supported. 则返回:NULL
73  new_ldt等于开辟内存
74  如果非new_ldt则返回:NULL
77  BUILD_BUG_ON - break compile if a condition is true(The size of each LDT entry. != sizeof(structdesc_struct))
78  alloc_size等于num_entriesThe size of each LDT entry.
86  如果alloc_size大于PAGE_SIZEentries等于vzalloc(alloc_size)
88  否则entries等于get_zeroed_page(GFP_KERNEL)
91  如果非entries
92  释放内存
93  返回:NULL
97  slot等于负1
99  nr_entries等于num_entries
100  返回:new_ldt
调用者
名称描述
ldt_dup_contextCalled on fork from arch_dup_mmap(). Just copy the current LDT state,* the new task is not running, so nothing can be installed.
write_ldt