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] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0910200938230.3609@localhost.localdomain>
Date:	Tue, 20 Oct 2009 09:46:12 +0200 (CEST)
From:	John Kacur <jkacur@...hat.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
cc:	Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Arnd Bergmann <arndbergmann@...glemail.com>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH RFC] PPC-BRIQ_PANEL: Remove BKL and replace with atomic
 variable.



On Tue, 20 Oct 2009, Frederic Weisbecker wrote:

> On Mon, Oct 19, 2009 at 07:04:02AM +0200, Thomas Gleixner wrote:
> > B1;2005;0cOn Sun, 18 Oct 2009, John Kacur wrote:
> > 
> > > >From b64c7d0f11eab96cb253b23c7264c999746116c0 Mon Sep 17 00:00:00 2001
> > > From: John Kacur <jkacur@...hat.com>
> > > Date: Sun, 18 Oct 2009 21:29:21 +0200
> > > Subject: [PATCH] PPC-BRIQ_PANEL: Remove BKL and replace with atomic variable.
> > > 
> > > There are no locks here except the bkl in briq_panel_open. It's only
> > > purpose is to ensure single access. Remove the bkl and ensure single access
> > > by making vfd_is_open an atomic_variable.
> > 
> > And again, can you please look more carefully at the init
> > vs. read/write functions ?
> > 
> > The BKL is not only protecting the single user variable it's also
> > serializing write against the access to the display in init.
> > 
> > Thanks,
> > 
> > 	tglx
> 
> 
> That could be solved by statically initializing vfd_is_open to -1
> and then set it to 0 once briq_panel_init has finished initializing
> the device.

Well, I did think of a similar scheme, but in another chat or email, 
(don't remember which) Thomas told me that any such synchronization is a 
hack, the only correct thing to do is fix the init.
His point being, either the device is available to functions like read or 
write or it isn't. However, that sync technique seems so simple here, I 
may not give up on it.
 > 
--
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