[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ac76f388-9a73-b055-419a-37f182211343@suse.cz>
Date: Mon, 9 Dec 2019 10:10:01 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Ajay Kaher <akaher@...are.com>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Cc: "linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jann Horn <jannh@...gle.com>,
Matthew Wilcox <willy@...radead.org>,
"stable@...nel.org" <stable@...nel.org>,
Srivatsa Bhat <srivatsab@...are.com>,
"srivatsa@...il.mit.edu" <srivatsa@...il.mit.edu>,
Vasavi Sirnapalli <vsirnapalli@...are.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Subject: Re: [PATCH STABLE 4.4 5/8] mm: prevent get_user_pages() from
overflowing page refcount
On 12/9/19 9:54 AM, Ajay Kaher wrote:
>
>
> On 06/12/19, 8:02 PM, "Vlastimil Babka" <vbabka@...e.cz> wrote:
>
>> On 12/6/19 5:15 AM, Ajay Kaher wrote:
>>>
>>>
>>> On 03/12/19, 6:28 PM, "Vlastimil Babka" <vbabka@...e.cz> wrote:
>>>>>>
>>>>>> [ 4.4 backport: there's get_page_foll(), so add try_get_page()-like checks
>>>>>> in there, enabled by a new parameter, which is false where
>>>>>> upstream patch doesn't replace get_page() with try_get_page()
>>>>>> (the THP and hugetlb callers).
>>>>>
>>>>> Could we have try_get_page_foll(), as in:
>>>>> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fstable%2F1570581863-12090-3-git-send-email-akaher%40vmware.com%2F&data=02%7C01%7Cakaher%40vmware.com%7Cb65cf5622ca8401fd2ba08d77a5914e8%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637112395344338606&sdata=sLbw%2BQWu0%2BB0y2OpfaQS%2FxXX6Z9jNB3wPeTcPsawNJA%3D&reserved=0
>>>>>
>>>>> + Code will be in sync as we have try_get_page()
>>>>> + No need to add extra argument to try_get_page()
>>>>> + No need to modify the callers of try_get_page()
>>>
>>> Any reason for not using try_get_page_foll().
>>
>> Ah, sorry, I missed that previously. It's certainly possible to do it
>> that way, I just didn't care so strongly to rewrite the existing SLES
>> patch. It's a stable backport for a rather old LTS, not a codebase for
>> further development.
>
> Thanks for your response.
>
> I would appreciate if you would like to include try_get_page_foll(),
> and resend this patch series again.
I won't have time for that now, but I don't mind if you do that, or
resend your version with the missing x86 and s390 gup.c parts and
preferably without 7aef4172c795.
Powered by blists - more mailing lists