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: <alpine.DEB.2.00.0902201252400.13747@gandalf.stny.rr.com>
Date:	Fri, 20 Feb 2009 12:54:11 -0500 (EST)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Ingo Molnar <mingo@...e.hu>
cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 4/5] ftrace: break out modify loop immediately on detection
 of error


On Fri, 20 Feb 2009, Ingo Molnar wrote:

> 
> * Steven Rostedt <rostedt@...dmis.org> wrote:
> 
> > --- a/kernel/trace/ftrace.c
> > +++ b/kernel/trace/ftrace.c
> > @@ -561,11 +561,15 @@ static void ftrace_replace_code(int enable)
> >  				if ((system_state == SYSTEM_BOOTING) ||
> >  				    !core_kernel_text(rec->ip)) {
> >  					ftrace_free_rec(rec);
> > -				} else
> > +				} else {
> >  					ftrace_bug(failed, rec->ip);
> > +					goto out;
> > +				}
> >  			}
> >  		}
> >  	}
> > + out:
> > +	return;
> 
> wouldnt a simple 'break' suffice? Hm, nope, 
> do_for_each_ftrace_rec() is a double loop.
> 
> Then perhaps a 'return' would perhaps be cleaner in this case. 
> (even though it does make the flow a bit assymetric - the out 
> label and the empty return looks a bit ugly.)

I guess a return would work too. I did the out jump to annotate the escape 
a bit more. Both are ugly IMHO. I'll switch it to return in the else 
statement.

-- Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ