linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] iommu/arm-smmu-v3: prevent any devices access to memory without registration
Date: Thu, 12 Jul 2018 18:01:21 +0100	[thread overview]
Message-ID: <20180712170120.GC26935@arm.com> (raw)
In-Reply-To: <1531387723-3592-1-git-send-email-thunder.leizhen@huawei.com>

On Thu, Jul 12, 2018 at 05:28:43PM +0800, Zhen Lei wrote:
> Stream bypass is not security. A malicious device can be hot plugged
> without match any drivers, but it can access to any memory. So change to
> disable bypass by default.
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  drivers/iommu/arm-smmu-v3.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Whilst this sounds nice, I *bet* you it will break some systems. In
particular, those where the SMMU is described but the toplogical information
is either incorrect or incomplete.

I guess we could put it into next and see if anybody complains. What do
others think?

Will

> diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
> index 1d64710..b0ec28d 100644
> --- a/drivers/iommu/arm-smmu-v3.c
> +++ b/drivers/iommu/arm-smmu-v3.c
> @@ -366,7 +366,7 @@
>  #define MSI_IOVA_BASE			0x8000000
>  #define MSI_IOVA_LENGTH			0x100000
> 
> -static bool disable_bypass;
> +static bool disable_bypass = 1;
>  module_param_named(disable_bypass, disable_bypass, bool, S_IRUGO);
>  MODULE_PARM_DESC(disable_bypass,
>  	"Disable bypass streams such that incoming transactions from devices that are not attached to an iommu domain will report an abort back to the device and will not be allowed to pass through the SMMU.");
> --
> 1.8.3
> 
> 

  reply	other threads:[~2018-07-12 17:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-12  9:28 [PATCH 1/1] iommu/arm-smmu-v3: prevent any devices access to memory without registration Zhen Lei
2018-07-12 17:01 ` Will Deacon [this message]
2018-07-13  1:48   ` Leizhen (ThunderTown)
2018-07-13  2:22     ` Hanjun Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180712170120.GC26935@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).