Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp741669imp; Wed, 20 Feb 2019 08:12:45 -0800 (PST) X-Google-Smtp-Source: AHgI3IZOZPjIGhHbR7ZOlCpSKC895EufX/nQDqvWGdKb5ViO248d/meeDTYMTSKyHViKREyPW7V0 X-Received: by 2002:a63:4c18:: with SMTP id z24mr30001594pga.62.1550679165870; Wed, 20 Feb 2019 08:12:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550679165; cv=none; d=google.com; s=arc-20160816; b=lSlnag74nYz+h1Tuw1pNaBHA8U4lSo6DGkYZ4fMSi1S8forWLlHr+0/0lE0lTOw1tX U9YytADHR9T9P8yCGGNF+eQBzJ3zqDDSzoiC+jKjwTHgPW+GzRQwuM4IoCt+yx7f+Gol 1F8R++oE0jP3Iob22ngvGiZ44Qf+orHoFTKNPTJ5E3707BkANJpKksCTP9OMFnbIjJ65 YSwW27qSen4rGB2kLlDRpqWGloTs1/XUKbSyggW0h4wDAWMudAkelAF2+otPQvGfjJHb 4eNE92l2jhrI5z/q2pOCnp2EREDZ0qHAMgBR8PWiCo+oFfYNm3zlvCaMZEVA4aiE9C4q wgOA== 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 :msip_labels:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=mleaoC2bZ/hPiNEKkaiKieDlG3YT6JG6aAvkEaxmrFk=; b=G3VrWGeXPX1XujwzKUXnCUtBaBlo6JY6uDX+5/VhbZsbrTnpgr2I2vCavihPYf/vp5 Fjq+ikKIFGtIwla525H35le6d1ABncC52GO6/4gr147LzKcrUbYXxkQTVtNBeKhGs6bm ohXyKN3Wey8IYQFp0x/N0ZgMe+4kM5YcmunYu1GDVhc+cYVBFGLjlRN+t1k1aIQnvgdT 7ghIISY9nieNhHiQjtaYrrqRCRExxSKRXH1hMA1xIOLYM/ZyQL7o8Gl0Yd2OHOGmloO7 mInlNG38peIKDDr4KpYnesQNOEWn+FztUMUmRGUsQBSLh50jtn9oGp0PngRnqgJ+tzwY U3rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=c37wkrYo; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si18445954pgb.192.2019.02.20.08.12.29; Wed, 20 Feb 2019 08:12:45 -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=@microsoft.com header.s=selector1 header.b=c37wkrYo; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727255AbfBTQL0 (ORCPT + 99 others); Wed, 20 Feb 2019 11:11:26 -0500 Received: from mail-eopbgr730099.outbound.protection.outlook.com ([40.107.73.99]:24677 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726116AbfBTQLY (ORCPT ); Wed, 20 Feb 2019 11:11:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mleaoC2bZ/hPiNEKkaiKieDlG3YT6JG6aAvkEaxmrFk=; b=c37wkrYoE5buA/LaUYB70Tds02Vgs4qu7gUM2Xa1xEwFvMY5F9rOw5ksrLd5QIFiB/bIK9qwD09LFb0XD9uv7MP2vm1mpz2ykGMTTtymDcRCSkZS561NgDeuDDt6CM3ZA2Nzi3TKRmh0zAhZxBPF3bcKTfNXodzDWbHe/XWH14c= Received: from DM5PR2101MB0918.namprd21.prod.outlook.com (52.132.132.163) by DM5PR2101MB1109.namprd21.prod.outlook.com (52.132.130.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.1; Wed, 20 Feb 2019 16:11:17 +0000 Received: from DM5PR2101MB0918.namprd21.prod.outlook.com ([fe80::ec2d:d32b:e611:553f]) by DM5PR2101MB0918.namprd21.prod.outlook.com ([fe80::ec2d:d32b:e611:553f%9]) with mapi id 15.20.1665.006; Wed, 20 Feb 2019 16:11:17 +0000 From: Michael Kelley To: kimbrownkd , Long Li , Sasha Levin , Stephen Hemminger , Dexuan Cui CC: KY Srinivasan , Haiyang Zhang , "devel@linuxdriverproject.org" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" Subject: RE: [PATCH v2 2/2] Drivers: hv: vmbus: Return -EINVAL if monitor_allocated not set Thread-Topic: [PATCH v2 2/2] Drivers: hv: vmbus: Return -EINVAL if monitor_allocated not set Thread-Index: AQHUyBVVmRJUghwXe0qbnxMNLyQDBqXo3TnQ Date: Wed, 20 Feb 2019 16:11:17 +0000 Message-ID: References: <7481d15f52427917a5f620e29308c1aa5c63f3eb.1550554279.git.kimbrownkd@gmail.com> In-Reply-To: <7481d15f52427917a5f620e29308c1aa5c63f3eb.1550554279.git.kimbrownkd@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=mikelley@ntdev.microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2019-02-20T16:11:15.6877498Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=298b04c2-e694-45ee-ab77-51bc7f355705; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic x-originating-ip: [24.22.167.197] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2e865624-936b-4ffd-7a1b-08d6974e0ba3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600110)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:DM5PR2101MB1109; x-ms-traffictypediagnostic: DM5PR2101MB1109: x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-microsoft-exchange-diagnostics: =?us-ascii?Q?1;DM5PR2101MB1109;23:5xj+kkamBhez3A+o53Fit9iP/chBdJsPtHY+5e0?= =?us-ascii?Q?NSgOp3qRgU5C8c4kXpV7Dhn+e94/gnzAO77V6/ojTT1x378QIoym+pNCtoPK?= =?us-ascii?Q?DCb6Opd4vRX4xH/fb7vfzE5VL1hMXhIV4as0u4Dh+xPAXh8g/CkT6oAu2nsE?= =?us-ascii?Q?yGKowAfcgBCNT6wUe65iN7MT/QlcQFo0hVAMUk7s6f3ogff6QD5dFsE3hZjy?= =?us-ascii?Q?DKyPcjUg2DbIycVpR3++4CPVEiRrH0Bso/8+AmrCCJCTde+u6fllLXxMW2wh?= =?us-ascii?Q?fq6zNA49/ouidAMuc83YMXGgd1EV8F4UHfvaGc1v2rGC72RrWFH1t7Y67UxV?= =?us-asc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p2h8cecoBHHMRv3sBhMq4Ukl?= =?us-ascii?Q?lidubFUZ7BQz7bokaodMURq9tm6EX3BvObqL1oILDsD5m+n3Xws14cl6cHQo?= =?us-ascii?Q?CTu0o9onS9cjq2yIq02e3psVVqd+VPWxefPNJufyylIeFv5uYvRaYPkUm0XG?= =?us-ascii?Q?kU8DmSwnKLJNK8Hc7amdAftDLAiLV7qE792OEao60J1omgmPf?= x-microsoft-antispam-prvs: x-forefront-prvs: 0954EE4910 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(366004)(346002)(396003)(376002)(39860400002)(199004)(189003)(5660300002)(6116002)(186003)(11346002)(97736004)(446003)(6346003)(86362001)(3846002)(4326008)(102836004)(26005)(68736007)(106356001)(8676002)(476003)(81166006)(81156014)(55016002)(71200400001)(71190400001)(6506007)(53936002)(86612001)(256004)(25786009)(6246003)(9686003)(486006)(6636002)(14444005)(1511001)(14454004)(478600001)(229853002)(8990500004)(74316002)(8936002)(66066001)(105586002)(6436002)(7736002)(305945005)(10090500001)(33656002)(110136005)(54906003)(22452003)(76176011)(7696005)(2906002)(10290500003)(316002)(99286004);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1109;H:DM5PR2101MB0918.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=mikelley@microsoft.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: defr0ZydGPNEqpOdsK1KPW2yS66c1zzNwA6IpR9JU8xu0XUSo1XTxhRKOI9Vd8qbfJEbi9Mz9TdfwnKpejRiyId1nKGUY6HXHLTKDhES53gYU20+bdp4DHflWmrkFCGuK/wOsYcp55eZiltbfAmGK9q4bvzkcsG5ySvc34HcxN4Ba6d8vN6ZNNyfwZ+2SdmlCNqy6pZ+0OugffiShtLWoLMDU2Z882nhjQlKcxueDnE/9El+bkHGxxV4NAhjtDZGR4cYwEeTmlEDnDSOfu0qr3KY/xzW00xELvkdkiWai7tCUdfmazIJvh3rO/dOqZZqSp6KYaRBT8pELblT9Z0VJx06YYn7EFIe6qMTr6s+TvYQWdlNaLYy0HPWdaOBN//syYXUTACAID+m1QWadINtotqIuz6qhqpardWfLAh8CAs= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e865624-936b-4ffd-7a1b-08d6974e0ba3 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2019 16:11:17.6121 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1109 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kimberly Brown Sent: Monday, February 18, 201= 9 9:38 PM >=20 > There are two methods for signaling the host: the monitor page mechanism > and hypercalls. The monitor page mechanism is used by performance > critical channels (storage, networking, etc.) because it provides > improved throughput. However, latency is increased. Monitor pages are > allocated to these channels. >=20 > Monitor pages are not allocated to channels that do not use the monitor > page mechanism. Therefore, these channels do not have a valid monitor id > or valid monitor page data. In these cases, some of the "_show" > functions return incorrect data. They return an invalid monitor id and > data that is beyond the bounds of the hv_monitor_page array fields. >=20 > The "channel->offermsg.monitor_allocated" value can be used to determine > whether monitor pages have been allocated to a channel. In the affected > "_show" functions, verify that "channel->offermsg.monitor_allocated" is > set before accessing the monitor id or the monitor page data. If > "channel->offermsg.monitor_allocated" is not set, return -EINVAL. >=20 > Signed-off-by: Kimberly Brown > Reviewed-by: Michael Kelley