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: <CANn89iJsD=rKTjiGF_EEoSh9WmiifOjxu2mcqSv8Sx-NT7zixQ@mail.gmail.com>
Date:   Thu, 11 Oct 2018 08:24:49 -0700
From:   Eric Dumazet <edumazet@...gle.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        Eric Dumazet <eric.dumazet@...il.com>,
        Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH 2/2] x86/percpu: Fix this_cpu_read()

On Thu, Oct 11, 2018 at 8:02 AM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Thu, Oct 11, 2018 at 3:45 AM Peter Zijlstra <peterz@...radead.org> wrote:
> >
> > Eric reported that a sequence count loop using this_cpu_read() got
> > optimized out. This is wrong, this_cpu_read() must imply READ_ONCE()
> > because the interface is IRQ-safe, therefore an interrupt can have
> > changed the per-cpu value.
> >
> > Fixes: 59eaef78bfea ("x86/tsc: Remodel cyc2ns to use seqcount_latch()")
> > Reported-by: Eric Dumazet <edumazet@...gle.com>
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
>
>
> Acked-by: Eric Dumazet <edumazet@...gle.com>

Actually the Fixes: tag seems funky.

Bug was not added by 59eaef78bfea

Your patch probably needs to be backported to older versions of linux,
just to be safe, since
we might have other places where authors relied on this_cpu_read()
semantic (different than this_cpu_read_stable())

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ