Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1448719ybt; Sun, 14 Jun 2020 23:58:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyj97heycz32+eL04RgNaF8JqhnvYYUJ9Yk6B85V7uV/lDszK9cxOoLX0iDAwKCVdKm90dv X-Received: by 2002:aa7:c38f:: with SMTP id k15mr23547004edq.342.1592204309511; Sun, 14 Jun 2020 23:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592204309; cv=none; d=google.com; s=arc-20160816; b=eA2sgQyJN2FvoIBE9DNfoxz7x3QovMcmVF5WfkI0LNNByvSeV9mninDPdupR85+u29 2QacqRivTu4Rc1CFBCbQ8P4/qDWDeKNOodeYYgOpD6BWZJXaridaYQRTnJ67YOTdsqs3 oMQwywLjdKR0sf4fn9ZYy6Uo+UJZ2d7iXrX6gwZzx1fYFg8P9OGqk+NDLauE8s7bdwqZ OB9ST9CWtlE+xNg7WHG4A9SbJKc5k4+g18Q/EgfDht+mJ9V4OF2cjwl/5fKaCXsoXtTs V5ouqt/nXzkv82FHlOBIGbpTvqR64DyGT9eU6GQjteUzTYAVECm0mfZ4aT5cNcRD632F xXgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=MUOwHw9iZiEwrWWQROIx/2SYatsGWYN7ZOL7y8BmC64=; b=OqmQyGLrvcHhYjTFpWCnPuYL+0mWTNmT+WWA55ivTj38CEbjXh2LgeMUlpsFfBy0/3 NMpdSVc/9fqY+vV7i8bFpBjotTPxZhOHKpztu7YBfrhMg8kP7dFuhTSLtJ/7+QwQsoDW i0/WUaiGhVVUhy2opvwfMzIwyYoIFZNRyH5sbYGO22iaAvn2fgf0SkUA3XNm27xDswdw suIUz+a8vQEvoXLbx0efdD7HpPQDRQx8ozo9AlMSe4nRwV2mFE6ATcPA5TmehP278o9H OGwPTW3Ja36wFG9yudgWstU3RUlJJZvQdw2gGjspZvmIGTHF6vurf8PZI26Ouw1585+g ImJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p4si7628876edq.229.2020.06.14.23.58.08; Sun, 14 Jun 2020 23:58:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728472AbgFOG43 (ORCPT + 99 others); Mon, 15 Jun 2020 02:56:29 -0400 Received: from verein.lst.de ([213.95.11.211]:59842 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728315AbgFOG43 (ORCPT ); Mon, 15 Jun 2020 02:56:29 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 4C8E768B05; Mon, 15 Jun 2020 08:56:26 +0200 (CEST) Date: Mon, 15 Jun 2020 08:56:25 +0200 From: Christoph Hellwig To: David Rientjes Cc: Christoph Hellwig , Thomas Lendacky , Brijesh Singh , Marek Szyprowski , Robin Murphy , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [patch for-5.8 2/4] dma-direct: re-encrypt memory if dma_direct_alloc_pages() fails Message-ID: <20200615065625.GB21248@lst.de> References: 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 11, 2020 at 12:20:29PM -0700, David Rientjes wrote: > If arch_dma_set_uncached() fails after memory has been decrypted, it needs > to be re-encrypted before freeing. > > Fixes: fa7e2247c572 ("dma-direct: make uncached_kernel_address more > general") > Cc: stable@vger.kernel.org # 5.7 > Signed-off-by: David Rientjes Note that this can't really happen in practice as CONFIG_ARCH_HAS_DMA_SET_UNCACHED and memory encryption are mutally exclusive in pracrie. Still looks ok and useful otherwise.