Re: [RFC PATCH 0/5] mm/slub: preserve previous object lifetime

From: Pengpeng Hou

Date: Mon Jun 15 2026 - 02:15:50 EST


Hi Vlastimil, Harry,

Thanks for the feedback.

I agree that the terminology in the RFC cover letter was not precise
enough. The case I was trying to describe is a duplicate/stale free by a
previous owner after the object has already been freed and then reused by
another user. In that case, the current SLAB_STORE_USER records can show
the current allocation and the later bad free/check, but the previous
completed alloc/free lifetime that explains where the stale pointer came
from has already been overwritten.

This is not intended to compete with KASAN or infer semantic ownership.
KASAN is better when it can be used, but the motivation here is the lower
barrier of enabling slub_debug for a specific cache on an existing kernel,
especially in field debugging environments.

Based on your comments, I will rework the non-RFC version to fold this
into the existing U tracking instead of adding a separate H option, unless
there is a preference for keeping the extra history behind an explicit
flag. I will keep the scope to one previous completed lifetime and avoid a
larger history table/ring for now.

I will also add a small reproducer or KUnit coverage showing the lost
previous-lifetime case, plus object-size/order comparison data for a few
representative caches.

Thanks,
Pengpeng