Lines Matching refs:bytecount
16 static inline int modify_ldt (int func, void *ptr, unsigned long bytecount) in modify_ldt() argument
18 return syscall(__NR_modify_ldt, func, ptr, bytecount); in modify_ldt()
56 static int read_ldt(void __user * ptr, unsigned long bytecount) in read_ldt() argument
64 if (bytecount > LDT_ENTRY_SIZE*LDT_ENTRIES) in read_ldt()
65 bytecount = LDT_ENTRY_SIZE*LDT_ENTRIES; in read_ldt()
66 err = bytecount; in read_ldt()
71 if (size > bytecount) in read_ldt()
72 size = bytecount; in read_ldt()
75 bytecount -= size; in read_ldt()
79 for (i=0; i<ldt->entry_count/LDT_ENTRIES_PER_PAGE && bytecount; in read_ldt()
82 if (size > bytecount) in read_ldt()
83 size = bytecount; in read_ldt()
88 bytecount -= size; in read_ldt()
94 if (bytecount == 0 || err == -EFAULT) in read_ldt()
97 if (clear_user(ptr, bytecount)) in read_ldt()
104 static int read_default_ldt(void __user * ptr, unsigned long bytecount) in read_default_ldt() argument
108 if (bytecount > 5*LDT_ENTRY_SIZE) in read_default_ldt()
109 bytecount = 5*LDT_ENTRY_SIZE; in read_default_ldt()
111 err = bytecount; in read_default_ldt()
117 if (clear_user(ptr, bytecount)) in read_default_ldt()
123 static int write_ldt(void __user * ptr, unsigned long bytecount, int func) in write_ldt() argument
133 if (bytecount != sizeof(ldt_info)) in write_ldt()
210 unsigned long bytecount) in do_modify_ldt_skas() argument
216 ret = read_ldt(ptr, bytecount); in do_modify_ldt_skas()
220 ret = write_ldt(ptr, bytecount, func); in do_modify_ldt_skas()
223 ret = read_default_ldt(ptr, bytecount); in do_modify_ldt_skas()
376 unsigned long , bytecount) in SYSCALL_DEFINE3() argument
379 return (unsigned int)do_modify_ldt_skas(func, ptr, bytecount); in SYSCALL_DEFINE3()