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: <3f85d13e-5faa-ca0b-5ef5-79422bbae7a5@suse.cz>
Date:   Tue, 21 Mar 2023 09:01:54 +0100
From:   Vlastimil Babka <vbabka@...e.cz>
To:     "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Mel Gorman <mgorman@...e.de>,
        David Hildenbrand <david@...hat.com>
Cc:     linux-mm@...ck.org, linux-arch@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Alexander Duyck <alexander.h.duyck@...ux.intel.com>
Subject: Re: [PATCH 07/10] mm/page_reporting: Fix MAX_ORDER usage in
 page_reporting_register()

On 3/15/23 12:31, Kirill A. Shutemov wrote:
> MAX_ORDER is not inclusive: the maximum allocation order buddy allocator
> can deliver is MAX_ORDER-1.
> 
> Fix MAX_ORDER usage in page_reporting_register().
> 
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>

Reviewed-by: Vlastimil Babka <vbabka@...e.cz>

> Cc: Alexander Duyck <alexander.h.duyck@...ux.intel.com>
> ---
>  mm/page_reporting.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/page_reporting.c b/mm/page_reporting.c
> index c65813a9dc78..275b466de37b 100644
> --- a/mm/page_reporting.c
> +++ b/mm/page_reporting.c
> @@ -370,7 +370,7 @@ int page_reporting_register(struct page_reporting_dev_info *prdev)
>  	 */
>  
>  	if (page_reporting_order == -1) {
> -		if (prdev->order > 0 && prdev->order <= MAX_ORDER)
> +		if (prdev->order > 0 && prdev->order < MAX_ORDER)
>  			page_reporting_order = prdev->order;
>  		else
>  			page_reporting_order = pageblock_order;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ