Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\ldt.c Create Date:2022-07-28 07:35:34
Last Modify:2022-05-18 16:20:29 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:The caller must call finalize_ldt_struct on the result. LDT starts zeroed.

Proto:static struct *alloc_ldt_struct(unsigned int num_entries)

Type:struct

Parameter:

TypeParameterName
unsigned intnum_entries
70  If num_entries > Maximum number of LDT entries supported. Then Return NULL
73  new_ldt = Allocation memory
74  If Not new_ldt Then Return 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_entries * The size of each LDT entry.
86  If alloc_size > PAGE_SIZE Then entries = vzalloc(alloc_size)
88  Else entries = get_zeroed_page(GFP_KERNEL)
91  If Not entries Then
92  free previously allocated memory
93  Return NULL
97  slot = -1
99  nr_entries = num_entries
100  Return new_ldt
Caller
NameDescribe
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