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] [day] [month] [year] [list]
Message-ID: <1387043399.2276.12.camel@joe-AO722>
Date:	Sat, 14 Dec 2013 09:49:59 -0800
From:	Joe Perches <joe@...ches.com>
To:	Yuval Mintz <yuvalmin@...adcom.com>
Cc:	Ariel Elior <ariele@...adcom.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: bnx2x_sriov.c: Missing switch/case breaks?

On Sat, 2013-12-14 at 13:26 +0000, Yuval Mintz wrote:
> > > The `vfop' part of the code contains a lot of usage of the
> > `bnx2x_vfop_finalize()',
> > > which either goto or return at the end of almost every case.
> > > "Normal" analysis tools/scripts fail to recognize them as  valid case
> > breaks.
> > >
> > > Adding `fallthrough' comments would make little sense, as this is not the
> > real
> > > behavior; Perhaps we need some alternative comment? (something in the
> > line
> > > of `macro case break')
> > 
> > No idea.  It's certainly an ugly macro.
> > 
> 
> True.
[]
> > maybe there should be a break after most all
> > uses of this macro anyway.  When next is
> 
> Won't some static code analysis tools regard such `break' calls as
> unreachable code?

I suppose that maybe true,
but this could also work...

		bnx2x_vfop_finalize(vf, vfop->rc, VFOP_CONT); 
				/* Ugly goto|return macro, not fall-through */

;)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ