Messages in this thread | | | Date | Mon, 24 Apr 2006 10:33:08 -0500 | From | Matt Mackall <> | Subject | Re: [patch 4/4] change slab poison pattern |
| |
On Mon, Apr 24, 2006 at 06:23:52PM +0800, Akinobu Mita wrote: > 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.
It would have conflicted with this, btw:
http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17-rc1/2.6.17-rc1-mm3/broken-out/add-poisonh-and-patch-primary-users.patch
-- Mathematics is the supreme nostalgia of our time. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |