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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 9B585C433DB for ; Wed, 3 Feb 2021 12:53:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5284364F78 for ; Wed, 3 Feb 2021 12:53:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231335AbhBCMwq (ORCPT ); Wed, 3 Feb 2021 07:52:46 -0500 Received: from verein.lst.de ([213.95.11.211]:51025 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbhBCMuH (ORCPT ); Wed, 3 Feb 2021 07:50:07 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 3E31267357; Wed, 3 Feb 2021 13:49:23 +0100 (CET) Date: Wed, 3 Feb 2021 13:49:22 +0100 From: Christoph Hellwig To: Martin Radev Cc: Christoph Hellwig , konrad.wilk@oracle.com, m.szyprowski@samsung.com, robin.murphy@arm.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, joro@8bytes.org, kirill.shutemov@linux.intel.com, thomas.lendacky@amd.com, robert.buhren@sect.tu-berlin.de, file@sect.tu-berlin.de, mathias.morbitzer@aisec.fraunhofer.de, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org Subject: Re: [PATCH] swiotlb: Validate bounce size in the sync/unmap path Message-ID: <20210203124922.GB16923@lst.de> References: <20210113113017.GA28106@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 18, 2021 at 12:44:58PM +0100, Martin Radev wrote: > Your comment makes sense but then that would require the cooperation > of these vendors and the cloud providers to agree on something meaningful. > I am also not sure whether the end result would be better than hardening > this interface to catch corruption. There is already some validation in > unmap path anyway. So what? If you guys want to provide a new capability you'll have to do work. And designing a new protocol based around the fact that the hardware/hypervisor is not trusted and a copy is always required makes a lot of more sense than throwing in band aids all over the place.