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:38
Last Modify:2022-05-18 16:20:29 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:read_ldt

Proto:static int read_ldt(void __user *ptr, unsigned long bytecount)

Type:int

Parameter:

TypeParameterName
void __user *ptr
unsigned longbytecount
412  mm = mm
416  lock for reading
418  If Not ldt Then
419  retval = 0
420  Go to out_unlock
423  If bytecount > The size of each LDT entry. * Maximum number of LDT entries supported. Then bytecount = The size of each LDT entry. * Maximum number of LDT entries supported.
426  entries_size = nr_entries * The size of each LDT entry.
427  If entries_size > bytecount Then entries_size = bytecount
430  If copy_to_user(ptr, entries, entries_size) Then
431  retval = -EFAULT
432  Go to out_unlock
435  If entries_size != bytecount Then
438  retval = -EFAULT
439  Go to out_unlock
442  retval = bytecount
444  out_unlock :
445  lease a read lock
446  Return retval