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:	Wed, 11 Jul 2007 12:46:11 +0200
From:	Rodolfo Giometti <giometti@...eenne.com>
To:	David Woodhouse <dwmw2@...radead.org>
Cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] LinuxPPS (with new syscalls API) - new version

On Wed, Jul 11, 2007 at 10:17:47AM +0100, David Woodhouse wrote:
> On Tue, 2007-07-10 at 18:38 +0200, Rodolfo Giometti wrote:
> > On Tue, Jul 10, 2007 at 05:05:47PM +0100, David Woodhouse wrote:
> > > 
> > > I'm sure the version with 'volatile' will also be broken then. Sounds
> > > like the right answer is to fix the locking.
> > 
> > But wish avoiding locking at all since this may delay the time stamp
> > recording. We (the LinuxPPS guys) niticed that just a single
> > instruction my degrade the time setting about 50%!
> > 
> > I avoid locking just using a pointer and setting it to a dummy
> > structure when not used... is that wrong? :-o
> 
> Almost certainly (admittedly said without looking).

Please take a look at the code. I'm quite sure that it's ok. :)

I just set a pointer to a dummy struct or a valid one. By doing like
this I don't need a lock in the irq handler since it writes always
into a valid area. At non irq time I simply use a mutex lock.

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail:    giometti@...eenne.com
Linux Device Driver                             giometti@...dd.com
Embedded Systems                     		giometti@...ux.it
UNIX programming                     phone:     +39 349 2432127
-
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