Lines Matching refs:bytecount
500 static int read_ldt(void __user *ptr, unsigned long bytecount) in read_ldt() argument
513 if (bytecount > LDT_ENTRY_SIZE * LDT_ENTRIES) in read_ldt()
514 bytecount = LDT_ENTRY_SIZE * LDT_ENTRIES; in read_ldt()
517 if (entries_size > bytecount) in read_ldt()
518 entries_size = bytecount; in read_ldt()
525 if (entries_size != bytecount) { in read_ldt()
527 if (clear_user(ptr + entries_size, bytecount - entries_size)) { in read_ldt()
532 retval = bytecount; in read_ldt()
539 static int read_default_ldt(void __user *ptr, unsigned long bytecount) in read_default_ldt() argument
547 if (bytecount > size) in read_default_ldt()
548 bytecount = size; in read_default_ldt()
549 if (clear_user(ptr, bytecount)) in read_default_ldt()
551 return bytecount; in read_default_ldt()
576 static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode) in write_ldt() argument
586 if (bytecount != sizeof(ldt_info)) in write_ldt()
666 unsigned long , bytecount) in SYSCALL_DEFINE3() argument
672 ret = read_ldt(ptr, bytecount); in SYSCALL_DEFINE3()
675 ret = write_ldt(ptr, bytecount, 1); in SYSCALL_DEFINE3()
678 ret = read_default_ldt(ptr, bytecount); in SYSCALL_DEFINE3()
681 ret = write_ldt(ptr, bytecount, 0); in SYSCALL_DEFINE3()