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: <20171114220855.GE3624@linux.vnet.ibm.com>
Date:   Tue, 14 Nov 2017 14:08:55 -0800
From:   "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:     Mark Rutland <mark.rutland@....com>
Cc:     linux-kernel@...r.kernel.org,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] perf mmap: Convert ACCESS_ONCE() to READ_ONCE()

On Tue, Nov 14, 2017 at 10:31:38AM +0000, Mark Rutland wrote:
> Recently there was a treewide conversion of ACCESS_ONCE() to
> {READ,WRITE}_ONCE(), but a new use was introduced concurrently by
> commit:
> 
>   1695849735752d2a ("perf mmap: Move perf_mmap and methods to separate mmap.[ch] files")
> 
> Let's convert this over to READ_ONCE() so that we can remove the
> ACCESS_ONCE() definitions in subsequent patches.
> 
> Signed-off-by: Mark Rutland <mark.rutland@....com>
> Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> Cc: Peter Zijlstra <peterz@...radead.org>

Reviewed-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>

Woo-hoo!  Good to see that your Coccinelle script has already done
its magic!  ;-)

							Thanx, Paul

> ---
>  tools/perf/util/mmap.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Hi,
> 
> Would it be possible for this to be taken as a fixup in an upcoming rc? That
> way we should be able to remove the ACCESS_ONCE() definitions prior to v4.15.
> 
> Thanks,
> Mark.
> 
> diff --git a/tools/perf/util/mmap.h b/tools/perf/util/mmap.h
> index efd78b827b05..3a5cb5a6e94a 100644
> --- a/tools/perf/util/mmap.h
> +++ b/tools/perf/util/mmap.h
> @@ -70,7 +70,7 @@ void perf_mmap__read_catchup(struct perf_mmap *md);
>  static inline u64 perf_mmap__read_head(struct perf_mmap *mm)
>  {
>  	struct perf_event_mmap_page *pc = mm->base;
> -	u64 head = ACCESS_ONCE(pc->data_head);
> +	u64 head = READ_ONCE(pc->data_head);
>  	rmb();
>  	return head;
>  }
> -- 
> 2.11.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ