Re: [PATCH v6 0/4] x86, kasan: add KASAN checks to atomic operations

2018-02-26 Thread Dmitry Vyukov
On Tue, Feb 20, 2018 at 11:40 AM, Dmitry Vyukov wrote: > On Wed, Feb 7, 2018 at 3:17 PM, Dmitry Vyukov wrote: >> On Wed, Jan 31, 2018 at 5:17 PM, Will Deacon wrote: > * Will Deacon wrote: >> e.g. for atomic[64]_read, your asm-generic header looks like: >> >> #ifndef _LINUX_A

Re: [PATCH v6 0/4] x86, kasan: add KASAN checks to atomic operations

2018-02-20 Thread Dmitry Vyukov
On Wed, Feb 7, 2018 at 3:17 PM, Dmitry Vyukov wrote: > On Wed, Jan 31, 2018 at 5:17 PM, Will Deacon wrote: >>> > * Will Deacon wrote: >>> >> e.g. for atomic[64]_read, your asm-generic header looks like: >>> >> >>> >> #ifndef _LINUX_ATOMIC_INSTRUMENTED_H >>> >> #define _LINUX_ATOMIC_INSTRUMENTED_

Re: [PATCH v6 0/4] x86, kasan: add KASAN checks to atomic operations

2018-02-07 Thread Dmitry Vyukov
On Wed, Jan 31, 2018 at 5:17 PM, Will Deacon wrote: >> > * Will Deacon wrote: >> >> e.g. for atomic[64]_read, your asm-generic header looks like: >> >> >> >> #ifndef _LINUX_ATOMIC_INSTRUMENTED_H >> >> #define _LINUX_ATOMIC_INSTRUMENTED_H >> >> >> >> #include >> >> #include >> >> >> >> static __

Re: [PATCH v6 0/4] x86, kasan: add KASAN checks to atomic operations

2018-01-31 Thread Will Deacon
On Wed, Jan 31, 2018 at 09:53:10AM +0100, Dmitry Vyukov wrote: > On Wed, Jan 31, 2018 at 8:28 AM, Ingo Molnar wrote: > > * Will Deacon wrote: > >> e.g. for atomic[64]_read, your asm-generic header looks like: > >> > >> #ifndef _LINUX_ATOMIC_INSTRUMENTED_H > >> #define _LINUX_ATOMIC_INSTRUMENTED_H

Re: [PATCH v6 0/4] x86, kasan: add KASAN checks to atomic operations

2018-01-31 Thread Dmitry Vyukov
On Wed, Jan 31, 2018 at 8:28 AM, Ingo Molnar wrote: > > * Will Deacon wrote: > >> Hi Dmitry, >> >> On Mon, Jan 29, 2018 at 06:26:03PM +0100, Dmitry Vyukov wrote: >> > KASAN uses compiler instrumentation to intercept all memory accesses. >> > But it does not see memory accesses done in assembly co

Re: [PATCH v6 0/4] x86, kasan: add KASAN checks to atomic operations

2018-01-30 Thread Ingo Molnar
* Will Deacon wrote: > Hi Dmitry, > > On Mon, Jan 29, 2018 at 06:26:03PM +0100, Dmitry Vyukov wrote: > > KASAN uses compiler instrumentation to intercept all memory accesses. > > But it does not see memory accesses done in assembly code. > > One notable user of assembly code is atomic operation

Re: [PATCH v6 0/4] x86, kasan: add KASAN checks to atomic operations

2018-01-30 Thread Will Deacon
Hi Dmitry, On Mon, Jan 29, 2018 at 06:26:03PM +0100, Dmitry Vyukov wrote: > KASAN uses compiler instrumentation to intercept all memory accesses. > But it does not see memory accesses done in assembly code. > One notable user of assembly code is atomic operations. Frequently, > for example, an ato

Re: [PATCH v6 0/4] x86, kasan: add KASAN checks to atomic operations

2018-01-30 Thread Dmitry Vyukov
On Tue, Jan 30, 2018 at 10:23 AM, Dmitry Vyukov wrote: > On Mon, Jan 29, 2018 at 6:26 PM, Dmitry Vyukov wrote: >> KASAN uses compiler instrumentation to intercept all memory accesses. >> But it does not see memory accesses done in assembly code. >> One notable user of assembly code is atomic oper

Re: [PATCH v6 0/4] x86, kasan: add KASAN checks to atomic operations

2018-01-30 Thread Dmitry Vyukov
On Mon, Jan 29, 2018 at 6:26 PM, Dmitry Vyukov wrote: > KASAN uses compiler instrumentation to intercept all memory accesses. > But it does not see memory accesses done in assembly code. > One notable user of assembly code is atomic operations. Frequently, > for example, an atomic reference decrem

[PATCH v6 0/4] x86, kasan: add KASAN checks to atomic operations

2018-01-29 Thread Dmitry Vyukov
KASAN uses compiler instrumentation to intercept all memory accesses. But it does not see memory accesses done in assembly code. One notable user of assembly code is atomic operations. Frequently, for example, an atomic reference decrement is the last access to an object and a good candidate for a