From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbUuo-00082j-Sv for qemu-devel@nongnu.org; Wed, 30 Oct 2013 08:30:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbUuk-0006yT-3B for qemu-devel@nongnu.org; Wed, 30 Oct 2013 08:30:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbUuj-0006xu-RK for qemu-devel@nongnu.org; Wed, 30 Oct 2013 08:30:22 -0400 Date: Wed, 30 Oct 2013 12:29:55 +0000 From: "Daniel P. Berrange" Message-ID: <20131030122955.GI2823@redhat.com> References: <1382834494-27462-1-git-send-email-kirill@shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1382834494-27462-1-git-send-email-kirill@shutemov.name> Subject: Re: [Qemu-devel] [PATCH] hw/9pfs: fix P9_STATS_GEN handling Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Kirill A. Shutemov" Cc: qemu-devel@nongnu.org, aliguori@amazon.com, aneesh.kumar@linux.vnet.ibm.com On Sun, Oct 27, 2013 at 03:41:34AM +0300, Kirill A. Shutemov wrote: > From: "Kirill A. Shutemov" > > 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. > > - If we failed to get valid st_gen with ENOTTY, we ignore error, but > still set P9_STATS_GEN bit in st_result_mask. > > - 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. > > The patch fixes these issues and cleanup code a bit. > > Signed-off-by: Kirill A. Shutemov Reviewed-by: Daniel P. Berrange Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|