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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 14 Aug 2008 19:40:14 -0400
From:	Steven Rostedt <srostedt@...hat.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
CC:	Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	David Miller <davem@...emloft.net>,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	Roland McGrath <roland@...hat.com>,
	Ulrich Drepper <drepper@...hat.com>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Gregory Haskins <ghaskins@...ell.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	"Luis Claudio R. Goncalves" <lclaudio@...g.org>,
	Clark Williams <williams@...hat.com>,
	Bruce Duncan <bwduncan@...il.com>,
	Marcin Slusarz <marcin.slusarz@...il.com>
Subject: Re: [PATCH v2 3/6] ftrace: enable mcount recording for modules

Rusty Russell wrote:
> On Friday 15 August 2008 05:45:09 Steven Rostedt wrote:
>   
>> This patch enables the loading of the __mcount_section of modules and
>> changing all the callers of mcount into nops.
>>     
> ...
>   
>> +	if (mcountindex) {
>> +		void *mseg = (void *)sechdrs[mcountindex].sh_addr;
>> +		ftrace_init_module(mseg, mseg + sechdrs[mcountindex].sh_size);
>>     
>
> You don't actually need the if.  The size of section 0 is 0.
>   

Thanks,

But I find the if is a bit more clear. It may confuse code reviewers if 
we expect them to know that sechdrs[0].sh_size is zero. This isn't a hot 
path.

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