From: Akinobu Mita <mita@miraclelinux.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org,
Matt Mackall <mpm@selenic.com>,
Manfred Spraul <manfred@colorfullife.com>
Subject: Re: [patch 4/4] change slab poison pattern
Date: Mon, 24 Apr 2006 18:23:52 +0800 [thread overview]
Message-ID: <20060424102352.GA5789@miraclelinux.com> (raw)
In-Reply-To: <1145870404.21484.2.camel@localhost>
On Mon, Apr 24, 2006 at 12:20:03PM +0300, Pekka Enberg wrote:
> > Because use-after-free poisoning make kref counter signed value.
> > So this patch prevents it by changing poisoning pattern.
>
> Then why not check against POISON_INUSE when CONFIG_SLAB_DEBUG in the
> kref debugging code? I would prefer you didn't change the slab constants
> (they're well known by everyone now) but if you must, at least stick a
> big fat comment there.
This slab poisoning pattern change is not very important.
Because even if slab debugging is enalbed, kref_put() with unreferenced
kref object will be detected as slab corruption.
Because kref_put() decrements the kref counter in freed slab object.
Slab corruption: start=e0e8b698, len=32
Redzone: 0x5a2cf071/0x5a2cf071.
Last user: [<f08ea008>](release_test_kref+0x8/0x14 [test])
000: 6b 6b 6b 6b 6a 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
^^
The main reason I want to propose this kref debugging is because
I can find many places where we can replace from atomic_t to
struct kref by doing "grep -r atomic_dec_and_test .".
But I warried that replacing by kref will just increase atomic operations
because of debugging code in kref (WARN_ON()es in kref.c)
So patch 4/4 is not very important, I want to drop patch 4/4.
next prev parent reply other threads:[~2006-04-24 10:23 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-24 8:33 [patch 0/4] kref debugging Akinobu Mita
2006-04-24 8:33 ` [patch 1/4] kref: warn kref_put() with unreferenced kref Akinobu Mita
2006-04-25 3:51 ` Greg KH
2006-04-25 4:19 ` Valdis.Kletnieks
2006-04-25 5:11 ` Greg KH
2006-04-25 4:34 ` Akinobu Mita
2006-04-25 5:09 ` Greg KH
2006-04-25 6:27 ` Akinobu Mita
2006-04-27 11:45 ` Rogier Wolff
2006-04-24 8:33 ` [patch 2/4] kref debugging config option Akinobu Mita
2006-04-24 21:38 ` Andrew Morton
2006-04-25 4:53 ` Akinobu Mita
2006-04-25 5:08 ` Greg KH
2006-04-25 3:52 ` Greg KH
2006-04-24 8:33 ` [patch 3/4] dynamic configurable kref debugging Akinobu Mita
2006-04-25 3:55 ` Greg KH
2006-04-24 8:33 ` [patch 4/4] change slab poison pattern Akinobu Mita
2006-04-24 9:20 ` Pekka Enberg
2006-04-24 10:23 ` Akinobu Mita [this message]
2006-04-24 15:33 ` Matt Mackall
2006-04-25 3:49 ` [patch 0/4] kref debugging Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060424102352.GA5789@miraclelinux.com \
--to=mita@miraclelinux.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=mpm@selenic.com \
--cc=penberg@cs.helsinki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.