mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 09:06:32 +00:00
new: kthread机制
This commit is contained in:
@ -170,7 +170,7 @@ uint64_t sys_read(struct pt_regs *regs)
|
||||
int64_t count = (int64_t)regs->r10;
|
||||
|
||||
// 校验buf的空间范围
|
||||
if(SYSCALL_FROM_USER(regs) && (!verify_area(buf, count)))
|
||||
if(SYSCALL_FROM_USER(regs) && (!verify_area((uint64_t)buf, count)))
|
||||
return -EPERM;
|
||||
|
||||
// kdebug("sys read: fd=%d", fd_num);
|
||||
@ -210,7 +210,7 @@ uint64_t sys_write(struct pt_regs *regs)
|
||||
int64_t count = (int64_t)regs->r10;
|
||||
|
||||
// 校验buf的空间范围
|
||||
if(SYSCALL_FROM_USER(regs) && (!verify_area(buf, count)))
|
||||
if(SYSCALL_FROM_USER(regs) && (!verify_area((uint64_t)buf, count)))
|
||||
return -EPERM;
|
||||
kdebug("sys write: fd=%d", fd_num);
|
||||
|
||||
|
Reference in New Issue
Block a user