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.LFD.2.00.0905291514470.3397@localhost.localdomain>
Date:	Fri, 29 May 2009 15:15:26 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Martin Schwidefsky <schwidefsky@...ibm.com>
cc:	linux-kernel@...r.kernel.org, Rob van der Heij <rvdheij@...il.com>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Ingo Molnar <mingo@...e.hu>, john stultz <johnstul@...ibm.com>
Subject: Re: [patch 1/2] idle profile hits with NOHZ

On Fri, 29 May 2009, Martin Schwidefsky wrote:
> On Thu, 28 May 2009 22:19:44 +0200 (CEST)
> Thomas Gleixner <tglx@...utronix.de> wrote:
> 
> > On Thu, 28 May 2009, Martin Schwidefsky wrote:
> > > --- quilt-2.6.orig/kernel/time/tick-sched.c
> > > +++ quilt-2.6/kernel/time/tick-sched.c
> > > @@ -166,6 +166,7 @@ static void tick_nohz_stop_idle(int cpu)
> > >  		ts->idle_lastupdate = now;
> > >  		ts->idle_sleeptime = ktime_add(ts->idle_sleeptime, delta);
> > >  		ts->idle_active = 0;
> > > +		ts->idle_pc = profile_pc(get_irq_regs());
> > 
> >   Hmm, tick_nohz_stop_idle() is called from
> >   tick_nohz_restart_sched_tick() as well in the context of the idle
> >   task.
> > 
> >   I think there is no guarantee that get_irq_regs() will return
> >   anything useful in thread context.
> > 
> >   So get_irq_regs() might return a NULL pointer which will explode
> >   some of the profile_pc() implementations. If not it can still feed
> >   total nonsense to the profile_hits() call.
> 
> Drat, but if it is called from idle we should be able to just skip the
> assignment to ts->idle_pc, no? Then a simple in_interrupt() test is
> missing.

That should do the trick.

Thanks,

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