Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp677589imu; Fri, 7 Dec 2018 07:16:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/UPxzx5jgLTjSPETslvFGK3UfSEEoU7AM+m9ancotWmxoxXV4zQPcAiWn5DMDmTBJgi6j25 X-Received: by 2002:a62:4587:: with SMTP id n7mr2602492pfi.118.1544195815769; Fri, 07 Dec 2018 07:16:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544195815; cv=none; d=google.com; s=arc-20160816; b=T5FjKkQIF3dthGLiIddypJy1iRmiPUd4d4z64xFW6/QUimmR2je8B+HRrpJ+Wmqyo4 42CZzyG5aHHL9ydcr1GvTPtPF4Y24P9K2qvKPXTxUGT8EX5td+K5gWQsq/9HhXhTsu7X p/vJwoa9orVZbemIOS3hj0ZI1KHTuUeTV8Zoc3Ouukj90ebBF5NOuHRJT24oWaXAswHr F8UgbKNQjfLfl/AospRrts2w5NH8YPL4j2UmpMjOS/25HvcYR3LaLiJi7HGZVzG2/19e LdMVGs+CzBQ5Ze9PSuU/YSlPYTRnvJqT8fUJNEfjOl9m95peFQzb9lGu9V+DzL53ljOj 3owA== 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-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=VKqa1O6K75G0q9nLU5MV6vDHkCrtID1PfVQ/XgOIhlY=; b=r6GxDveBpJGa3+XV4j3TvIR+LXL2n8OZUhfF9T5GyoxvjkwLwKzbXJ7Ms+kGU4IBT7 eQzorbdfB3SXq4vTtAQ5tW1DhM5cWKvEsYVm2zbelH51TQhFpl9nP9PZRWTy/Kw+COEF +iTizEMHGKO2epLkeHxbXgZ32VrM6kYyilo/iOL/OmDFUguIABdHfNaL9lrd1l9PwD1J ohXwjkBHx7+oRWVAF12XakDpY0k8aGfBHQFaWZklwy/ZqXMU7hCVJRSfQPvEQWzLmdSU oASJCv5dEszF7E5SWKeHbC0FVigdreIypAUg8NnXy+PhOBbUD2NP8JzxBJebm8Qnf9NW 891g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10si3097576pgt.222.2018.12.07.07.16.27; Fri, 07 Dec 2018 07:16:55 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726138AbeLGPPn (ORCPT + 99 others); Fri, 7 Dec 2018 10:15:43 -0500 Received: from smtp.ctxuk.citrix.com ([185.25.65.24]:49806 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbeLGPPm (ORCPT ); Fri, 7 Dec 2018 10:15:42 -0500 X-IronPort-AV: E=Sophos;i="5.56,326,1539648000"; d="scan'208";a="82958796" From: Paul Durrant To: 'Dongli Zhang' , "linux-kernel@vger.kernel.org" , "xen-devel@lists.xenproject.org" , "linux-block@vger.kernel.org" CC: "axboe@kernel.dk" , Roger Pau Monne , "konrad.wilk@oracle.com" Subject: RE: [Xen-devel] [PATCH 1/1] xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront Thread-Topic: [Xen-devel] [PATCH 1/1] xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront Thread-Index: AQHUjePlVFCFD2KmD0G9djADL/FCxaVzAuIQgABOcICAABGFIA== Date: Fri, 7 Dec 2018 15:15:37 +0000 Message-ID: <4b5b3d4fb52c421d9be3f204b5695cc2@AMSPEX02CL03.citrite.net> References: <1544156284-7756-1-git-send-email-dongli.zhang@oracle.com> <742d0e02a1aa4031ad68a9f81fe2bdc4@AMSPEX02CL03.citrite.net> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBEb25nbGkgWmhhbmcgW21haWx0 bzpkb25nbGkuemhhbmdAb3JhY2xlLmNvbV0NCj4gU2VudDogMDcgRGVjZW1iZXIgMjAxOCAxNTox MA0KPiBUbzogUGF1bCBEdXJyYW50IDxQYXVsLkR1cnJhbnRAY2l0cml4LmNvbT47IGxpbnV4LWtl cm5lbEB2Z2VyLmtlcm5lbC5vcmc7DQo+IHhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZzsg bGludXgtYmxvY2tAdmdlci5rZXJuZWwub3JnDQo+IENjOiBheGJvZUBrZXJuZWwuZGs7IFJvZ2Vy IFBhdSBNb25uZSA8cm9nZXIucGF1QGNpdHJpeC5jb20+Ow0KPiBrb25yYWQud2lsa0BvcmFjbGUu Y29tDQo+IFN1YmplY3Q6IFJlOiBbWGVuLWRldmVsXSBbUEFUQ0ggMS8xXSB4ZW4vYmxrYmFjazog cmV3b3JrIGNvbm5lY3RfcmluZygpIHRvDQo+IGF2b2lkIGluY29uc2lzdGVudCB4ZW5zdG9yZSAn cmluZy1wYWdlLW9yZGVyJyBzZXQgYnkgbWFsaWNpb3VzIGJsa2Zyb250DQo+IA0KPiBIaSBQYXVs LA0KPiANCj4gT24gM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