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: <20190221085331.GA2666@yury-thinkpad>
Date:   Thu, 21 Feb 2019 11:53:31 +0300
From:   Yury Norov <yury.norov@...il.com>
To:     Palmer Dabbelt <palmer@...ive.com>
Cc:     yury.norov@...il.com, andriy.shevchenko@...ux.intel.com,
        akpm@...ux-foundation.org, Arnd Bergmann <arnd@...db.de>,
        dmitry.torokhov@...il.com, keescook@...omium.org,
        willy@...radead.org, mpe@...erman.id.au, linux@...musvillemoes.dk,
        penguin-kernel@...ove.SAKURA.ne.jp, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] lib/test_bitmap: switch test_bitmap_parselist to
 ktime_get()

On Wed, Feb 20, 2019 at 03:10:44PM -0800, Palmer Dabbelt wrote:
> On Wed, 20 Feb 2019 06:20:48 PST (-0800), yury.norov@...il.com wrote:
> > On Wed, Feb 20, 2019 at 03:52:36PM +0200, Andy Shevchenko wrote:
> > > On Wed, Feb 20, 2019 at 03:51:01PM +0200, Andy Shevchenko wrote:
> > > > On Wed, Feb 20, 2019 at 11:37:03AM +0300, Yury Norov wrote:
> > > > > test_bitmap_parselist currently uses get_cycles which is not
> > > > > implemented on some platforms, so use ktime_get() instead.
> > > >
> > > > This sounds like a fix that should go first in the series.
> > > 
> > > Ah, okay, it's already first for test module.
> > > Perhaps Fixes tag and actually one or more examples of such architectures?
> > 
> > Hi Andy, thanks for your time on it.
> > 
> > Only arm, arm64, openrisc, riscv and sparc64 #define get_cycles.
> > So IIUC, others take stub from include/asm-generic/timex.h.
> 
> Should we (RISC-V) be doing something else?  It seems odd to be in such a
> minority here, but we do have a ISA-mandated timer so the get_cycles()
> implementation is super easy.

I think you are completely fine because you are one of those who
implement get_cycles().

get_cycles() is the problem for those who use it in generic code
because their code surprisingly gets broken on some machines while
works OK on others. This is not a problem of any specific arch.

For long term, we should inspect the non-arch code and replace 
get_cycles() with ktime_get() where appropriate, and avoid
introducing new get_cycles() uses.
 
> > sparc32, xtensa, m68k, um, and in some cases x86, mips and nios2
> > provide zero-stubs explicitly.
> > 
> > Yury
> > 
> > > --
> > > With Best Regards,
> > > Andy Shevchenko
> > > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ