From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>, qemu-devel@nongnu.org
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
aliguori@amazon.com
Subject: Re: [Qemu-devel] [RESEND] [PATCH] hw/9pfs: fix P9_STATS_GEN handling
Date: Wed, 06 Nov 2013 21:41:47 +0530 [thread overview]
Message-ID: <8761s5tsqk.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1383558955-15033-1-git-send-email-kirill@shutemov.name>
"Kirill A. Shutemov" <kirill@shutemov.name> writes:
> From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
>
> Currently we have few issues with P9_STATS_GEN:
>
> - We don't try to read st_gen anything except files or directories, but
> still set P9_STATS_GEN bit in st_result_mask. It may mislead client:
> we present garbage as valid st_gen.
We should return 0 right ? We do
memset(v9lstat, 0, sizeof(*v9lstat));
in stat_to_v9stat_dotl
>
> - If we failed to get valid st_gen with ENOTTY, we ignore error, but
> still set P9_STATS_GEN bit in st_result_mask.
and have v9lstat.st_gen set to zero
>
> - If we failed to get valid st_gen with any other errno, we fail
> getattr altogether. It's excessive: we block valid client use-cases,
> like chdir(2) to non-readable directory with execution bit set.
>
Can you explain this in detail ?
> The patch fixes these issues and cleanup code a bit.
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
> ---
> hw/9pfs/cofile.c | 4 ----
> hw/9pfs/virtio-9p-handle.c | 8 +++++++-
> hw/9pfs/virtio-9p-local.c | 10 ++++++----
> hw/9pfs/virtio-9p-proxy.c | 3 ++-
> hw/9pfs/virtio-9p.c | 12 ++++++++++--
> 5 files changed, 25 insertions(+), 12 deletions(-)
>
-aneesh
next prev parent reply other threads:[~2013-11-06 16:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-04 9:55 [Qemu-devel] [RESEND] [PATCH] hw/9pfs: fix P9_STATS_GEN handling Kirill A. Shutemov
2013-11-06 16:11 ` Aneesh Kumar K.V [this message]
2013-11-06 17:33 ` Kirill A. Shutemov
2013-11-07 6:45 ` Aneesh Kumar K.V
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8761s5tsqk.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=aliguori@amazon.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=kirill@shutemov.name \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.