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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2a768123-4423-4f52-a0ef-96fa69872949@redhat.com>
Date: Sat, 7 Jun 2025 09:59:14 +0200
From: David Hildenbrand <david@...hat.com>
To: Tal Zussman <tz2294@...umbia.edu>,
 Andrew Morton <akpm@...ux-foundation.org>,
 Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
 "Liam R. Howlett" <Liam.Howlett@...cle.com>, Vlastimil Babka
 <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>,
 Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/debug: Use BUILD_BUG_ON_INVALID() for VIRTUAL_BUG_ON()

On 07.06.25 09:09, Tal Zussman wrote:
> This allows the compiler to validate the condition even with
> CONFIG_DEBUG_VIRTUAL disabled, and aligns VIRTUAL_BUG_ON() with the
> other macros in mmdebug.h.
> 

In the light of recent discussions, I think we should get rid of 
VIRTUAL_BUG_ON completely.

There are only a hand full of callers, and I am preety sure for most of 
them VM_WARN_ON is a suitable replacement.

> Signed-off-by: Tal Zussman <tz2294@...umbia.edu>
> ---
>   include/linux/mmdebug.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
> index a0a3894900ed..012aef40e7a9 100644
> --- a/include/linux/mmdebug.h
> +++ b/include/linux/mmdebug.h
> @@ -129,7 +129,7 @@ void vma_iter_dump_tree(const struct vma_iterator *vmi);
>   #ifdef CONFIG_DEBUG_VIRTUAL
>   #define VIRTUAL_BUG_ON(cond) BUG_ON(cond)
>   #else
> -#define VIRTUAL_BUG_ON(cond) do { } while (0)
> +#define VIRTUAL_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
>   #endif
>   
>   #ifdef CONFIG_DEBUG_VM_PGFLAGS
> 
> ---
> base-commit: efe99fabeb11b030c89a7dc5a5e7a7558d0dc7ec
> change-id: 20250607-virtual_bug_on_invalid-81d24b276109
> 
> Best regards,


-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ