From patchwork Thu Aug 22 19:53:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cameron Esfahani via X-Patchwork-Id: 1151844 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=nongnu.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=crudebyte.com header.i=@crudebyte.com header.b="MRIZrq/s"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46Dz70544Gz9sBF for ; Fri, 23 Aug 2019 08:03:08 +1000 (AEST) Received: from localhost ([::1]:48162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0vAf-0007rs-W8 for incoming@patchwork.ozlabs.org; Thu, 22 Aug 2019 18:03:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43351) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0v88-0007rD-Rr for qemu-devel@nongnu.org; Thu, 22 Aug 2019 18:00:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0v87-0007MW-8a for qemu-devel@nongnu.org; Thu, 22 Aug 2019 18:00:28 -0400 Received: from lizzy.crudebyte.com ([91.194.90.13]:34631) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i0v7w-0006xt-0o for qemu-devel@nongnu.org; Thu, 22 Aug 2019 18:00:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=lizzy; h=Subject:Date:Cc:To:From:Message-Id:Sender: Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZFFxrIgdIoE9R0wF62rENBICWSd8ey/03nJuHXD+WSM=; b=MRIZrq/sCD+0jrwPPjTES+NBmt KvHtLfBozLMfETN0n2ypH44E594kfMlcN1ayBRCuHDJvixO6As44p6Oo83dp7h8OeFwYwKRPpbAqG j28QhmqlEToJNHJrKKgVV9DsfTAhC5Tmuy9gJNWgdTeqRKRuPnMrwYqgAsGwIOjhuX09+IeR6qfJ8 p1/m5TCImfVW6ac+7VWqmks2nGwYldhRa5S8kODyhsDxo+izb8K34OdBlDW0THxEEvhzcssE5HA5q wY3nfjb/ph/+gtfZGy0niLiv+zSEG1hEyrOVlbVkgAEQ8SAcDlxplPpfiZWjLrumthq017WOAbCDG w1Vp4bFw==; Message-Id: To: qemu-devel@nongnu.org Date: Thu, 22 Aug 2019 21:53:04 +0200 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 91.194.90.13 Subject: [Qemu-devel] [PATCH v6 0/4] 9p: Fix file ID collisions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Christian Schoenebeck via Qemu-devel From: Cameron Esfahani via Reply-To: Christian Schoenebeck Cc: Stefan Hajnoczi , Daniel =?utf-8?q?P=2E_Berrang?= =?utf-8?b?w6k=?= , Greg Kurz , Antonios Motakis , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This is v6 of a proposed patch set for fixing file ID collisions with 9pfs. v5->v6: * Rebased to https://github.com/gkurz/qemu/commits/9p-next (SHA1 177fd3b6a8). * Replaced previous boolean option 'remap_inodes' by tertiary option 'multidevs=remap|forbid|warn', where 'warn' is the new/old default behaviour for not breaking existing installations: https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg07098.html * Dropped incomplete fix in v9fs_do_readdir() which aimed to prevent exposing info outside export root with '..' entry. Postponed this fix for now for the reasons described: https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg01862.html Christian Schoenebeck (4): 9p: Treat multiple devices on one export as an error 9p: Added virtfs option 'multidevs=remap|forbid|warn' 9p: stat_to_qid: implement slow path 9p: Use variable length suffixes for inode remapping fsdev/file-op-9p.h | 5 + fsdev/qemu-fsdev-opts.c | 7 +- fsdev/qemu-fsdev.c | 11 ++ hw/9pfs/9p.c | 488 +++++++++++++++++++++++++++++++++++++++++++++--- hw/9pfs/9p.h | 51 +++++ qemu-options.hx | 33 +++- vl.c | 6 +- 7 files changed, 565 insertions(+), 36 deletions(-)