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: <97a56b6a-bafa-448a-b082-917b7f9f30c6@redhat.com>
Date: Thu, 5 Sep 2024 15:13:19 +0200
From: David Hildenbrand <david@...hat.com>
To: Wang Yibo <lcnwed@...il.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
 linux-mm@...ck.org, trivial@...nel.org, wangyibo@...ontech.com
Subject: Re: [PATCH v2 1/1] mm: move bad zone checking in gfp_zone()

On 05.09.24 12:48, Wang Yibo wrote:
> When flags in gfp_zone() has an error combination,
> VM_BUG_ON() should first know it before use it.
> 
> Signed-off-by: Wang Yibo <wangyibo@...ontech.com>
> ---
>   include/linux/gfp.h | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/gfp.h b/include/linux/gfp.h
> index f53f76e0b17e..ca61b2440ab3 100644
> --- a/include/linux/gfp.h
> +++ b/include/linux/gfp.h
> @@ -133,10 +133,11 @@ static inline enum zone_type gfp_zone(gfp_t flags)
>   {
>   	enum zone_type z;
>   	int bit = (__force int) (flags & GFP_ZONEMASK);
> +	VM_BUG_ON((GFP_ZONE_BAD >> bit) & 1);
>   
>   	z = (GFP_ZONE_TABLE >> (bit * GFP_ZONES_SHIFT)) &
>   					 ((1 << GFP_ZONES_SHIFT) - 1);
> -	VM_BUG_ON((GFP_ZONE_BAD >> bit) & 1);
> +

I'm afraid you either missed half my review comments or your answer to 
my mail did not make it to my inbox.

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ