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()
54 static int read_ldt(void __user * ptr, unsigned long bytecount) in read_ldt() argument
62 if (bytecount > LDT_ENTRY_SIZE*LDT_ENTRIES) in read_ldt()
63 bytecount = LDT_ENTRY_SIZE*LDT_ENTRIES; in read_ldt()
64 err = bytecount; in read_ldt()
69 if (size > bytecount) in read_ldt()
70 size = bytecount; in read_ldt()
73 bytecount -= size; in read_ldt()
77 for (i=0; i<ldt->entry_count/LDT_ENTRIES_PER_PAGE && bytecount; in read_ldt()
80 if (size > bytecount) in read_ldt()
81 size = bytecount; in read_ldt()
86 bytecount -= size; in read_ldt()
92 if (bytecount == 0 || err == -EFAULT) in read_ldt()
95 if (clear_user(ptr, bytecount)) in read_ldt()
102 static int read_default_ldt(void __user * ptr, unsigned long bytecount) in read_default_ldt() argument
106 if (bytecount > 5*LDT_ENTRY_SIZE) in read_default_ldt()
107 bytecount = 5*LDT_ENTRY_SIZE; in read_default_ldt()
109 err = bytecount; in read_default_ldt()
115 if (clear_user(ptr, bytecount)) in read_default_ldt()
121 static int write_ldt(void __user * ptr, unsigned long bytecount, int func) in write_ldt() argument
131 if (bytecount != sizeof(ldt_info)) in write_ldt()
208 unsigned long bytecount) in do_modify_ldt_skas() argument
214 ret = read_ldt(ptr, bytecount); in do_modify_ldt_skas()
218 ret = write_ldt(ptr, bytecount, func); in do_modify_ldt_skas()
221 ret = read_default_ldt(ptr, bytecount); in do_modify_ldt_skas()
374 unsigned long , bytecount) in SYSCALL_DEFINE3() argument
377 return (unsigned int)do_modify_ldt_skas(func, ptr, bytecount); in SYSCALL_DEFINE3()