public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <jroedel@suse.de>
To: kernel test robot <ying.huang@linux.intel.com>
Cc: Baoquan He <bhe@redhat.com>,
	lkp@01.org, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] iommu/vt-d: Fix return value check of parse_ioapics_under_ir()
Date: Mon, 2 Nov 2015 20:00:14 +0900	[thread overview]
Message-ID: <20151102110014.GC2704@suse.de> (raw)
In-Reply-To: <87h9l494nd.fsf@yhuang-dev.intel.com>

On Mon, Nov 02, 2015 at 04:39:18PM +0800, kernel test robot wrote:
> FYI, we noticed the below changes on
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git x86/vt-d
> commit a13c8f27e4d79420ae7bcb48123fa13851026428 ("iommu/vt-d: Adjust the return value of the parse_ioapics_under_ir")
> 
> We found the following new message in kernel log.
> 
> [    0.126325] DMAR-IR: Failed to enable irq remapping. You are vulnerable to irq-injection attacks.

Thanks for the report, I just queued the fix below.

>From b61e5e80e3cd37f0183cdc04b03861a0467d9f52 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de>
Date: Mon, 2 Nov 2015 19:57:31 +0900
Subject: [PATCH] iommu/vt-d: Fix return value check of parse_ioapics_under_ir()

The function returns 0 on success, so check for the right
value.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/iommu/intel_irq_remapping.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
index f3a9bd1..1fae188 100644
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel_irq_remapping.c
@@ -690,7 +690,7 @@ static int __init intel_prepare_irq_remapping(void)
 	if (!dmar_ir_support())
 		return -ENODEV;
 
-	if (!parse_ioapics_under_ir()) {
+	if (parse_ioapics_under_ir()) {
 		pr_info("Not enabling interrupt remapping\n");
 		goto error;
 	}
-- 
1.8.4.5


      reply	other threads:[~2015-11-02 11:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-02  8:39 [lkp] [iommu/vt] a13c8f27e4: DMAR-IR: Failed to enable irq remapping. You are vulnerable to irq-injection attacks kernel test robot
2015-11-02 11:00 ` Joerg Roedel [this message]

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=20151102110014.GC2704@suse.de \
    --to=jroedel@suse.de \
    --cc=bhe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=ying.huang@linux.intel.com \
    /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