Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-21 Thread Andrey Ryabinin
On 11/21/2014 02:14 AM, Thomas Gleixner wrote: > On Thu, 20 Nov 2014, Andrew Morton wrote: > >> On Thu, 20 Nov 2014 20:32:30 +0400 Dmitry Vyukov wrote: >> >>> Let me provide some background first. >> >> Well that was useful. Andrey, please slurp Dmitry's info into the 0/n >> changelog? > > And

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-21 Thread Andrey Ryabinin
On 11/21/2014 10:32 AM, Dmitry Vyukov wrote: > On Fri, Nov 21, 2014 at 2:00 AM, Andrew Morton > wrote: >> On Thu, 20 Nov 2014 20:32:30 +0400 Dmitry Vyukov wrote: >> >>> Let me provide some background first. >> >> Well that was useful. Andrey, please slurp Dmitry's info into the 0/n >>

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-21 Thread Andrey Ryabinin
On 11/21/2014 02:00 AM, Andrew Morton wrote: > On Thu, 20 Nov 2014 20:32:30 +0400 Dmitry Vyukov wrote: > >> Let me provide some background first. > > Well that was useful. Andrey, please slurp Dmitry's info into the 0/n > changelog? > Sure. > Also, some quantitative info about the kmemleak

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-21 Thread Andrey Ryabinin
On 11/21/2014 02:00 AM, Andrew Morton wrote: On Thu, 20 Nov 2014 20:32:30 +0400 Dmitry Vyukov dvyu...@google.com wrote: Let me provide some background first. Well that was useful. Andrey, please slurp Dmitry's info into the 0/n changelog? Sure. Also, some quantitative info about the

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-21 Thread Andrey Ryabinin
On 11/21/2014 10:32 AM, Dmitry Vyukov wrote: On Fri, Nov 21, 2014 at 2:00 AM, Andrew Morton a...@linux-foundation.org wrote: On Thu, 20 Nov 2014 20:32:30 +0400 Dmitry Vyukov dvyu...@google.com wrote: Let me provide some background first. Well that was useful. Andrey, please slurp Dmitry's

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-21 Thread Andrey Ryabinin
On 11/21/2014 02:14 AM, Thomas Gleixner wrote: On Thu, 20 Nov 2014, Andrew Morton wrote: On Thu, 20 Nov 2014 20:32:30 +0400 Dmitry Vyukov dvyu...@google.com wrote: Let me provide some background first. Well that was useful. Andrey, please slurp Dmitry's info into the 0/n changelog?

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-20 Thread Dmitry Vyukov
On Fri, Nov 21, 2014 at 2:00 AM, Andrew Morton wrote: > On Thu, 20 Nov 2014 20:32:30 +0400 Dmitry Vyukov wrote: > >> Let me provide some background first. > > Well that was useful. Andrey, please slurp Dmitry's info into the 0/n > changelog? > > Also, some quantitative info about the kmemleak

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-20 Thread Thomas Gleixner
On Thu, 20 Nov 2014, Andrew Morton wrote: > On Thu, 20 Nov 2014 20:32:30 +0400 Dmitry Vyukov wrote: > > > Let me provide some background first. > > Well that was useful. Andrey, please slurp Dmitry's info into the 0/n > changelog? And into Documentation/UBSan or whatever the favourite place

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-20 Thread Andrew Morton
On Thu, 20 Nov 2014 20:32:30 +0400 Dmitry Vyukov wrote: > Let me provide some background first. Well that was useful. Andrey, please slurp Dmitry's info into the 0/n changelog? Also, some quantitative info about the kmemleak overhead would be useful. In this discussion you've mentioned a few

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-20 Thread Dmitry Vyukov
On Thu, Nov 20, 2014 at 12:03 PM, Ingo Molnar wrote: > > * Andrey Ryabinin wrote: > >> I've counted 16: >> >> aab515d (fib_trie: remove potential out of bound access) >> 984f173 ([SCSI] sd: Fix potential out-of-bounds access) >> 5e9ae2e (aio: fix use-after-free in aio_migratepage) >> 2811eba

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-20 Thread Andrey Ryabinin
On 11/20/2014 12:03 PM, Ingo Molnar wrote: > > * Andrey Ryabinin wrote: > >> I've counted 16: >> >> aab515d (fib_trie: remove potential out of bound access) >> 984f173 ([SCSI] sd: Fix potential out-of-bounds access) >> 5e9ae2e (aio: fix use-after-free in aio_migratepage) >> 2811eba (ipv6: udp

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-20 Thread Ingo Molnar
* Andrey Ryabinin wrote: > I've counted 16: > > aab515d (fib_trie: remove potential out of bound access) > 984f173 ([SCSI] sd: Fix potential out-of-bounds access) > 5e9ae2e (aio: fix use-after-free in aio_migratepage) > 2811eba (ipv6: udp packets following an UFO enqueued packet need also > be

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-20 Thread Ingo Molnar
* Andrey Ryabinin ryabinin@gmail.com wrote: I've counted 16: aab515d (fib_trie: remove potential out of bound access) 984f173 ([SCSI] sd: Fix potential out-of-bounds access) 5e9ae2e (aio: fix use-after-free in aio_migratepage) 2811eba (ipv6: udp packets following an UFO enqueued

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-20 Thread Andrey Ryabinin
On 11/20/2014 12:03 PM, Ingo Molnar wrote: * Andrey Ryabinin ryabinin@gmail.com wrote: I've counted 16: aab515d (fib_trie: remove potential out of bound access) 984f173 ([SCSI] sd: Fix potential out-of-bounds access) 5e9ae2e (aio: fix use-after-free in aio_migratepage) 2811eba

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-20 Thread Dmitry Vyukov
On Thu, Nov 20, 2014 at 12:03 PM, Ingo Molnar mi...@kernel.org wrote: * Andrey Ryabinin ryabinin@gmail.com wrote: I've counted 16: aab515d (fib_trie: remove potential out of bound access) 984f173 ([SCSI] sd: Fix potential out-of-bounds access) 5e9ae2e (aio: fix use-after-free in

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-20 Thread Andrew Morton
On Thu, 20 Nov 2014 20:32:30 +0400 Dmitry Vyukov dvyu...@google.com wrote: Let me provide some background first. Well that was useful. Andrey, please slurp Dmitry's info into the 0/n changelog? Also, some quantitative info about the kmemleak overhead would be useful. In this discussion

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-20 Thread Thomas Gleixner
On Thu, 20 Nov 2014, Andrew Morton wrote: On Thu, 20 Nov 2014 20:32:30 +0400 Dmitry Vyukov dvyu...@google.com wrote: Let me provide some background first. Well that was useful. Andrey, please slurp Dmitry's info into the 0/n changelog? And into Documentation/UBSan or whatever the

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-20 Thread Dmitry Vyukov
On Fri, Nov 21, 2014 at 2:00 AM, Andrew Morton a...@linux-foundation.org wrote: On Thu, 20 Nov 2014 20:32:30 +0400 Dmitry Vyukov dvyu...@google.com wrote: Let me provide some background first. Well that was useful. Andrey, please slurp Dmitry's info into the 0/n changelog? Also, some

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-19 Thread Andrey Ryabinin
On 11/19/2014 03:44 AM, Sasha Levin wrote: > On 11/18/2014 07:09 PM, Andrey Ryabinin wrote: >> Yes with CONFIG_KASAN_INLINE you will get GPF instead of kasan report. >> For userspaces addresses we don't have shadow memory. In outline case >> I just check address itself before checking shadow. In

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-19 Thread Andrey Ryabinin
On 11/19/2014 03:44 AM, Sasha Levin wrote: On 11/18/2014 07:09 PM, Andrey Ryabinin wrote: Yes with CONFIG_KASAN_INLINE you will get GPF instead of kasan report. For userspaces addresses we don't have shadow memory. In outline case I just check address itself before checking shadow. In inline

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Sasha Levin
On 11/18/2014 07:09 PM, Andrey Ryabinin wrote: > Yes with CONFIG_KASAN_INLINE you will get GPF instead of kasan report. > For userspaces addresses we don't have shadow memory. In outline case > I just check address itself before checking shadow. In inline case compiler > just checks shadow, so

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Andrey Ryabinin
2014-11-19 2:38 GMT+03:00 Sasha Levin : > Hi Andrey, > > After the recent exchange of mails about kasan it came to me that I haven't > seen a kasan warning for a while now. To give kasan a quick test I added a > rather > simple error which should generate a kasan warning about accessing userspace

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Andrey Ryabinin
2014-11-18 23:58 GMT+03:00 Andrew Morton : > On Tue, 11 Nov 2014 10:21:42 +0300 Andrey Ryabinin > wrote: > >> Hi Andrew, >> >> Now we have stable GCC(4.9.2) which supports kasan and from my point of view >> patchset is ready for merging. >> I could have sent v7 (it's just rebased v6), but I see

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Sasha Levin
Hi Andrey, After the recent exchange of mails about kasan it came to me that I haven't seen a kasan warning for a while now. To give kasan a quick test I added a rather simple error which should generate a kasan warning about accessing userspace memory (yes, I know kasan has a test module but my

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Dave Hansen
On 11/18/2014 01:15 PM, Andi Kleen wrote: >> > If kasan will permit us to remove kmemcheck/debug_pagealloc/slub_debug >> > then that tips the balance a little. What's the feasibility of that? > Maybe removing kmemcheck. slub_debug/debug_pagealloc are simple, and are in > different niches (lower

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Andi Kleen
> It's a huge pile of tricky code we'll need to maintain. To justify its > inclusion I think we need to be confident that kasan will find a > significant number of significant bugs that > kmemcheck/debug_pagealloc/slub_debug failed to detect. I would put it differently. kmemcheck is effectively

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Sasha Levin
On 11/18/2014 03:58 PM, Andrew Morton wrote: > On Tue, 11 Nov 2014 10:21:42 +0300 Andrey Ryabinin > wrote: > >> Hi Andrew, >> >> Now we have stable GCC(4.9.2) which supports kasan and from my point of view >> patchset is ready for merging. >> I could have sent v7 (it's just rebased v6), but I

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Andrew Morton
On Tue, 11 Nov 2014 10:21:42 +0300 Andrey Ryabinin wrote: > Hi Andrew, > > Now we have stable GCC(4.9.2) which supports kasan and from my point of view > patchset is ready for merging. > I could have sent v7 (it's just rebased v6), but I see no point in doing that > and bothering people, >

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Andrey Ryabinin
On 11/11/2014 10:21 AM, Andrey Ryabinin wrote: > Hi Andrew, > > Now we have stable GCC(4.9.2) which supports kasan and from my point of view > patchset is ready for merging. > I could have sent v7 (it's just rebased v6), but I see no point in doing that > and bothering people, > unless you are

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Andrey Ryabinin
On 11/11/2014 10:21 AM, Andrey Ryabinin wrote: Hi Andrew, Now we have stable GCC(4.9.2) which supports kasan and from my point of view patchset is ready for merging. I could have sent v7 (it's just rebased v6), but I see no point in doing that and bothering people, unless you are ready

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Andrew Morton
On Tue, 11 Nov 2014 10:21:42 +0300 Andrey Ryabinin a.ryabi...@samsung.com wrote: Hi Andrew, Now we have stable GCC(4.9.2) which supports kasan and from my point of view patchset is ready for merging. I could have sent v7 (it's just rebased v6), but I see no point in doing that and

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Sasha Levin
On 11/18/2014 03:58 PM, Andrew Morton wrote: On Tue, 11 Nov 2014 10:21:42 +0300 Andrey Ryabinin a.ryabi...@samsung.com wrote: Hi Andrew, Now we have stable GCC(4.9.2) which supports kasan and from my point of view patchset is ready for merging. I could have sent v7 (it's just rebased

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Andi Kleen
It's a huge pile of tricky code we'll need to maintain. To justify its inclusion I think we need to be confident that kasan will find a significant number of significant bugs that kmemcheck/debug_pagealloc/slub_debug failed to detect. I would put it differently. kmemcheck is effectively too

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Dave Hansen
On 11/18/2014 01:15 PM, Andi Kleen wrote: If kasan will permit us to remove kmemcheck/debug_pagealloc/slub_debug then that tips the balance a little. What's the feasibility of that? Maybe removing kmemcheck. slub_debug/debug_pagealloc are simple, and are in different niches (lower overhead

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Sasha Levin
Hi Andrey, After the recent exchange of mails about kasan it came to me that I haven't seen a kasan warning for a while now. To give kasan a quick test I added a rather simple error which should generate a kasan warning about accessing userspace memory (yes, I know kasan has a test module but my

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Andrey Ryabinin
2014-11-18 23:58 GMT+03:00 Andrew Morton a...@linux-foundation.org: On Tue, 11 Nov 2014 10:21:42 +0300 Andrey Ryabinin a.ryabi...@samsung.com wrote: Hi Andrew, Now we have stable GCC(4.9.2) which supports kasan and from my point of view patchset is ready for merging. I could have sent v7

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Andrey Ryabinin
2014-11-19 2:38 GMT+03:00 Sasha Levin sasha.le...@oracle.com: Hi Andrey, After the recent exchange of mails about kasan it came to me that I haven't seen a kasan warning for a while now. To give kasan a quick test I added a rather simple error which should generate a kasan warning about

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-18 Thread Sasha Levin
On 11/18/2014 07:09 PM, Andrey Ryabinin wrote: Yes with CONFIG_KASAN_INLINE you will get GPF instead of kasan report. For userspaces addresses we don't have shadow memory. In outline case I just check address itself before checking shadow. In inline case compiler just checks shadow, so there

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-10 Thread Andrey Ryabinin
Hi Andrew, Now we have stable GCC(4.9.2) which supports kasan and from my point of view patchset is ready for merging. I could have sent v7 (it's just rebased v6), but I see no point in doing that and bothering people, unless you are ready to take it. So how should I proceed? Thanks, Andrey.

Re: [PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-10 Thread Andrey Ryabinin
Hi Andrew, Now we have stable GCC(4.9.2) which supports kasan and from my point of view patchset is ready for merging. I could have sent v7 (it's just rebased v6), but I see no point in doing that and bothering people, unless you are ready to take it. So how should I proceed? Thanks, Andrey.

[PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-05 Thread Andrey Ryabinin
KASan is a runtime memory debugger designed to find use-after-free and out-of-bounds bugs. Currently KASAN supported only for x86_64 architecture and requires kernel to be build with SLUB allocator. KASAN uses compile-time instrumentation for checking every memory access, therefore you will need

[PATCH v6 00/11] Kernel address sanitizer - runtime memory debugger.

2014-11-05 Thread Andrey Ryabinin
KASan is a runtime memory debugger designed to find use-after-free and out-of-bounds bugs. Currently KASAN supported only for x86_64 architecture and requires kernel to be build with SLUB allocator. KASAN uses compile-time instrumentation for checking every memory access, therefore you will need