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: <456B2E87.5000800@s5r6.in-berlin.de>
Date:	Mon, 27 Nov 2006 19:29:27 +0100
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	linux-kernel <linux-kernel@...r.kernel.org>
CC:	Robert Crocombe <rcrocomb@...il.com>,
	linux1394-devel <linux1394-devel@...ts.sourceforge.net>
Subject: MMIO write ordering (was Re: ieee1394: host adapter disappears on
 1394 bus reset)

I wrote:
> Question to others:
> 
> ohci1394.c::ohci_irq_handler() is taking a per-host spinlock around some
> register reads and writes, particularly:
> ...
> 	spin_lock_irqsave(&ohci->event_lock, flags);
> 	event = reg_read(ohci, OHCI1394_IntEventClear);
> 	reg_write(ohci, OHCI1394_IntEventClear, event &
> 						~OHCI1394_busReset);
> 	spin_unlock_irqrestore(&ohci->event_lock, flags);
> ...
> 	spin_lock_irqsave(&ohci->event_lock, flags);
> 	reg_write(ohci, OHCI1394_IntMaskClear, OHCI1394_busReset);
> 	run_an_insane_loop_as_an_alleged_fix_for_dorky_hardware;
> 	spin_unlock_irqrestore(&ohci->event_lock, flags);
> ...
> 	spin_lock_irqsave(&ohci->event_lock, flags);
> 	reg_write(ohci, OHCI1394_IntEventClear, OHCI1394_busReset);
> 	reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset);
> 	spin_unlock_irqrestore(&ohci->event_lock, flags);
> 
> I think these spinlocks are totally useless 1. because
> ohci_irq_handler() is only called as the hardware interrupt servicing
> routine and 2. because they don't flush the register write operations.
> Right? Wrong? [Ohci1394's reg_write() is a writel().]

Also, what is the status of ordering guarantees --- or lack thereof ---
for writel() under Linux 2.6.16 and 2.6.18? Especially in presence of a
PCI-X to PCI bridge...
-- 
Stefan Richter
-=====-=-==- =-== ==-==
http://arcgraph.de/sr/
-
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