Re: [patch 4/4] change slab poison pattern

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux