Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3692669pxj; Tue, 15 Jun 2021 06:42:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ0ovyRQXGEcbXP3cC+Wcml1jyO+Iy1wCnIQZpC22bpyUMCM+dzBBtFLWSTRic1+QkDiqM X-Received: by 2002:a05:6402:1e8b:: with SMTP id f11mr23706422edf.86.1623764555436; Tue, 15 Jun 2021 06:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623764555; cv=none; d=google.com; s=arc-20160816; b=g2vgGP5o12sFWoJ42BooQ/QTyudhX4nY3jOwE0bitqpQuFSQipEjJb7qN2c3AJysng CBiNlqI7rfHpVAecoeK3ExX2daT2JkB3BCMSOsilqpQnpF5ZUYMVh4lFolP6vnwCYqzS Zbp15uP6F9tH7eVsbK6sBQ8jtUERAC12nMzzCJPH0NAH247olLxkiSvyf8duZBD6WvyS dPOlMtgsWs/3ZKD+/xJr4VuPFl7wk3wJZPeRy3t6EWM5oHcH3zZIhbbtjNcn72po8Stb svlltk8So11ZI13aOtwURyt5e9GvlCnrKamdB3THF++4LnPOo27+tgAb/7p+y/Q/kyW3 /+5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=D/bSr9CpAX9pCySGYMDZAmuZFutROmJCx11n2pmx8lE=; b=F4XrPQc666Oeua9/JqbjnnaOhBEb2+iAT05DI0/ph4u2o/XPTDA8YQfQrJKTMcNK/7 ZwlX5yqwy7TIUosEnfLTTcA5pZW9jdp9A6DsAUkRClsFxDy2UyD6RLE4Co2uzxm1PQZe wtzs3yqnz7TNqdLa1wLCAba39mdzf/LY0nfOAvJ+8bkLYbCu2/x/E+oQAB7si+GAEkoC gRgust3t1AdBPapb954fmjVucCUEiax3LCCY6LEqfe/WgaPMlf7Z5QIOD4+3ktn05AUE t662DT2kSeJALrPpHnMHir9Z990PzjkvLR70iIpDZZlKoUvlsvOkvocWu1p6gV8vCBFq yTmQ== 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 o12si13942905edc.382.2021.06.15.06.42.12; Tue, 15 Jun 2021 06:42:35 -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 S231516AbhFONm6 (ORCPT + 99 others); Tue, 15 Jun 2021 09:42:58 -0400 Received: from verein.lst.de ([213.95.11.211]:49354 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231293AbhFONmj (ORCPT ); Tue, 15 Jun 2021 09:42:39 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id C138F67373; Tue, 15 Jun 2021 15:40:32 +0200 (CEST) Date: Tue, 15 Jun 2021 15:40:32 +0200 From: Christoph Hellwig To: Claire Chang Cc: Rob Herring , mpe@ellerman.id.au, Joerg Roedel , Will Deacon , Frank Rowand , Konrad Rzeszutek Wilk , boris.ostrovsky@oracle.com, jgross@suse.com, Christoph Hellwig , Marek Szyprowski , benh@kernel.crashing.org, paulus@samba.org, "list@263.net:IOMMU DRIVERS" , sstabellini@kernel.org, Robin Murphy , grant.likely@arm.com, xypron.glpk@gmx.de, Thierry Reding , mingo@kernel.org, bauerman@linux.ibm.com, peterz@infradead.org, Greg KH , Saravana Kannan , "Rafael J . Wysocki" , heikki.krogerus@linux.intel.com, Andy Shevchenko , Randy Dunlap , Dan Williams , Bartosz Golaszewski , linux-devicetree , lkml , linuxppc-dev@lists.ozlabs.org, xen-devel@lists.xenproject.org, Nicolas Boichat , Jim Quinlan , tfiga@chromium.org, bskeggs@redhat.com, bhelgaas@google.com, chris@chris-wilson.co.uk, daniel@ffwll.ch, airlied@linux.ie, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, jani.nikula@linux.intel.com, jxgao@google.com, joonas.lahtinen@linux.intel.com, linux-pci@vger.kernel.org, maarten.lankhorst@linux.intel.com, matthew.auld@intel.com, rodrigo.vivi@intel.com, thomas.hellstrom@linux.intel.com Subject: Re: [PATCH v10 09/12] swiotlb: Add restricted DMA pool initialization Message-ID: <20210615134032.GI20389@lst.de> References: <20210615132711.553451-1-tientzu@chromium.org> <20210615132711.553451-10-tientzu@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210615132711.553451-10-tientzu@chromium.org> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 15, 2021 at 09:27:08PM +0800, Claire Chang wrote: > Add the initialization function to create restricted DMA pools from > matching reserved-memory nodes. > > Regardless of swiotlb setting, the restricted DMA pool is preferred if > available. > > The restricted DMA pools provide a basic level of protection against the > DMA overwriting buffer contents at unexpected times. However, to protect > against general data leakage and system memory corruption, the system > needs to provide a way to lock down the memory access, e.g., MPU. > > Signed-off-by: Claire Chang Looks good, Reviewed-by: Christoph Hellwig