[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v10 3/3] linux-user: Add support for statx() sys
From: |
Aleksandar Rikalo |
Subject: |
Re: [Qemu-devel] [PATCH v10 3/3] linux-user: Add support for statx() syscall |
Date: |
Wed, 19 Jun 2019 12:12:22 +0000 |
Hi Laurent,
> s/arhitecture/architecture/
Done.
> You should define sys_statx() using _syscall5() macro and use it.
Done.
> ret != -TARGET_ENOSYS
Done.
> You already checked above p is not NULL and exited with -TARGET_EFAULT.
Done.
> BTW, do we really need to emulate the syscall if it is not available?
>
> I think the user-space application calling statx() should be ready to
> receive ENOSYS and define some kinds of fallback (like you do below). So
> it should not be done by QEMU.
nanoMIPS linux port doesn't support any of "stats" but the statx, so there
is no fallback in nanoMIPS user-space applications.
I think, we can expect similar situation for any new linux port.
> Why do we divide the case in two parts, fstatat() should work here too.
fstat() uses file descriptor, but here we have string which represents
file name with absolute path.
All system calls from 'stat' group whose name starts with letter f require
file descriptor as an argument. Whereas remaining system calls require
file name / path as string. In that sense, statx() is a hybrid between
the two, hence the solution I propose.
Aleksandar Rikalo
Re: [Qemu-devel] [PATCH v10 0/3] linux-user: A set of miscellaneous patches, Aleksandar Markovic, 2019/06/11