2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-26 15:45:14 +08:00
linux-next/drivers/iommu
Andy Lutomirski af8d102f99 x86/intel/irq_remapping: Clean up x2apic opt-out security warning mess
Current kernels print this on my Dell server:

   ------------[ cut here ]------------
   WARNING: at drivers/iommu/intel_irq_remapping.c:542
   intel_enable_irq_remapping+0x7b/0x27e()
   Hardware name: PowerEdge R620
   Your BIOS is broken and requested that x2apic be disabled
   This will leave your machine vulnerable to irq-injection attacks
   Use 'intremap=no_x2apic_optout' to override BIOS request
   [...]
   Enabled IRQ remapping in xapic mode
   x2apic not enabled, IRQ remapping is in xapic mode

This is inconsistent with itself -- interrupt remapping is *on*.

Fix the mess by making the warnings say what they mean and my
making sure that compatibility format interrupts (the dangerous
ones) are disabled if x2apic is present regardless of BIOS
settings.

With this patch applied, the output is:

  Your BIOS is broken and requested that x2apic be disabled.
  This will slightly decrease performance.
  Use 'intremap=no_x2apic_optout' to override BIOS request.
  Enabled IRQ remapping in xapic mode
  x2apic not enabled, IRQ remapping is in xapic mode

This should make us as or more secure than we are now and
replace a rather scary warning with a much less scary warning on
silly but functional systems.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Link: http://lkml.kernel.org/r/2011b943a886fd7c46079eb10bc24fc130587503.1359759303.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-02-03 12:13:48 +01:00
..
amd_iommu_init.c iommu/amd: Work around wrong IOAPIC device-id in IVRS table 2012-10-16 14:52:51 +02:00
amd_iommu_proto.h iommu/amd: Add initialization routines for AMD interrupt remapping 2012-09-28 17:43:52 +02:00
amd_iommu_types.h iommu/amd: Properly account for virtual aliases in IOMMU groups 2012-10-24 17:30:22 +02:00
amd_iommu_v2.c IOMMU Updates for Linux v3.6-rc1 2012-07-24 16:24:11 -07:00
amd_iommu.c x86, io-apic: Move CONFIG_IRQ_REMAP code out of x86 core 2013-01-28 12:17:27 +01:00
dmar.c x86, irq: Move irq_remapping_enabled declaration to iommu code 2013-01-28 12:17:26 +01:00
exynos-iommu.c iommu/exynos: use list_del_init instead of list_del/INIT_LIST_HEAD 2012-09-18 12:44:02 +02:00
intel_irq_remapping.c x86/intel/irq_remapping: Clean up x2apic opt-out security warning mess 2013-02-03 12:13:48 +01:00
intel-iommu.c x86, irq: Move irq_remapping_enabled declaration to iommu code 2013-01-28 12:17:26 +01:00
iommu.c Merge branches 'iommu/fixes', 'x86/amd', 'groups', 'arm/tegra' and 'api/domain-attr' into next 2012-07-23 12:17:00 +02:00
iova.c iommu: Fix typo in iommu 2012-07-24 12:58:49 +02:00
irq_remapping.c x86, irq: Move irq_remapped out of x86 core code 2013-01-28 12:51:52 +01:00
irq_remapping.h x86, irq: Move irq_remapping_enabled declaration to iommu code 2013-01-28 12:17:26 +01:00
Kconfig iommu/amd: Check if IOAPIC information is correct 2012-09-28 17:31:09 +02:00
Makefile ARM: OMAP2+: Move iommu2 to drivers/iommu/omap-iommu2.c 2012-11-20 10:04:41 -08:00
msm_iommu_dev.c msm: iommu: move to drivers/iommu/ 2011-06-21 10:48:50 +02:00
msm_iommu.c iommu/msm: Implement DOMAIN_ATTR_GEOMETRY attribute 2012-07-11 12:20:05 +02:00
of_iommu.c iommu: Add DMA window parser, of_get_dma_window() 2012-06-25 13:50:28 +02:00
omap-iommu2.c iommu/omap: Adapt to runtime pm 2012-12-03 18:48:23 +01:00
omap-iommu-debug.c ARM: OMAP2+: Move iommu/iovmm headers to platform_data 2012-11-20 10:05:01 -08:00
omap-iommu.c Drivers: iommu: remove __dev* attributes. 2013-01-03 15:57:14 -08:00
omap-iommu.h iommu/omap: Adapt to runtime pm 2012-12-03 18:48:23 +01:00
omap-iopgtable.h ARM: OMAP2+: Move iommu2 to drivers/iommu/omap-iommu2.c 2012-11-20 10:04:41 -08:00
omap-iovmm.c ARM: OMAP2+: Move iommu/iovmm headers to platform_data 2012-11-20 10:05:01 -08:00
tegra-gart.c Drivers: iommu: remove __dev* attributes. 2013-01-03 15:57:14 -08:00
tegra-smmu.c Drivers: iommu: remove __dev* attributes. 2013-01-03 15:57:14 -08:00