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: <alpine.DEB.2.21.1812190951190.1651@nanos.tec.linutronix.de>
Date:   Wed, 19 Dec 2018 10:45:48 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     "Li, Aubrey" <aubrey.li@...ux.intel.com>
cc:     Andi Kleen <ak@...ux.intel.com>, Aubrey Li <aubrey.li@...el.com>,
        mingo@...hat.com, peterz@...radead.org, hpa@...or.com,
        tim.c.chen@...ux.intel.com, dave.hansen@...el.com,
        arjan@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

On Wed, 19 Dec 2018, Li, Aubrey wrote:
> On 2018/12/19 5:38, Andi Kleen wrote:
> >> I misunderstood, you mean 32bit kernel, not 32bit machine. Theoretically 32bit
> >> kernel can use AVX512, but not sure if anyone use it like this. get_jiffies_64()
> >> includes jiffies_lock ops so not good in context switch. So I want to use raw
> >> jiffies_64 here. jiffies is a good candidate but it has wraparound overflow issue.
> >> Other time source are expensive here.
> >>
> >> Should I limit the code only running on 64bit kernel? 
> > 
> > Yes making it 64bit only should be fine.
> > 
> > Other alternative would be to use 32bit jiffies on 32bit. I assume
> > wrapping is not that big a problem here.
> > 
> Thomas, is this acceptable?

Just do the math. jiffies on 32bit wrap around depending on HZ:

 HZ=100	    248 days
 HZ=1000     24 days

So, yes it takes quite some time, but from then on the information is
bogus. Whether that matters or not is a different question. At least it
needs proper documentation.

Thanks,

	tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ