lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-412fbca8dd3067438a9c8a98853299f58a5597d5@git.kernel.org>
Date:	Fri, 28 Nov 2014 13:12:27 -0800
From:	tip-bot for Jiang Liu <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	tglx@...utronix.de, linux-kernel@...r.kernel.org, bp@...e.de,
	mingo@...nel.org, jiang.liu@...ux.intel.com, hpa@...or.com
Subject: [tip:x86/apic] x86, ioapic: Repair io_apic_set_affinity

Commit-ID:  412fbca8dd3067438a9c8a98853299f58a5597d5
Gitweb:     http://git.kernel.org/tip/412fbca8dd3067438a9c8a98853299f58a5597d5
Author:     Jiang Liu <jiang.liu@...ux.intel.com>
AuthorDate: Fri, 28 Nov 2014 21:43:02 +0100
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 28 Nov 2014 22:09:22 +0100

x86, ioapic: Repair io_apic_set_affinity

Boris reported, that the rework of the ioapic to use cached entry data
broke his older AMD machine.

The cause for this is that the cached entry.dest field is assigned
with SET_APIC_LOGICAL_ID(cfg->desc_apicid). SET_APIC_LOGICAL_ID left
shifts the value by 24. This is obviously wrong as the dest field is
already at the proper bit position, so the extra shift essentially
cleared the dest field.
   
Remove SET_APIC_LOGICAL_ID and assign cfg->desc_apicid directly.

This got introduced in commit bfa644bfa9e3 but only becomes visible
since the conversion to use cached entries in commit fda7c08b1349
'x86, irq: Use cached IOAPIC entry instead of reading from hardware'

Reported-and-tested-by: Borislav Petkov <bp@...e.de>
Fixes: bfa644bfa9e3 'x86, irq: Convert IOAPIC to use hierarchy irqdomain interfaces'
Link: http://lkml.kernel.org/r/54789774.7030704@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 arch/x86/kernel/apic/io_apic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 5307320..ec193bc 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1885,7 +1885,7 @@ static int ioapic_set_affinity(struct irq_data *irq_data,
 	raw_spin_lock_irqsave(&ioapic_lock, flags);
 	if (ret >= 0 && ret != IRQ_SET_MASK_OK_DONE) {
 		cfg = irqd_cfg(irq_data);
-		data->entry.dest = SET_APIC_LOGICAL_ID(cfg->dest_apicid);
+		data->entry.dest = cfg->dest_apicid;
 		data->entry.vector = cfg->vector;
 		for_each_irq_pin(entry, data->irq_2_pin)
 			__ioapic_write_entry(entry->apic, entry->pin,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ