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: <1365520045.25498.62.camel@gandalf.local.home>
Date:	Tue, 09 Apr 2013 11:07:25 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	Anton Arapov <anton@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] uprobes/tracing: generalize struct
 uprobe_trace_entry_head

On Tue, 2013-04-09 at 16:50 +0200, Oleg Nesterov wrote:
> On 04/08, Steven Rostedt wrote:

> OK, will do.
> 
> Or. Instead of enum we can use "bool is_return". So, instead of
> 
> 	if (is_ret_probe(tu))
> 		size = SIZEOF_TRACE_ENTRY(UPROBE_ENTRY_RETPROBE);
> 	else
> 		size = SIZEOF_TRACE_ENTRY(UPROBE_ENTRY_NORMAL);
> 
> we can do
> 
> 	size = SIZEOF_TRACE_ENTRY(is_ret_probe(tu));
> 
> What do you like more?

Which ever is easier ;-)

I just hated the magic "1" and "2". As long as I (or any reviewer) does
not need to go searching for numbers, and can easily figure out what is
going on by looking at the code at hand, I'm happy.

Both the above satisfy that requirement.

Your "is_ret_probe(tu)" may have the added bonus of being less error
prone.

Thanks,

-- 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