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: <20250327123718.GB31358@noisy.programming.kicks-ass.net>
Date: Thu, 27 Mar 2025 13:37:18 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Josh Poimboeuf <jpoimboe@...nel.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 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.

Compilers see this as a clue to just stop code-gen. Very bad behaviour
if you ever actually get there. BUG() at the very least stops the kernel
dead, instead of continuing to run random code that comes after.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ