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: <YVw+4McyFdvU7ZED@hirez.programming.kicks-ass.net>
Date:   Tue, 5 Oct 2021 14:02:40 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Marco Elver <elver@...gle.com>
Cc:     "Paul E . McKenney" <paulmck@...nel.org>,
        Alexander Potapenko <glider@...gle.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Borislav Petkov <bp@...en8.de>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Ingo Molnar <mingo@...nel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Waiman Long <longman@...hat.com>,
        Will Deacon <will@...nel.org>, kasan-dev@...glegroups.com,
        linux-arch@...r.kernel.org, linux-doc@...r.kernel.org,
        linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, x86@...nel.org
Subject: Re: [PATCH -rcu/kcsan 16/23] locking/atomics, kcsan: Add
 instrumentation for barriers

On Tue, Oct 05, 2021 at 12:58:58PM +0200, Marco Elver wrote:
> @@ -59,6 +60,7 @@ atomic_add(int i, atomic_t *v)
>  static __always_inline int
>  atomic_add_return(int i, atomic_t *v)
>  {
> +	kcsan_mb();
>  	instrument_atomic_read_write(v, sizeof(*v));
>  	return arch_atomic_add_return(i, v);
>  }

This and others,.. is this actually correct? Should that not be
something like:

	kscan_mb();
	instrument_atomic_read_write(...);
	ret = arch_atomic_add_return(i, v);
	kcsan_mb();
	return ret;

?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ