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: <20210106124223.587b93e5fdfd6a1a5f799c16@linux-foundation.org>
Date:   Wed, 6 Jan 2021 12:42:23 -0800
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Hugh Dickins <hughd@...gle.com>
Cc:     Andrea Arcangeli <aarcange@...hat.com>,
        Alex Shi <alex.shi@...ux.alibaba.com>,
        Minchan Kim <minchan@...nel.org>,
        Michal Hocko <mhocko@...e.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/mmap: replace if (cond) BUG() with BUG_ON()

On Wed, 6 Jan 2021 12:18:36 -0800 (PST) Hugh Dickins <hughd@...gle.com> wrote:

> On Wed, 6 Jan 2021, Andrea Arcangeli wrote:
> > 
> > I'd be surprised if the kernel can boot with BUG_ON() defined as "do
> > {}while(0)" so I guess it doesn't make any difference.
> 
> I had been afraid of that too, when CONFIG_BUG is not set:
> but I think it's actually "if (cond) do {} while (0)".

Yes, that is so.  The thinking being that in most cases the compiler
will be smart enough to avoid generating any code for `cond' anyway.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ