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: <aSnJjNk272pCDubc@osama>
Date: Fri, 28 Nov 2025 18:10:52 +0200
From: Osama Abdelkader <osama.abdelkader@...il.com>
To: Anshuman Khandual <anshuman.khandual@....com>, mark.rutlang@....com
Cc: smostafa@...gle.com, catalin.marinas@....com,
	linux-kernel@...r.kernel.org, will@...nel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] arm64: Remove unreachable break after die

On Fri, Nov 28, 2025 at 08:01:22AM +0530, Anshuman Khandual wrote:
> 
> 
> On 27/11/25 2:50 PM, Mark Rutland wrote:
> > On Thu, Nov 27, 2025 at 12:26:20AM +0200, Osama Abdelkader wrote:
> >> die() never returns, the break is unreachable in arch/arm64/kernel/traps.c
> > 
> > Is the break causing some problem, e.g. a compiler warning?
> > 
> > If not, then I don't see a reason to remove the break.
> > 
> > There are many other instances of "die(...); break" throughout the
> > kernel, and this doesn't seem to be speecial.
> 
> Agree with Mark. From switch case semantics perspective a break is expected
> here regardless what happens to control flow.
> 
> > 
> > Mark.
> > 
> >> Signed-off-by: Osama Abdelkader <osama.abdelkader@...il.com>
> >> ---
> >>  arch/arm64/kernel/traps.c | 1 -
> >>  1 file changed, 1 deletion(-)
> >>
> >> diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
> >> index 681939ef5d16..81dd2d7759eb 100644
> >> --- a/arch/arm64/kernel/traps.c
> >> +++ b/arch/arm64/kernel/traps.c
> >> @@ -1003,7 +1003,6 @@ int bug_brk_handler(struct pt_regs *regs, unsigned long esr)
> >>  	switch (report_bug(regs->pc, regs)) {
> >>  	case BUG_TRAP_TYPE_BUG:
> >>  		die("Oops - BUG", regs, esr);
> >> -		break;
> >>  
> >>  	case BUG_TRAP_TYPE_WARN:
> >>  		break;
> >> -- 
> >> 2.43.0
> >>
> > 
> 

I see, I agree too.

Thanks.
Osama

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ