[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAmzW4OJtSEB=HxBk4Jz_t+zVN0BsKJM1h+QbrMFAh-K-A63Zw@mail.gmail.com>
Date: Fri, 1 Jul 2016 23:37:17 +0900
From: Joonsoo Kim <js1304@...il.com>
To: Dmitry Vyukov <dvyukov@...gle.com>
Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Alexander Potapenko <glider@...gle.com>,
kasan-dev <kasan-dev@...glegroups.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
Joonsoo Kim <iamjoonsoo.kim@....com>
Subject: Re: [PATCH v3] kasan/quarantine: fix bugs on qlist_move_cache()
2016-07-01 23:20 GMT+09:00 Dmitry Vyukov <dvyukov@...gle.com>:
> On Fri, Jul 1, 2016 at 4:18 PM, Andrey Ryabinin <aryabinin@...tuozzo.com> wrote:
>>
>>
>> On 07/01/2016 05:15 PM, Dmitry Vyukov wrote:
>>> On Fri, Jul 1, 2016 at 4:09 PM, Joonsoo Kim <js1304@...il.com> wrote:
>>>> 2016-07-01 23:03 GMT+09:00 Dmitry Vyukov <dvyukov@...gle.com>:
>>
>>>>>> +
>>>>>> + if (obj_cache == cache)
>>>>>> + qlist_put(to, qlink, cache->size);
>>>>>> + else
>>>>>> + qlist_put(from, qlink, cache->size);
>>>>>
>>>>> This line is wrong. If obj_cache != cache, object size != cache->size.
>>>>> Quarantine contains objects of different sizes.
>>>>
>>>> You're right. 11 pm is not good time to work. :/
>>>> If it is fixed, the patch looks correct to you?
>>>> I will fix it and send v4 on next week.
>>>
>>>
>>> I don't see anything else wrong. But I need to see how you fix the size issue.
>>> Performance of this operation is not particularly critical, so the
>>> simpler the better.
>>
>> Is there any other way besides obvious: s/cache->size/obj_cache->size ?
>
> We can remember the original bytes, then subtract
> num_objects_moved*cache->size from it and assign to from->bytes.
I'd prefer s/cache->size/obj_cache->size. It looks simpler.
If there is no objection, I will use it on v4.
Thanks.
Powered by blists - more mailing lists