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, 31 Mar 2011 12:32:30 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Oleg Nesterov <oleg@...hat.com>, Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH,RFC] perf: panic due to inclied cpu context task_ctx value

On Wed, Mar 30, 2011 at 11:26:45PM +0200, Peter Zijlstra wrote:
> On Wed, 2011-03-30 at 18:37 +0200, Oleg Nesterov wrote:
> > > +static void perf_sched_events_dec(void)
> > > +{
> > > +     jump_label_dec(&perf_sched_events_in);
> > > +     JUMP_LABEL(&perf_sched_events_in, no_sync);
> > > +     synchronize_sched();
> > > +no_sync:
> > > +     jump_label_dec(&perf_sched_events_out);
> > > +}
> > 
> > Nice! I didn't realize we can simply use JUMP_LABEL() directly and then
> > the code doesn't depend on HAVE_JUMP_LABEL. 
> 
> Yeah, avoids having to sprinkle tons of #ifdef goo around ;-)
> 
> Anyway how about we do the partial revert below that should get us back
> to a working kernel and is a nice small patch to send -stable wards.
> 
> After that we can try and be clever with clearing ->task_ctx from things
> like remove_from_context and the like.
> 
> 
> ---
>  include/linux/perf_event.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
> index 311b4dc..04d75a8 100644
> --- a/include/linux/perf_event.h
> +++ b/include/linux/perf_event.h
> @@ -1086,7 +1086,7 @@ void perf_event_task_sched_out(struct task_struct *task, struct task_struct *nex
>  {
>  	perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0);
>  
> -	COND_STMT(&perf_sched_events, __perf_event_task_sched_out(task, next));
> +	__perf_event_task_sched_out(task, next);
>  }
>  
>  extern void perf_event_mmap(struct vm_area_struct *vma);
> 
works for me, passed my tests ;)

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