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]
Date:	Tue, 9 Aug 2011 15:02:07 +0300
From:	"Michael S. Tsirkin" <mst@...hat.com>
To:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:	Chris Wright <chrisw@...hat.com>,
	"Hans J. Koch" <hjk@...sjkoch.de>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Anthony Foiani <anthony.foiani@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] uio/gen-pci: don't enable interrupts in ISR

On Tue, Aug 09, 2011 at 01:43:46PM +0200, Sebastian Andrzej Siewior wrote:
> Michael S. Tsirkin wrote:
> >>It seems to me that you could drop this "user block" thing
> >>since you never change anything outside of this command register and it
> >>does not stop the race.
> >
> >I don't think so: if we did, we would lose userspace modifications to
> >other bits such as io enable, and there's no way to guess what their
> >values should be.
> 
> How so?
> 
> Sebastian

Let's assume we start with e.g. io enable bit cleared.


    user                                kernel
 read config                               |
 set io enable                             |
     |                                  interrupt                                                
     |                              read + set interrupt mask
 write config back                         |
					write



We end up with io enable bit cleared. Locking around rmw
that we have fixes this race.

-- 
MST
--
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