From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D8AEC4338F for ; Tue, 24 Aug 2021 05:29:55 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C6AED610C9 for ; Tue, 24 Aug 2021 05:29:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C6AED610C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=irrelevant.dk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:48364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIP0T-0000zZ-Kq for qemu-devel@archiver.kernel.org; Tue, 24 Aug 2021 01:29:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIOxD-0008WJ-Rt; Tue, 24 Aug 2021 01:26:31 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:46863) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIOxB-0000sC-IK; Tue, 24 Aug 2021 01:26:31 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C9AB75C00E2; Tue, 24 Aug 2021 01:26:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 24 Aug 2021 01:26:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=1B5o3MGNAmHT9V+LjIl3VdHgqFr j1hBKM2YldIOteTI=; b=OMhFFyFKydA4JmgFSxD5N/3jXb6+OegN7CvGVtt8mLm fRLwVu1IrH4nflK0Fi6OrmwkS46wFeVDyZi5FVDcXyQTjnZ6WR9pGCWSyZfN4z63 mVvgGt1UKvKxGiZhMTxzMk7V4ZuxSVX+GFEa8cSTN3zJTlknM9hVEJ8vx42USaax ur+7+pHzGmbeTjEMtEiDEUpHCtyvhdtgJq17y8YmuQXs6idbAmfmkFlKjA4yvx/3 8cB5DAmzUAPekTPO8ovG9IpxUO5iD121spX3titmjbVv4joCxv4u0GSiQDOK95oP R4nFUWdgutFx+wd3URaJZfoO9cOKi0yyhu0uZB0rq7w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=1B5o3M GNAmHT9V+LjIl3VdHgqFrj1hBKM2YldIOteTI=; b=DXrU3K84gmaqM3VhxaGQ2o al0/emF/H0kqlgO3wRo3fgku2Fket4SVFaDhCZuv1hZUZ19eVYEOBWZ20VuvNc71 Sg0/vRypt0ciRLvR7PtGVEA24S47UDKpybDtG+9yX3T17bL2zQM8vDOTQFIzj49h cDHzKZchQRE3c1s0yMhH6e3DK6LscQ9rv2XS3VagxrH7T7uEf9jgT0oXKxFJgDSl 8lyv2fjx4AB46OiK/bDNDsWEjeIZPHTcq+nBp4OavkKdBbZJfa5KhqavqnkF4qLC /tIMGo2SUHPyNmDIc/AnCoocAc4g5DvVlB9rENuBxV2o0SfEUqAYFWmPkn3KSxTQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddtiedgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttdejnecuhfhrohhmpefmlhgruhhs ucflvghnshgvnhcuoehithhssehirhhrvghlvghvrghnthdrughkqeenucggtffrrghtth gvrhhnpeejgeduffeuieetkeeileekvdeuleetveejudeileduffefjeegfffhuddvudff keenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehith hssehirhhrvghlvghvrghnthdrughk X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 24 Aug 2021 01:26:25 -0400 (EDT) Date: Tue, 24 Aug 2021 07:26:24 +0200 From: Klaus Jensen To: Keith Busch Subject: Re: [PATCH] hw/nvme: fix validation of ASQ and ACQ Message-ID: References: <20210823122018.401370-1-its@irrelevant.dk> <20210824014748.GA64408@C02WT3WMHTD6> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ccHo8Ir1q8F218io" Content-Disposition: inline In-Reply-To: <20210824014748.GA64408@C02WT3WMHTD6> Received-SPF: pass client-ip=66.111.4.25; envelope-from=its@irrelevant.dk; helo=out1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: Klaus Jensen , qemu-devel@nongnu.org, qemu-block@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --ccHo8Ir1q8F218io Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Aug 23 19:47, Keith Busch wrote: > On Mon, Aug 23, 2021 at 02:20:18PM +0200, Klaus Jensen wrote: > > From: Klaus Jensen > >=20 > > Address 0x0 is a valid address. Fix the admin submission and completion > > queue address validation to not error out on this. >=20 > Indeed, there are environments that can use that address. It's a host err= or if > the controller was enabled with invalid queue addresses anyway. The contr= oller > only needs to verify the lower bits are clear, which we do later. >=20 > Reviewed-by: Keith Busch >=20 Thanks Keith, Yeah, I noticed this with a VFIO-based driver where the IOVAs typically start at 0x0. And yes, I specifically refrained from adding any other sanity checks on the addresses. I.e., we could add a check for ASQ !=3D ACQ, but who are we to judge ;) Applied to nvme-next! --ccHo8Ir1q8F218io Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUigzqnXi3OaiR2bATeGvMW1PDekFAmEkgvwACgkQTeGvMW1P DelBgQf8DZBOJpc2xuUqyGHkj9BD9cP/MF8Ge2ahCkaCh01vkI9P7HURiTiRT1zd Qic/wovyYwjAfpa1X/dGWlYUyiRM01MQBt9dPvGscDynaBKnLHWzoTlGraUvbRdK UBKNMkE6+b276hFTNICLaGpzvnZOmRd0RY5wNC3dWNys7I61aalb5Zzij3ne3dHT UJEyliZHlA+7/rFPZB9VDCQoqX00zXSApQ4zNYxZ+EBXcgJXMe/fziPDR1NQ2Zqa AMM8RlOXLXflN2xcUnGhUgR1PA7U6gkEWIISacWQvxsct5fnZwLFYWeq88YuLg+e pfzcKRBDuL98HUsaWlTL1Tf4cPisAw== =GKQD -----END PGP SIGNATURE----- --ccHo8Ir1q8F218io--