Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp676180ybl; Mon, 2 Dec 2019 16:44:26 -0800 (PST) X-Google-Smtp-Source: APXvYqwcO3fNgUbW0vbmtsigKhxXbf5sld+6NPcifkmJ2vgOKhCTZoh1H9MCaCG9ltujwmGSuXRk X-Received: by 2002:a05:6830:1615:: with SMTP id g21mr1469580otr.49.1575333866804; Mon, 02 Dec 2019 16:44:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575333866; cv=none; d=google.com; s=arc-20160816; b=Fy99D1kSebLrlO4o2xpWqBVXTitc0/Z859i89bgvF9o6ib25k5h6/GJbTGHAgJMRzA Pb7ANXtgj5uKRQVYNvlM5+i04C17BvEcws/dp2cr7YKwUHHkc1cM0Ygs3v4iN00tmGDd XnzBW6a51VXTD+fnizXkxyMrlfczOzlHmj85kUnrON8KT52VXt++a5fFpzjJqKRojHvu mRVX8mZL4GEdG5I024mXPz/XeZalsp5iI7muZ3/nluOWuvd9aYKGJJavWFYpRDjRpZi+ ujRGt9015lXiTWk8NoEx/dRA7UoiefvrVO0iHD94HdMllZUIwg/zsboQKtAKywOsLavA CZiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4jnL6iDubLY8gL5JP3QSc0ju+BQUG+h8VIAOn+X5oWQ=; b=axKA6/MMi0sqcESuPJJ6UqiuwJtAxxq8tBM+gGonuzG78uB7NMpiaJec0/SVHHBYjV mLRAZSvMmYFC6Hou74ZXM3njS21Hfh4cPb0LWQ3vtePqDWR9MylWEAlfzwmvvMqk86EZ WRF2BbQ13wtczdTEX/aXA6Mf9+DSFha8Dr8p1SRQLNyZ0aO492v60uZXtomdLY+hCmMg L4y7Px8lFdF/GPLWq8qeiHvTgGd7akA6S+9tLf7bkJ5YyD4ilfL90VRlMGlRWc+Zy7KH ZLSsNvXTS5E9hyUzNXtVJESfrExcAAQ4ULhcIqcR0OWjz3KNPLSlQUGLg8JWUI+BPyWv 7f9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=T00bsc0A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w30si418768oth.219.2019.12.02.16.44.14; Mon, 02 Dec 2019 16:44:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=T00bsc0A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727316AbfLCAnM (ORCPT + 99 others); Mon, 2 Dec 2019 19:43:12 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:39668 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727269AbfLCAnK (ORCPT ); Mon, 2 Dec 2019 19:43:10 -0500 Received: by mail-io1-f65.google.com with SMTP id c16so1654009ioh.6 for ; Mon, 02 Dec 2019 16:43:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4jnL6iDubLY8gL5JP3QSc0ju+BQUG+h8VIAOn+X5oWQ=; b=T00bsc0APIQpp0kFPoFsLBa72cSKQI8/kvf/jrmlw4YTXIkoV3Uo9vYbKOVb/uvmMa Fx0TgLfE1CVyHBCn7J7nM976Z7PON3M3w+uSZtQ2kTxe+7DNpYO1vky1kHc7MGIzcifk Rsgk4WafvGso2zBq8zzPlQSTSk797b7OEJlbteHeDpdZ+gwvXPs5Nniz0vbM33QLo++f 5WJ3xnuNz/Crxcb8d8IUNaOA8+ssCGZqzJbMWlPmvRzBWmuRrGqBI8UecAbi+m6cUljH FvUNkjv38k90sNUFreVKS1i8TAkgxv4pKR1dCeBNykyTp5S+fR9yd6wQ6dhzRH2CzVjC hetg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4jnL6iDubLY8gL5JP3QSc0ju+BQUG+h8VIAOn+X5oWQ=; b=DhF6ynmi9mAssKJKmN5Kx1oC0TyAYlbXUalbAkIHRMPz2j6ZdDweK7/24Ky86tiAuG xFUGx98h6xfS2KCyboMYtzI517Yc1WjRAg0Njnbd6+HAyu2L164FHg9DX8BJaTPsGF/l eeIlNorT6sn7FqjfWPW+Y41uM4+K2BeeidR0/deuidqn7/a8GvqKVCPlt5HpFf0nFbog nRfG0gT1xn/Xg70kOBg/H7hYfgFq9I3HdX4w4MURpINod7mrTONTVgkCl0mWSVPZ0Pkt 4bYaA7Bg4fd7dGFmQQHxKQ8G83NGzEMe7kutIC5VSWDtVwPx+W+nh3ky6qWKlovobZl9 MqnA== X-Gm-Message-State: APjAAAX8EacICCHMhPRo2zyUCkznCPMl2/PwBxeR4M8ZP9OvYDDiF/2N zAMCiVMadLpCXf0bsnjoUlzwrYL73z2UAqTANMU0nQ== X-Received: by 2002:a5e:df06:: with SMTP id f6mr235848ioq.84.1575333788813; Mon, 02 Dec 2019 16:43:08 -0800 (PST) MIME-Version: 1.0 References: <20191203004043.174977-1-matthewgarrett@google.com> In-Reply-To: <20191203004043.174977-1-matthewgarrett@google.com> From: Matthew Garrett Date: Mon, 2 Dec 2019 16:42:57 -0800 Message-ID: Subject: Re: [PATCH] [EFI,PCI] Allow disabling PCI busmastering on bridges during boot To: linux-efi Cc: Ard Biesheuvel , x86@kernel.org, linux-pci@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 2, 2019 at 4:40 PM Matthew Garrett wrote: > > Add an option to disable the busmaster bit in the control register on > all PCI bridges before calling ExitBootServices() and passing control to > the runtime kernel. System firmware may configure the IOMMU to prevent > malicious PCI devices from being able to attack the OS via DMA. However, > since firmware can't guarantee that the OS is IOMMU-aware, it will tear > down IOMMU configuration when ExitBootServices() is called. This leaves > a window between where a hostile device could still cause damage before > Linux configures the IOMMU again. I don't know enough about ARM to know if this makes sense there as well. Anyone?