2013-05-13 22:04:53

by Dave Jones

[permalink] [raw]
Subject: irq remapping warnings on macbook pro.

Andy,

since commit af8d102f999a41c0189bd2cce488bac2ee88c29b, we've had
reports from users getting this backtrace..

WARNING: at drivers/iommu/intel_irq_remapping.c:658 intel_enable_irq_remapping+0x295/0x2a4()
Hardware name: MacBookPro10,1
Failed to enable irq remapping. You are vulnerable to irq-injection attacks.
Modules linked in:
Pid: 1, comm: swapper/0 Not tainted 3.9.1-301.fc19.x86_64 #1
Call Trace:
[<ffffffff81d46d3b>] ? intel_enable_irq_remapping+0x295/0x2a4
[<ffffffff8105cd86>] warn_slowpath_common+0x66/0x80
[<ffffffff8105cdec>] warn_slowpath_fmt+0x4c/0x50
[<ffffffff81d46d3b>] intel_enable_irq_remapping+0x295/0x2a4
[<ffffffff81d46e94>] irq_remapping_enable+0x1b/0x7b
[<ffffffff81d15b6f>] enable_IR+0x59/0x60
[<ffffffff81d15d75>] enable_IR_x2apic+0x8d/0x13f
[<ffffffff81d17b8a>] default_setup_apic_routing+0x11/0x69
[<ffffffff81d13a94>] native_smp_prepare_cpus+0x2c0/0x3c2
[<ffffffff81d04f8a>] kernel_init_freeable+0xba/0x1fa
[<ffffffff81629cb0>] ? rest_init+0x80/0x80
[<ffffffff81629cbe>] kernel_init+0xe/0x190
[<ffffffff8164da6c>] ret_from_fork+0x7c/0xb0
[<ffffffff81629cb0>] ? rest_init+0x80/0x80

examples at:

https://bugzilla.redhat.com/show_bug.cgi?id=962356
https://bugzilla.redhat.com/show_bug.cgi?id=948262
https://bugzilla.redhat.com/show_bug.cgi?id=954068

Given the unlikelyhood of Apple releasing a firmware fix to appease Linux,
can we downgrade this to just a printk ? That would at least stop
it getting picked up as a kernel bug by abrt and similar tools.

Dave


2013-05-13 22:22:51

by Andy Lutomirski

[permalink] [raw]
Subject: [PATCH] intel_iommu: Downgrade the warning if enabling irq remapping fails

This triggers on a MacBook Pro.

Signed-off-by: Andy Lutomirski <[email protected]>
https://bugzilla.redhat.com/show_bug.cgi?id=948262
---
drivers/iommu/intel_irq_remapping.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
index f3b8f23..a7e0ad1 100644
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel_irq_remapping.c
@@ -654,8 +654,7 @@ error:
*/

if (x2apic_present)
- WARN(1, KERN_WARNING
- "Failed to enable irq remapping. You are vulnerable to irq-injection attacks.\n");
+ pr_warn("Failed to enable irq remapping. You are vulnerable to irq-injection attacks.\n");

return -1;
}
--
1.8.1.4

2013-06-20 14:27:57

by Joerg Roedel

[permalink] [raw]
Subject: Re: [PATCH] intel_iommu: Downgrade the warning if enabling irq remapping fails

On Mon, May 13, 2013 at 03:22:42PM -0700, Andy Lutomirski wrote:
> This triggers on a MacBook Pro.
>
> Signed-off-by: Andy Lutomirski <[email protected]>
> https://bugzilla.redhat.com/show_bug.cgi?id=948262
> ---
> drivers/iommu/intel_irq_remapping.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
> index f3b8f23..a7e0ad1 100644
> --- a/drivers/iommu/intel_irq_remapping.c
> +++ b/drivers/iommu/intel_irq_remapping.c
> @@ -654,8 +654,7 @@ error:
> */
>
> if (x2apic_present)
> - WARN(1, KERN_WARNING
> - "Failed to enable irq remapping. You are vulnerable to irq-injection attacks.\n");
> + pr_warn("Failed to enable irq remapping. You are vulnerable to irq-injection attacks.\n");
>
> return -1;
> }
> --
> 1.8.1.4

Applied to x86/vt-d, thanks.