From c32ca41c81cb3f4eb55f06bcdaac21f202af6bec Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Tue, 17 Nov 2020 08:20:48 +0100 Subject: Remove use of copy_stat() from sys_fstatat The system call should return the stat struct in kernel format, not libc format. --- pk/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pk') diff --git a/pk/syscall.c b/pk/syscall.c index 8101ec9..422b16c 100644 --- a/pk/syscall.c +++ b/pk/syscall.c @@ -226,7 +226,7 @@ long sys_fstatat(int dirfd, const char* name, void* st, int flags) struct frontend_stat buf; size_t name_size = strlen(name)+1; long ret = frontend_syscall(SYS_fstatat, kfd, va2pa(name), name_size, va2pa(&buf), flags, 0, 0); - copy_stat(st, &buf); + memcpy(st, &buf, sizeof(buf)); return ret; } return -EBADF; -- cgit v1.1