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: <20171207123136.GB24547@atrey.karlin.mff.cuni.cz>
Date:   Thu, 7 Dec 2017 13:31:36 +0100
From:   Pavel Machek <pavel@....cz>
To:     Doug Anderson <dianders@...omium.org>
Cc:     Russell King - ARM Linux <linux@...linux.org.uk>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Mark Rutland <mark.rutland@....com>,
        Jonathan Austin <jonathan.austin@....com>,
        Arnd Bergmann <arnd@...db.de>, Mason <slash.tmp@...e.fr>,
        Peter Zijlstra <peterz@...radead.org>,
        Will Deacon <will.deacon@....com>,
        Michael Turquette <mturquette@...libre.com>,
        Nicolas Pitre <nico@...aro.org>,
        Stephen Boyd <sboyd@...eaurora.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Kevin Hilman <khilman@...nel.org>,
        John Stultz <john.stultz@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Marc Gonzalez <marc_gonzalez@...madesigns.com>
Subject: Re: [RFC] Improving udelay/ndelay on platforms where that is possible

Hi!

> On Wed, Nov 1, 2017 at 2:26 AM, Russell King - ARM Linux
> <linux@...linux.org.uk> wrote:
> > On Tue, Oct 31, 2017 at 05:23:19PM -0700, Doug Anderson wrote:
> >> Hi,
> >>
> >> On Tue, Oct 31, 2017 at 10:45 AM, Linus Torvalds
> >> <torvalds@...ux-foundation.org> wrote:
> >> > So I'm very much open to udelay improvements, and if somebody sends
> >> > patches for particular platforms to do particularly well on that
> >> > platform, I think we should merge them. But ...
> >>
> >> If I'm reading this all correctly, this sounds like you'd be willing
> >> to merge <https://patchwork.kernel.org/patch/9429841/>.  This makes
> >> udelay() guaranteed not to underrun on arm32 platforms.
> >
> > That's a mis-representation again.  It stops a timer-based udelay()
> > possibly underrunning by one tick if we are close to the start of
> > a count increment.  However, it does nothing for the loops_per_jiffy
> > udelay(), which can still underrun.
> >
> > My argument against merging that patch is that with it merged, we get
> > (as you say) a udelay() that doesn't underrun _when using a timer_
> > but when we end up using the loops_per_jiffy udelay(), we're back to
> > the old problem.
> >
> > My opinion is that's bad, because it encourages people to write drivers
> > that rely on udelay() having "good" behaviour, which it is not guaranteed
> > to have.  So, they'll specify a delay period of exactly what they want,
> > and their drivers will then fail when running on systems that aren't
> > using a timer-based udelay().
> 
> IMHO the current udelay is broken in an off-by-one way and it's easy
> to fix.  Intentionally leaving a bug in the code seems silly.  This
> seems to by what Linus is saying with his statement that "(a) platform
> code could try to make their udelay/ndelay() be as good as it can be
> on a particular platform".
> 
> So no matter the rest of the discussions, we should land that.  If you
> disagree then I'm happy to re-post that patch straight to Linus later
> this week since it sounds as if he'd take it.

Did this get fixed in any way? Russell having crazy arguments for
keeping kernel buggy should not be good enough reason to keep the
bugs...

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ