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: <6zzyjtvkqc4ipj7ngtkx3jithfwpwuxlix677urlehgdnljwbl@wfoa5futari6>
Date: Tue, 1 Apr 2025 17:50:32 -0700
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Robin Murphy <robin.murphy@....com>, Joerg Roedel <joro@...tes.org>, 
	Will Deacon <will@...nel.org>, linux-kernel@...r.kernel.org, iommu@...ts.linux.dev, 
	Randy Dunlap <rdunlap@...radead.org>, "Paul E. McKenney" <paulmck@...nel.org>
Subject: Re: [PATCH] iommu: Convert unreachable() to BUG()

On Thu, Mar 27, 2025 at 01:37:18PM +0100, Peter Zijlstra wrote:
> On Wed, Mar 26, 2025 at 10:28:46PM -0700, Josh Poimboeuf wrote:
> > Bare unreachable() should be avoided as it generates undefined behavior,
> > e.g. falling through to the next function.  Use BUG() instead so the
> > error is defined.
> 
> Right; I did a pass like this a while ago and thought I'd removed all
> unreachable() abuse.

Any reason not to just "#define unreachable() BUG()" and convert UD2 and
similar to use __builtin_unreachable()?

-- 
Josh


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ