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: <20250708113503.147336d0@pumpkin>
Date: Tue, 8 Jul 2025 11:35:03 +0100
From: David Laight <david.laight.linux@...il.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: "Li,Rongqing" <lirongqing@...du.com>, Oleg Nesterov <oleg@...hat.com>,
 Peter Zijlstra <peterz@...radead.org>, "linux-kernel@...r.kernel.org"
 <linux-kernel@...r.kernel.org>, "vschneid@...hat.com"
 <vschneid@...hat.com>, "mgorman@...e.de" <mgorman@...e.de>,
 "bsegall@...gle.com" <bsegall@...gle.com>, "dietmar.eggemann@....com"
 <dietmar.eggemann@....com>, "vincent.guittot@...aro.org"
 <vincent.guittot@...aro.org>, "juri.lelli@...hat.com"
 <juri.lelli@...hat.com>, "mingo@...hat.com" <mingo@...hat.com>
Subject: Re: [????] Re: [????] Re: divide error in x86 and cputime

On Mon, 7 Jul 2025 20:30:57 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> On Tue, 8 Jul 2025 00:10:54 +0000
> "Li,Rongqing" <lirongqing@...du.com> wrote:
> 
> > >         stime = mul_u64_u64_div_u64(stime, rtime, stime + utime);
> > > +       /*
> > > +        * Because mul_u64_u64_div_u64() can approximate on some
> > > +        * achitectures; enforce the constraint that: a*b/(b+c) <= a.
> > > +        */
> > > +       if (unlikely(stime > rtime))
> > > +               stime = rtime;    
> > 
> > 
> > My 5.10 has not this patch " sched/cputime: Fix mul_u64_u64_div_u64() precision for cputime ",
> > but I am sure this patch can not fix this overflow issue, Since division error happened in mul_u64_u64_div_u64()  
> 
> Have you tried it? Or are you just making an assumption?
> 
> How can you be so sure? Did you even *look* at the commit?

It can't be relevant.
That change is after the mul_u64_u64_div_u64() call that trapped.
It is also not relevant for x86-64 because it uses the asm version.

At some point mul_u64_u64_div_u64() got changed to be accurate (and slow)
so that check isn't needed any more.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ