Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1774851imu; Thu, 13 Dec 2018 23:49:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/UmjPb/YakI3viZ/JfXQp3wWm79kB3S/RPrwa5oKzCRfG3DOOwkGKHY3tr9n+BxPCVU5tPX X-Received: by 2002:a17:902:8e8b:: with SMTP id bg11mr1971519plb.332.1544773799329; Thu, 13 Dec 2018 23:49:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544773799; cv=none; d=google.com; s=arc-20160816; b=bEuKnpI46IQx+UxjCOw4ceYpU10JAADpDuLuXO/V+Jqp2BxOZGKgsUFFHeJlmSMigS uRd8YENbM3h+Wu4Md8jdcEBJ/Z/GWk1tUhtEc9tMLmsMaCq1mwmXHYmsUKs9jKEyFh9G xOs45BDddrwmyEmdgo6XdMZx+NZCnbV17tHCgJi80XAAEZ+cOfKl6r6cvM+RYBxR8o2W 3coCVzxantKZTHYX83J+78Lf4TvCuwc+bMGVp5WlQjIeQHgmpXMn5FfxX8fiUweHh7vZ oar0hLHCr9vsclE9uEiznPtElNA5D6Pcq6zBR8U88Vd82aqT6fQclDK3IikBuoVGuY51 RGWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:spamdiagnosticmetadata:spamdiagnosticoutput :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=fYvjY/qdG06kbVt0llvUxkweQj7h+gwToveeRQgBqqM=; b=RUNW0haXRnf8sFSXF6n+lq3ZC/e3l9aLmyjWYCSzwCSWAx/8kHhdB0rVYG/rVihpXk EyPm9I4IIhXKw+yyKj//3RthWYjZIlLVUxXmrwpi8SyULLsWsd1DYjyUh/AejdH0qFKA +G50CTKVVd7w3FiFAJzbv4nu7yA9OwP8+K6AAHdgrSZuBBLGrELHkDFCJkuILOv8u4Be hzLRLMXDbKSr0dpuS5Dl0GV+5eW9F6fQxGX3g3DwgscceZN4GeP1P8BPJsOhRYQB678Z aVMqBuvmT1TzhcCKshwP9sWd8p7gH/csJVs8WR70NDXvipKy95iKf82Mm52sv2JzuIa1 Dx9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=ClWqfXci; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4si3600254plc.320.2018.12.13.23.49.44; Thu, 13 Dec 2018 23:49:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=ClWqfXci; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727426AbeLNHsz (ORCPT + 99 others); Fri, 14 Dec 2018 02:48:55 -0500 Received: from mail-eopbgr30127.outbound.protection.outlook.com ([40.107.3.127]:31280 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726998AbeLNHsz (ORCPT ); Fri, 14 Dec 2018 02:48:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fYvjY/qdG06kbVt0llvUxkweQj7h+gwToveeRQgBqqM=; b=ClWqfXciuX8LNjdXw70THvsvDysZIP5qHeoTxdTTxZWWFOBVrlw4h68cXDXGeEghc+7cYYO2ig5i5jDTfJgNtqaVmF/ZF0toD3Ho2YFVtmk0TxMmPABJq4PwLSt+UmvgdNDAScQFGKe0q1ITliv6OnH/GeE36JMzpnUYeXZdEc8= Received: from AM6PR08MB4213.eurprd08.prod.outlook.com (20.178.91.206) by AM6SPR01MB0032.eurprd08.prod.outlook.com (20.177.117.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1425.19; Fri, 14 Dec 2018 07:48:11 +0000 Received: from AM6PR08MB4213.eurprd08.prod.outlook.com ([fe80::503:716b:a67:5fe6]) by AM6PR08MB4213.eurprd08.prod.outlook.com ([fe80::503:716b:a67:5fe6%3]) with mapi id 15.20.1425.021; Fri, 14 Dec 2018 07:48:10 +0000 From: Pavel Tikhomirov To: "Michael S. Tsirkin" CC: Jason Wang , "kvm@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Konstantin Khorenko Subject: Re: [PATCH] vhost: return EINVAL if iovecs size does not match the message size Thread-Topic: [PATCH] vhost: return EINVAL if iovecs size does not match the message size Thread-Index: AQHUkvOy1ciA70m9jUq2f7iIAKeCIqV9FaKAgADHKwA= Date: Fri, 14 Dec 2018 07:48:10 +0000 Message-ID: <677e47dd-6c34-b1ac-67b0-2740fc9f7e30@virtuozzo.com> References: <20181213145350.5454-1-ptikhomirov@virtuozzo.com> <20181213143426-mutt-send-email-mst@kernel.org> In-Reply-To: <20181213143426-mutt-send-email-mst@kernel.org> Accept-Language: ru-RU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR0401CA0068.eurprd04.prod.outlook.com (2603:10a6:3:19::36) To AM6PR08MB4213.eurprd08.prod.outlook.com (2603:10a6:20b:90::14) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ptikhomirov@virtuozzo.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [185.231.240.5] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM6SPR01MB0032;20:F3XME7bOlhH4kxeGzmRQ0lsaXa4L5hF1D28EyZf4BameA23I/y0VTzCXWTHQyswYFuM3X3JJTL3J5IhmbxI/cpB18PID1AYlvA+I2M9A1XTLnpJ14b9DmsdYQaX0hDC13ac2HOGCFvteMYA/oVisJ+ZZjlK4vH4DBzwuwCwt7Fg= x-ms-office365-filtering-correlation-id: 533816c2-32ed-4124-380f-08d661987e82 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:AM6SPR01MB0032; x-ms-traffictypediagnostic: AM6SPR01MB0032: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(3230021)(999002)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231475)(944501520)(52105112)(148016)(149066)(150057)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:AM6SPR01MB0032;BCL:0;PCL:0;RULEID:;SRVR:AM6SPR01MB0032; x-forefront-prvs: 08864C38AC x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39850400004)(376002)(366004)(346002)(136003)(51914003)(189003)(199004)(8676002)(6486002)(6436002)(2906002)(6506007)(53546011)(102836004)(186003)(26005)(386003)(14454004)(6916009)(99286004)(229853002)(81166006)(97736004)(81156014)(316002)(6512007)(7736002)(305945005)(53936002)(107886003)(86362001)(31696002)(6246003)(76176011)(52116002)(8936002)(71190400001)(71200400001)(4326008)(54906003)(256004)(5660300001)(25786009)(2616005)(11346002)(446003)(105586002)(478600001)(486006)(106356001)(36756003)(476003)(66066001)(6116002)(3846002)(31686004)(68736007);DIR:OUT;SFP:1102;SCL:1;SRVR:AM6SPR01MB0032;H:AM6PR08MB4213.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: EY96GarUbu5QLsMFtOAyC3+1QhN3BY7i39vPhhAyQd74Ai4GrvY872C6CplLSMMeD1JVtqmIbke2bCk6oE1XxFVFFdlaDkziajia4RI95pq2gSs89SOtwIm++TDBVF8fSAMDihTwJvBhYmJHenA26NsDT8vjEf8TuGFdJJFAUmCMh/8jrcThbZZFPHvVwWhJniXkJTtFbd4K6D4myz4RBRCPPtqKbAbOsJFyRoX66mDOTD91v+IBYTxo0XvdmZFk6OjEUFijzJV1v7mQ+x2AOawS63ywZFOA8faV3xPNIsk+n0X05XpHgOpL/eYtyfHp spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <69FB16C01A942B4583B044E072F76ACF@eurprd08.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 533816c2-32ed-4124-380f-08d661987e82 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Dec 2018 07:48:10.7859 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6SPR01MB0032 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gMTIvMTMvMjAxOCAxMDo1NSBQTSwgTWljaGFlbCBTLiBUc2lya2luIHdyb3RlOg0KPiBPbiBU aHUsIERlYyAxMywgMjAxO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