Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1436575

Re: [PATCH 3/3] mm/page_owner: track page free call chain

From Joonsoo Kim <iamjoonsoo.kim@lge.com>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3] mm/page_owner: track page free call chain
Date 2016-07-04 07:30 +0200
Message-ID <rR4Cd-1Br-13@gated-at.bofh.it> (permalink)
References <rQvO9-5Jn-7@gated-at.bofh.it> <rQvOa-5Jn-15@gated-at.bofh.it> <rR49b-1bD-3@gated-at.bofh.it> <rR4iR-1uT-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jul 04, 2016 at 02:07:30PM +0900, Sergey Senozhatsky wrote:
> Hello,
> 
> On (07/04/16 13:57), Joonsoo Kim wrote:
> > On Sun, Jul 03, 2016 at 01:16:56AM +0900, Sergey Senozhatsky wrote:
> > > Introduce PAGE_OWNER_TRACK_FREE config option to extend page owner with
> > > free_pages() tracking functionality. This adds to the dump_page_owner()
> > > output an additional backtrace, that tells us what path has freed the
> > > page.
> > 
> > Hmm... Do you have other ideas to use this feature? Following example is
> > just to detect use-after-free and we have other good tools for it
> > (KASAN or DEBUG_PAGEALLOC) so I'm not sure whether it's useful or not.
> 
> there is no kasan for ARM32, for example (apart from the fact that
> it's really hard to use kasan sometimes due to its cpu cycles and
> memory requirements).

Hmm... for debugging purpose, KASAN provides many more things so IMO it's
better to implement/support KASAN in ARM32 rather than expand
PAGE_OWNER for free.

> 
> educate me, will DEBUG_PAGEALLOC tell us what path has triggered the
> extra put_page()? hm... does ARM32 provide ARCH_SUPPORTS_DEBUG_PAGEALLOC?

Hmm... Now, I notice that PAGE_OWNER_TRACK_FREE will detect
double-free rather than use-after-free. DEBUG_PAGEALLOC doesn't catch
double-free but it can be implemented easily. In this case, we can
show call path for second free.

AFAIK, ARM32 doesn't support ARCH_SUPPORTS_DEBUG_PAGEALLOC.

Thanks.

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH 0/3][RFC] mm/page:_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-07-02 18:20 +0200
  [PATCH 2/3] mm/page_owner: rename PAGE_EXT_OWNER flag Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-07-02 18:20 +0200
  [PATCH 1/3] mm/page_owner: rename page_owner functions Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-07-02 18:20 +0200
  [PATCH 3/3] mm/page_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-07-02 18:20 +0200
    Re: [PATCH 3/3] mm/page_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-07-03 08:00 +0200
    Re: [PATCH 3/3] mm/page_owner: track page free call chain Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-07-04 09:30 +0200
      Re: [PATCH 3/3] mm/page_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-07-04 10:00 +0200
    Re: [PATCH 3/3] mm/page_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-07-04 07:50 +0200
    Re: [PATCH 3/3] mm/page_owner: track page free call chain Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-07-04 07:00 +0200
      Re: [PATCH 3/3] mm/page_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-07-04 07:10 +0200
        Re: [PATCH 3/3] mm/page_owner: track page free call chain Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-07-04 07:30 +0200

csiph-web