lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 16 Mar 2023 08:55:59 +0000
From:   Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>
To:     "Kirill A. Shutemov" <kirill@...temov.name>
Cc:     "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Mel Gorman <mgorman@...e.de>, Vlastimil Babka <vbabka@...e.cz>,
        David Hildenbrand <david@...hat.com>, linux-mm@...ck.org,
        linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>
Subject: Re: [PATCH 04/10] drm/i915: Fix MAX_ORDER usage in
 i915_gem_object_get_pages_internal()


On 15/03/2023 15:38, Kirill A. Shutemov wrote:
> On Wed, Mar 15, 2023 at 03:35:23PM +0000, Tvrtko Ursulin wrote:
>>
>> On 15/03/2023 15:28, Kirill A. Shutemov wrote:
>>> On Wed, Mar 15, 2023 at 02:18:52PM +0000, Tvrtko Ursulin wrote:
>>>>
>>>> On 15/03/2023 11:31, Kirill A. Shutemov wrote:
>>>>> MAX_ORDER is not inclusive: the maximum allocation order buddy allocator
>>>>> can deliver is MAX_ORDER-1.
>>>>
>>>> This looks to be true on inspection:
>>>>
>>>> __alloc_pages():
>>>> ..
>>>> 	if (WARN_ON_ONCE_GFP(order >= MAX_ORDER, gfp))
>>>>
>>>> So a bit of a misleading name "max".. For the i915 patch:
>>>>
>>>> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@...el.com>
>>>>
>>>> I don't however see the whole series to understand the context, or how you
>>>> want to handle the individual patches. Is it a tree wide cleanup of the same
>>>> mistake?
>>>
>>> The whole patchset can be seen here:
>>>
>>> https://lore.kernel.org/all/20230315113133.11326-1-kirill.shutemov@linux.intel.com/
>>>
>>> The idea is to fix all MAX_ORDER bugs first and then re-define MAX_ORDER
>>> more sensibly.
>>
>> Sounds good.
>>
>> Would you like i915 to take this patch or you will be bringing the whole lot
>> via some other route? Former is okay and latter should also be fine for i915
>> since I don't envisage any conflicts here.
> 
> I think would be better to get it via mm tree.

Ack for that. But as I saw that by the end of the series you also change 
this back as you redefine MAX_ORDER to be inclusive you could even 
simplify things and just not do anything for i915. I am pretty sure we 
never call this helper for > 4M allocations otherwise we would have seen 
this warn.

Regards,

Tvrtko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ