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, 15 Feb 2024 17:22:33 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Anshuman Khandual <anshuman.khandual@....com>
Cc: linux-mm@...ck.org, Muchun Song <muchun.song@...ux.dev>,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] mm/hugetlb: Ensure adequate CMA areas available for
 hugetlb_cma[]

On Thu, 15 Feb 2024 10:04:05 +0530 Anshuman Khandual <anshuman.khandual@....com> wrote:

> HugeTLB CMA area array is being created for possible MAX_NUMNODES without
> ensuring corresponding MAX_CMA_AREAS support in CMA. This fails the build
> for such scenarios indicating need for CONFIG_CMA_AREAS adjustment.
> 
> ...
>
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -7743,6 +7743,13 @@ void __init hugetlb_cma_reserve(int order)
>  	}
>  
>  	reserved = 0;
> +
> +	/*
> +	 * There needs to be enough MAX_CMA_AREAS to accommodate
> +	 * MAX_NUMNODES heap areas being created here. Otherwise
> +	 * adjust CONFIG_CMA_AREAS as required.
> +	 */
> +	BUILD_BUG_ON(MAX_CMA_AREAS < MAX_NUMNODES);
>  	for_each_online_node(nid) {
>  		int res;

This blew up my x86_64 allmodconfig build.  I didn't check whether this
is because x86_64 kconfig is broken or because the test is bogus.

I won't be releasing a kernel which fails x86_64 allmodconfig.

So before adding a new assertion can we please first make a best effort
to implement the fixes which are required to prevent the new assertion
from triggering?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ