lkml.org 
[lkml]   [2016]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v1 2/8] mm, kasan: SLAB support
From
> On Mon, Feb 1, 2016 at 3:15 AM, Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:
>> On Thu, Jan 28, 2016 at 02:29:42PM +0100, Alexander Potapenko wrote:
>>> On Thu, Jan 28, 2016 at 1:37 PM, Alexander Potapenko <glider@google.com> wrote:
>>> >
>>> > On Jan 28, 2016 8:44 AM, "Joonsoo Kim" <iamjoonsoo.kim@lge.com> wrote:
>>> >>
>>> >> On Wed, Jan 27, 2016 at 07:25:07PM +0100, Alexander Potapenko wrote:
>>> >> > This patch adds KASAN hooks to SLAB allocator.
>>> >> >
>>> >> > This patch is based on the "mm: kasan: unified support for SLUB and
>>> >> > SLAB allocators" patch originally prepared by Dmitry Chernenkov.
>>> >> >
>>> >> > Signed-off-by: Alexander Potapenko <glider@google.com>
>>> >> > ---
>>> >> > Documentation/kasan.txt | 5 ++-
>>> >>
>>> >> ...
>>> >>
>>> >> > +#ifdef CONFIG_SLAB
>>> >> > +struct kasan_alloc_meta *get_alloc_info(struct kmem_cache *cache,
>>> >> > + const void *object)
>>> >> > +{
>>> >> > + return (void *)object + cache->kasan_info.alloc_meta_offset;
>>> >> > +}
>>> >> > +
>>> >> > +struct kasan_free_meta *get_free_info(struct kmem_cache *cache,
>>> >> > + const void *object)
>>> >> > +{
>>> >> > + return (void *)object + cache->kasan_info.free_meta_offset;
>>> >> > +}
>>> >> > +#endif
>>> >>
>>> >> I cannot find the place to store stack info for free. get_free_info()
>>> >> isn't used except print_object(). Plese let me know where.
>>> >
>>> > This is covered by other patches in this patchset.
>>
>> This should be covered by this patch. Stroing and printing free_info
>> is already done on SLUB and it is meaningful without quarantain.

2016-02-18 21:58 GMT+09:00 Alexander Potapenko <glider@google.com>:
> However this info is meaningless without saved stack traces, which are
> only introduced in the stackdepot patch (see "[PATCH v1 5/8] mm,
> kasan: Stackdepot implementation. Enable stackdepot for SLAB")

Not meaningless. You already did it for allocation caller without saved
stack traces. What makes difference between alloc/free?

Thanks.

\
 
 \ /
  Last update: 2016-02-19 03:01    [W:0.108 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site