Re: [PATCHv2 03/11] atomics: simplify cmpxchg() instrumentation

2018-06-25 Thread Mark Rutland
On Mon, Jun 25, 2018 at 01:38:03PM +0200, Andrea Parri wrote: > On Mon, Jun 25, 2018 at 11:59:44AM +0100, Mark Rutland wrote: > > Currently we define some fairly verbose wrappers for the cmpxchg() > > family so that we can pass a pointer and size into kasan_check_write(). > > > > The wrapper

Re: [PATCHv2 03/11] atomics: simplify cmpxchg() instrumentation

2018-06-25 Thread Mark Rutland
On Mon, Jun 25, 2018 at 01:38:03PM +0200, Andrea Parri wrote: > On Mon, Jun 25, 2018 at 11:59:44AM +0100, Mark Rutland wrote: > > Currently we define some fairly verbose wrappers for the cmpxchg() > > family so that we can pass a pointer and size into kasan_check_write(). > > > > The wrapper

Re: [PATCHv2 03/11] atomics: simplify cmpxchg() instrumentation

2018-06-25 Thread Dmitry Vyukov
On Mon, Jun 25, 2018 at 1:38 PM, Andrea Parri wrote: > On Mon, Jun 25, 2018 at 11:59:44AM +0100, Mark Rutland wrote: >> Currently we define some fairly verbose wrappers for the cmpxchg() >> family so that we can pass a pointer and size into kasan_check_write(). >> >> The wrapper duplicate the

Re: [PATCHv2 03/11] atomics: simplify cmpxchg() instrumentation

2018-06-25 Thread Dmitry Vyukov
On Mon, Jun 25, 2018 at 1:38 PM, Andrea Parri wrote: > On Mon, Jun 25, 2018 at 11:59:44AM +0100, Mark Rutland wrote: >> Currently we define some fairly verbose wrappers for the cmpxchg() >> family so that we can pass a pointer and size into kasan_check_write(). >> >> The wrapper duplicate the

Re: [PATCHv2 03/11] atomics: simplify cmpxchg() instrumentation

2018-06-25 Thread Andrea Parri
On Mon, Jun 25, 2018 at 11:59:44AM +0100, Mark Rutland wrote: > Currently we define some fairly verbose wrappers for the cmpxchg() > family so that we can pass a pointer and size into kasan_check_write(). > > The wrapper duplicate the size-switching logic necessary in arch code, > and only work

Re: [PATCHv2 03/11] atomics: simplify cmpxchg() instrumentation

2018-06-25 Thread Andrea Parri
On Mon, Jun 25, 2018 at 11:59:44AM +0100, Mark Rutland wrote: > Currently we define some fairly verbose wrappers for the cmpxchg() > family so that we can pass a pointer and size into kasan_check_write(). > > The wrapper duplicate the size-switching logic necessary in arch code, > and only work

[PATCHv2 03/11] atomics: simplify cmpxchg() instrumentation

2018-06-25 Thread Mark Rutland
Currently we define some fairly verbose wrappers for the cmpxchg() family so that we can pass a pointer and size into kasan_check_write(). The wrapper duplicate the size-switching logic necessary in arch code, and only work for scalar types. On some architectures, (cmp)xchg are used on non-scalar

[PATCHv2 03/11] atomics: simplify cmpxchg() instrumentation

2018-06-25 Thread Mark Rutland
Currently we define some fairly verbose wrappers for the cmpxchg() family so that we can pass a pointer and size into kasan_check_write(). The wrapper duplicate the size-switching logic necessary in arch code, and only work for scalar types. On some architectures, (cmp)xchg are used on non-scalar