Re: [PATCH -rcu/kcsan 16/23] locking/atomics, kcsan: Add instrumentation for barriers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;

?



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux