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: <20081011143600.GB1556@ucw.cz>
Date:	Sat, 11 Oct 2008 16:36:00 +0200
From:	Pavel Machek <pavel@...e.cz>
To:	Haavard Skinnemoen <haavard.skinnemoen@...el.com>
Cc:	David Brownell <david-b@...bell.net>,
	lkml <linux-kernel@...r.kernel.org>,
	Andrew Victor <linux@...im.org.za>,
	Kevin Hilman <khilman@...prootsystems.com>,
	Tony Lindgren <tony@...mide.com>
Subject: Re: [PATCH/RFC] hardware irq debouncing support

Hi!

> > > Ok, so the limitations of various chips vary a lot...which means that
> > > it's difficult to predict what IRQF_DEBOUNCED actually does.
> > 
> > The specific QOS achieved is system-specific; the term for
> > that kind of mechanism is "hinting".  It's very clearly defined
> > what the hint means .. but a given system might not use it.
> 
> I know that, but is "hinting" really what drivers need?
> 
> > The madvise(2) system call is a userspace example of hinting.
> 
> That's different. Ignoring madvise() hints might hurt performance
> slightly, but it won't result in any fundamentally different behaviour.
> 
> On the other hand, lack of debouncing might cause the gpio_keys driver
> to report 1000 keypresses instead of one when the user pushes a button.
> That's much more harmful.
> 
> So if someone goes and replaces the debounce timer in gpio_keys with
> this IRQF_DEBOUNCE flag, it might work very well on hardware which
> happens to use a 30 ms debounce interval, but will break horribly on
> hardware with shorter debounce intervals.

Right. So you don't _replace_ debounce timer, you just do both timer
and IRQF_.

> > > > Why require "software debouncing" if perhaps the hardware could do
> > > > it all for you?
> > > 
> > > Because of the "perhaps" part of your sentence.
> > 
> > I'm not sure which sentence you refer too, but the first
> > "perhaps" above is yours!  :)
> 
> I mean that it's difficult to rely on hardware that "perhaps" can do
> debouncing for you. I think many drivers need to know for sure.

Why? You write code as if no debouncing exist...


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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