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]
Date:	Thu, 7 Oct 2010 03:50:57 +0900
From:	Paul Mundt <lethal@...ux-sh.org>
To:	Robert Richter <robert.richter@....com>
Cc:	Grant Likely <grant.likely@...retlab.ca>,
	Matt Fleming <matt@...sole-pimps.org>,
	Will Deacon <will.deacon@....com>,
	Russell King <linux@....linux.org.uk>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-sh@...r.kernel.org" <linux-sh@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...e.hu>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Deng-Cheng Zhu <dengcheng.zhu@...il.com>
Subject: Re: [PATCH 4/7] ARM: oprofile: Move non-ARM code into separate init/exit

On Wed, Oct 06, 2010 at 08:44:07PM +0200, Robert Richter wrote:
> On 06.10.10 14:23:17, Grant Likely wrote:
> > >> diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c
> > >> index b336cd9..76d97a5 100644
> > >> --- a/drivers/oprofile/oprof.c
> > >> +++ b/drivers/oprofile/oprof.c
> > >> @@ -252,6 +252,8 @@ static int __init oprofile_init(void)
> > >> ?{
> > >> ? ? ? int err;
> > >>
> > >> + ? ? memset(&oprofile_ops, 0, sizeof(struct oprofile_operations));
> > >> +
> > >
> > > Yes, this looks much better. Thanks Paul.
> > 
> > oprofile_ops is allocated in bss and so is already zeroed.  No need to
> > do it explicitly.
> 
> Before oprofile_arch_init() it isn't necessarily needed, but we should
> definitely add it before oprofile_timer_init(). For code readability I
> would rather tend to let the first in too.
> 
No, it was intentionally not added in between because architectures could
set a backtrace op even if they had no actual counter information to plug
in. oprofile_timer_init() is pretty careful to clear out all of the
unused fields manually, while leaving the backtrace setting untouched.

sh, ia64, and s390 all depend on this behaviour.
--
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