Linux-PCI Archive on
 help / color / Atom feed
From: Andy Lutomirski <>
To: Matthew Garrett <>
Cc: linux-efi <>,
	Ard Biesheuvel <>,
	X86 ML <>,, LKML <>,
	Matthew Garrett <>
Subject: Re: [PATCH] [EFI,PCI] Allow disabling PCI busmastering on bridges during boot
Date: Tue, 3 Dec 2019 07:30:06 -0800
Message-ID: <> (raw)
In-Reply-To: <>

On Mon, Dec 2, 2019 at 4:41 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.
> If CONFIG_EFI_NO_BUSMASTER is enabled or the "disable_busmaster=1"
> commandline argument is passed, the EFI stub will clear the busmaster
> bit on all PCI bridges before ExitBootServices() is called. This will
> prevent any malicious PCI devices from being able to perform DMA until
> the kernel reenables busmastering after configuring the IOMMU.

I hate to be an obnoxious bikeshedder, but I really dislike the
"disable_busmaster" name.  I read this and $SUBJECT as "for some
reason, the admin wants to operate the system with busmastering off".
What you really want is something more like "disable busmastering
before IOMMU initialization".  Maybe

Similarly, EFI_NO_BUSMASTER sounds like a permanent state of affairs.

Would a similar patch apply to non-EFI boot?  That is, in a BIOS boot,
is busmastering on when the kernel is loaded?


  parent reply index

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03  0:40 Matthew Garrett
2019-12-03  0:42 ` Matthew Garrett
2019-12-03 11:54   ` Ard Biesheuvel
2019-12-03 13:38     ` Laszlo Ersek
2019-12-03 19:36       ` Matthew Garrett
2019-12-03 19:40     ` Matthew Garrett
2019-12-04  7:11       ` Laszlo Ersek
2019-12-04 19:29         ` Matthew Garrett
2019-12-03 15:30 ` Andy Lutomirski [this message]
2019-12-03 16:33   ` Ard Biesheuvel
2019-12-03 19:41   ` Matthew Garrett
2019-12-04 19:50     ` Andy Lutomirski
2019-12-04 19:56       ` Matthew Garrett
2019-12-12 15:46         ` Ard Biesheuvel
2019-12-13 21:24           ` Matthew Garrett
2019-12-03 18:23 ` kbuild test robot
2019-12-05 13:04 ` kbuild test robot

Reply instructions:

You may reply publically 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:

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

  git send-email \
    --in-reply-to='' \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-PCI Archive on

Archives are clonable:
	git clone --mirror linux-pci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pci linux-pci/ \
	public-inbox-index linux-pci

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone