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]
Message-ID: <4be3cbb7-ef4f-69f9-7212-123faec96044@linux.dev>
Date:   Thu, 16 Mar 2023 18:57:35 -0700
From:   Vineet Gupta <vineet.gupta@...ux.dev>
To:     "Kirill A. Shutemov" <kirill@...temov.name>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Vineet Gupta <vgupta@...nel.org>
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
Subject: Re: [PATCH 10/10] mm, treewide: Redefine MAX_ORDER sanely



On 3/16/23 16:30, Kirill A. Shutemov wrote:
> On Thu, Mar 16, 2023 at 11:15:47AM -0700, Mike Kravetz wrote:
>> On 03/15/23 14:31, Kirill A. Shutemov wrote:
>>> MAX_ORDER currently defined as number of orders page allocator supports:
>>> user can ask buddy allocator for page order between 0 and MAX_ORDER-1.
>>>
>>> This definition is counter-intuitive and lead to number of bugs all over
>>> the kernel.
>>>
>>> Change the definition of MAX_ORDER to be inclusive: the range of orders
>>> user can ask from buddy allocator is 0..MAX_ORDER now.
>>>
>>> --- a/arch/arc/Kconfig
>>> +++ b/arch/arc/Kconfig
>>> @@ -556,7 +556,7 @@ endmenu	 # "ARC Architecture Configuration"
>>>   
>>>   config ARCH_FORCE_MAX_ORDER
>>>   	int "Maximum zone order"
>>> -	default "12" if ARC_HUGEPAGE_16M
>>> -	default "11"
>>> +	default "11" if ARC_HUGEPAGE_16M
>>> +	default "10"
>> Is this Kconfig file wrong (off by 1) today?  It seems like it wants MAX_ORDER
>> to be sufficiently large to allocate 16M if ARC_HUGEPAGE_16M.  So, seems like
>> it should be 13 today?
> +Vineet.
>
> Hm. I think it is okay as long as CONFIG_ARC_PAGE_SIZE_8K=y which is
> default, but breaks for other PAGE_SIZE.
>
> Looks like ARCH_FORCE_MAX_ORDER calculation should involve selected page
> size.

Thats right 8K is default for ARC.

-Vineet

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ