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: <20081030000442.fdc831c1.akpm@linux-foundation.org>
Date:	Thu, 30 Oct 2008 00:04:42 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	"Ray Lee" <ray-lk@...rabbit.org>
Cc:	"Arjan van de Ven" <arjan@...radead.org>,
	"Marcin Slusarz" <marcin.slusarz@...il.com>,
	"Carlos R. Mafra" <crmafra2@...il.com>,
	"Arjan van de Ven" <arjan@...ux.intel.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [2.6.28-rc1 regression] wmifinfo dockapp takes 100% of cpu
 (bisected)

On Sat, 25 Oct 2008 12:38:22 -0700 "Ray Lee" <ray-lk@...rabbit.org> wrote:

> On Sat, Oct 25, 2008 at 12:12 PM, Arjan van de Ven <arjan@...radead.org> wrote:
> > On Sat, 25 Oct 2008 20:03:27 +0200
> > Marcin Slusarz <marcin.slusarz@...il.com> wrote:
> >> > >           if (copy_from_user(&tv, tvp, sizeof(tv)))
> >> > >                   return -EFAULT;
> >> > >
> >> > > +         while (tv.tv_usec > USEC_PER_SEC && i < 1000) {
> >>                                   ^
> >> should be >=
> >
> > yeah thanks for catching that. Note to self: don't code before coffee
> >
> > I'm not very happy with a while loop; but at least it solves the problem
> >
> > I'll try to make it nicer than this ...
> 
> Regardless, you may wish to make a set_normalized_timeval and place it
> in kernel/time.c right after the current set_nromalized_timespec.

Yes, this comes up fairly regularly and we would benefit from having a
normalize-a-timeval library function.

I don't think it should be implemented via a while loop though.  That's
acceptable with timespecs, which can only loop four or so times.  But
timevals use microseconds and can loop thousands of times and hence a
normalization function should use division.

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