[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b7c0fed4-bb30-e905-aae2-5e380b582f4c@gmail.com>
Date: Wed, 17 Nov 2021 14:43:24 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>
Subject: Re: [RFC -next 1/2] lib: add reference counting infrastructure
On 11/17/21 12:47 PM, Jakub Kicinski wrote:
> On Wed, 17 Nov 2021 12:16:15 -0800 Eric Dumazet wrote:
>> On Wed, Nov 17, 2021 at 12:03 PM Jakub Kicinski <kuba@...nel.org> wrote:
>>> Looks great, this is what I had in mind when I said:
>>>
>>> | In the future we can extend this structure to also catch those
>>> | who fail to release the ref on unregistering notification.
>>>
>>> I realized today we can get quite a lot of coverage by just plugging
>>> in object debug infra.
>>>
>>> The main differences I see:
>>> - do we ever want to use this in prod? - if not why allocate the
>>> tracker itself dynamically? The double pointer interface seems
>>> harder to compile out completely
>>
>> I think that maintaining the tracking state in separate storage would
>> detect cases where the object has been freed, without the help of KASAN.
>
> Makes sense, I guess we can hang more of the information of a secondary
> object?
>
> Maybe I'm missing a trick on how to make the feature consume no space
> when disabled via Kconfig.
If not enabled in Kconfig, the structures are empty, so consume no space.
Basically this should a nop.
Powered by blists - more mailing lists