[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 07/13] 9p: darwin: Properly translate AT_REMOVED
From: |
Greg Kurz |
Subject: |
Re: [Qemu-devel] [PATCH 07/13] 9p: darwin: Properly translate AT_REMOVEDIR flag |
Date: |
Thu, 31 May 2018 21:44:15 +0200 |
On Thu, 31 May 2018 12:25:49 -0400
Keno Fischer <address@hidden> wrote:
> >> + errno = EINVAL;
> >> + return -1;
> >
> > ... I'm more concerned about this new error path. How can this happen ?
> >
>
> As far as I can tell, the flags come from the client without any
> intermediate error
> checking.
Indeed :-\
> Since the Darwin constants do not match the Linux constants (which
> have the same numerical values as the 9p constants), we need to perform this
> checking/translation somewhere to ensure correct behavior.
> Is there a more appropriate place to put this check?
The right thing to do would be to check and translate the flag from
P9_DOTL_AT_REMOVEDIR to AT_REMOVEDIR in the core 9p server code.
- Re: [Qemu-devel] [PATCH 05/13] 9p: darwin: Handle struct dirent differences, (continued)
[Qemu-devel] [PATCH 07/13] 9p: darwin: Properly translate AT_REMOVEDIR flag, keno, 2018/05/26
[Qemu-devel] [PATCH 08/13] 9p: darwin: Ignore O_{NOATIME, DIRECT}, keno, 2018/05/26
[Qemu-devel] [PATCH 09/13] 9p: darwin: Provide a compatibility definition for XATTR_SIZE_MAX, keno, 2018/05/26
[Qemu-devel] [PATCH 10/13] 9p: darwin: *xattr_nofollow implementations, keno, 2018/05/26
[Qemu-devel] [PATCH 11/13] 9p: darwin: Mark mknod as unsupported, keno, 2018/05/26