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] [day] [month] [year] [list]
Message-ID: <aRvI_VU3NOUaxfvk@fedora>
Date: Mon, 17 Nov 2025 17:16:45 -0800
From: "Vishal Moola (Oracle)" <vishal.moola@...il.com>
To: david@...t.cz
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	Uladzislau Rezki <urezki@...il.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, phone-devel@...r.kernel.org
Subject: Re: [PATCH] mm/vmalloc: warn only once when vmalloc detect invalid
 gfp flags

On Tue, Nov 18, 2025 at 01:05:57AM +0100, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@...t.cz>
> 
> Without WARN_ONCE, the logs get spammed immediately after the boot,
> on devices as OnePlus 6T (Snapdragon 845).
> 
> Fixes: 7179b2256315 ("mm/vmalloc: warn on invalid vmalloc gfp flags")
> Signed-off-by: David Heidelberg <david@...t.cz>
> ---
> I'm not 100% sure this is the right solution, but having WARN_ONCE or
> rate limited warnings here helps a lot on devices as OnePlus 6 (sdm845).
> 
> Please let me know what you think.
> ---
>  mm/vmalloc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index 49e0b68768d73..2a3ee17093d6e 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -3934,8 +3934,8 @@ static gfp_t vmalloc_fix_flags(gfp_t flags)
>  	gfp_t invalid_mask = flags & ~GFP_VMALLOC_SUPPORTED;
>  
>  	flags &= GFP_VMALLOC_SUPPORTED;
> -	WARN(1, "Unexpected gfp: %#x (%pGg). Fixing up to gfp: %#x (%pGg). Fix your code!\n",
> -			invalid_mask, &invalid_mask, flags, &flags);
> +	WARN_ONCE(1, "Unexpected gfp: %#x (%pGg). Fixing up to gfp: %#x (%pGg). Fix your code!\n"

You accidentally deleted the comma here. 

Once we've found all gfp the callers currently use, we should never be
hitting this warning, so ratelimiting won't matter. Either way is fine
by me though if you still want to fix and resend this.

> +		  invalid_mask, &invalid_mask, flags, &flags);
>  	return flags;
>  }
>  
> 
> ---
> base-commit: 0c1c7a6a83feaf2cf182c52983ffe330ffb50280
> change-id: 20251118-only-one-vmalloc-b8d997045791
> 
> Best regards,
> -- 
> David Heidelberg <david@...t.cz>
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ