Re: [PATCH v7 5/7] mm, kasan: Stackdepot implementation. Enable stackdepot for SLAB

2016-04-11 Thread Joonsoo Kim
On Mon, Apr 11, 2016 at 04:51:47PM +0200, Alexander Potapenko wrote: > On Mon, Apr 11, 2016 at 4:39 PM, Alexander Potapenko > wrote: > > On Mon, Apr 11, 2016 at 9:44 AM, Joonsoo Kim wrote: > >> On Mon, Mar 14, 2016 at 11:43:43AM +0100, Alexander Potapenko wrote: > >>> +depot_stack_handle_t depot

Re: [PATCH v7 5/7] mm, kasan: Stackdepot implementation. Enable stackdepot for SLAB

2016-04-11 Thread Alexander Potapenko
On Mon, Apr 11, 2016 at 4:39 PM, Alexander Potapenko wrote: > On Mon, Apr 11, 2016 at 9:44 AM, Joonsoo Kim wrote: >> On Mon, Mar 14, 2016 at 11:43:43AM +0100, Alexander Potapenko wrote: >>> +depot_stack_handle_t depot_save_stack(struct stack_trace *trace, >>> + gfp

Re: [PATCH v7 5/7] mm, kasan: Stackdepot implementation. Enable stackdepot for SLAB

2016-04-11 Thread Alexander Potapenko
On Mon, Apr 11, 2016 at 9:44 AM, Joonsoo Kim wrote: > On Mon, Mar 14, 2016 at 11:43:43AM +0100, Alexander Potapenko wrote: >> +depot_stack_handle_t depot_save_stack(struct stack_trace *trace, >> + gfp_t alloc_flags) >> +{ >> + u32 hash; >> + depot_stack_hand

Re: [PATCH v7 5/7] mm, kasan: Stackdepot implementation. Enable stackdepot for SLAB

2016-04-11 Thread Joonsoo Kim
On Mon, Mar 14, 2016 at 11:43:43AM +0100, Alexander Potapenko wrote: > +depot_stack_handle_t depot_save_stack(struct stack_trace *trace, > + gfp_t alloc_flags) > +{ > + u32 hash; > + depot_stack_handle_t retval = 0; > + struct stack_record *found = NULL,

Re: [PATCH v7 5/7] mm, kasan: Stackdepot implementation. Enable stackdepot for SLAB

2016-03-18 Thread Alexander Potapenko
On Tue, Mar 15, 2016 at 1:22 PM, Andrey Ryabinin wrote: > 2016-03-15 12:27 GMT+03:00 Alexander Potapenko : >> On Mon, Mar 14, 2016 at 5:56 PM, Andrey Ryabinin >> wrote: >>> 2016-03-14 13:43 GMT+03:00 Alexander Potapenko : >>> + + rec = this_cpu_ptr(&depot_recursion); +

Re: [PATCH v7 5/7] mm, kasan: Stackdepot implementation. Enable stackdepot for SLAB

2016-03-15 Thread Andrey Ryabinin
2016-03-15 12:27 GMT+03:00 Alexander Potapenko : > On Mon, Mar 14, 2016 at 5:56 PM, Andrey Ryabinin > wrote: >> 2016-03-14 13:43 GMT+03:00 Alexander Potapenko : >> >>> + >>> + rec = this_cpu_ptr(&depot_recursion); >>> + /* Don't store the stack if we've been called recursively. */ >>>

Re: [PATCH v7 5/7] mm, kasan: Stackdepot implementation. Enable stackdepot for SLAB

2016-03-15 Thread Alexander Potapenko
On Mon, Mar 14, 2016 at 5:56 PM, Andrey Ryabinin wrote: > 2016-03-14 13:43 GMT+03:00 Alexander Potapenko : > >> + >> + rec = this_cpu_ptr(&depot_recursion); >> + /* Don't store the stack if we've been called recursively. */ >> + if (unlikely(*rec)) >> + goto fast_ex

Re: [PATCH v7 5/7] mm, kasan: Stackdepot implementation. Enable stackdepot for SLAB

2016-03-14 Thread Andrey Ryabinin
2016-03-14 13:43 GMT+03:00 Alexander Potapenko : > + > + rec = this_cpu_ptr(&depot_recursion); > + /* Don't store the stack if we've been called recursively. */ > + if (unlikely(*rec)) > + goto fast_exit; > + *rec = true; This just can't work. As long as pre