From patchwork Wed Jan 10 23:08:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 858625 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=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zH4TR0CLSz9ryk for ; Thu, 11 Jan 2018 10:09:30 +1100 (AEDT) Received: from localhost ([::1]:47854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZPUt-0006D1-Bw for incoming@patchwork.ozlabs.org; Wed, 10 Jan 2018 18:09:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZPU5-0006Ac-4x for qemu-devel@nongnu.org; Wed, 10 Jan 2018 18:08:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZPU3-00065a-K5 for qemu-devel@nongnu.org; Wed, 10 Jan 2018 18:08:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49266) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eZPTw-00060R-3L; Wed, 10 Jan 2018 18:08:28 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 276BE5D686; Wed, 10 Jan 2018 23:08:27 +0000 (UTC) Received: from red.redhat.com (ovpn-124-124.rdu2.redhat.com [10.10.124.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 42CB917CC6; Wed, 10 Jan 2018 23:08:26 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Wed, 10 Jan 2018 17:08:19 -0600 Message-Id: <20180110230825.18321-1-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 10 Jan 2018 23:08:27 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 0/6] NBD server refactoring before BLOCK_STATUS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: vsementsov@virtuozzo.com, qemu-block@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This is my promised revision of Vladimir's v1 posted here: https://lists.gnu.org/archive/html/qemu-devel/2017-11/msg04119.html Sorry for my delay; it was due in part to an embargo while dealing with 2 bounds-check CVEs in the NBD code that I discovered while reviewing his v1 (fixed in time for 2.11), then waiting for the 2.12 tree to reopen, coupled with my holiday break. I'm hoping we can get actual BLOCK_STATUS code reviewed and applied much faster than this preliminary series has gone. Based-on: <20180110225944.17920-1-eblake@redhat.com> Since v1: - original patch 4/5 now in a pull request - replace original 2-3/5 with a single patch, giving more useful semantics to nbd_opt_drop/nbd_opt_read - add a couple of other easy fixes while touching the file Eric Blake (4): nbd/server: Hoist nbd_reject_length() earlier nbd/server: Better error for NBD_OPT_EXPORT_NAME failure nbd/server: Add va_list form of nbd_negotiate_send_rep_err() nbd/server: Add helper functions for parsing option payload Vladimir Sementsov-Ogievskiy (2): nbd/server: refactor negotiation functions parameters nbd/server: structurize option reply sending nbd/server.c | 341 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 171 insertions(+), 170 deletions(-)