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  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]
Date:   Fri, 17 May 2019 10:59:06 -0700
From:   Yabin Cui <>
To:     Peter Zijlstra <>,
        Ingo Molnar <>,
        Arnaldo Carvalho de Melo <>,
        Alexander Shishkin <>,
        Jiri Olsa <>,
        Namhyung Kim <>
Cc:, Yabin Cui <>
Subject: Re: [PATCH] perf/ring_buffer: Fix exposing a temporarily decreased data_head.

> > -	local_inc(&rb->nest);
> > +	rb->nest++;
> > +	barrier();

> Urgh; almost but not quite. You just lost the 'volatile' qualifier and
> now the compiler can mess things up for you.

I thought the barriers added could force the compiler to forget what it knows
about rb->nest, and do the write as been told to. I appreciate it if you can
tell me more details about it. Anyway, it's a good choice to be protective
and always use WRITE_ONCE/READ_ONCE for rb->nest.

> What I'm going to do is split this into two patches, one fixes the
> problem and marked for backport, and one changing away from local_t.

I read the split patches. They totally LGTM. Thanks for all your help
and rapid reply! I appreciate it :)

Powered by blists - more mailing lists