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:	Mon, 9 May 2011 13:11:49 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	mingo@...e.hu
Cc:	Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Subject: Re: [PATCH] kprobes,x86: disable irq durinr optimized callback

On Wed, Apr 27, 2011 at 09:51:23AM +0900, Masami Hiramatsu wrote:
> (2011/04/26 23:19), Jiri Olsa wrote:
> > On Tue, Apr 26, 2011 at 09:46:25AM -0400, Steven Rostedt wrote:
> >> On Tue, Apr 26, 2011 at 03:01:31PM +0200, Jiri Olsa wrote:

SNIP

> >>> hi,
> > 
> > makes the optimized kprobes to be missed. None is missed
> > if the kprobe optimatization is disabled.
> > 
> > Signed-off-by: Jiri Olsa <jolsa@...hat.com>
> 
> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
> 
> 
> Ingo, could you pull this as a bugfix?

hi,
could this be pulled in?

thanks,
jirka

> 
> Thank you!
> 
> 
> > ---
> >  arch/x86/kernel/kprobes.c |    5 +++--
> >  1 files changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c
> > index c969fd9..f1a6244 100644
> > --- a/arch/x86/kernel/kprobes.c
> > +++ b/arch/x86/kernel/kprobes.c
> > @@ -1183,12 +1183,13 @@ static void __kprobes optimized_callback(struct optimized_kprobe *op,
> >  					 struct pt_regs *regs)
> >  {
> >  	struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
> > +	unsigned long flags;
> >  
> >  	/* This is possible if op is under delayed unoptimizing */
> >  	if (kprobe_disabled(&op->kp))
> >  		return;
> >  
> > -	preempt_disable();
> > +	local_irq_save(flags);
> >  	if (kprobe_running()) {
> >  		kprobes_inc_nmissed_count(&op->kp);
> >  	} else {
> > @@ -1207,7 +1208,7 @@ static void __kprobes optimized_callback(struct optimized_kprobe *op,
> >  		opt_pre_handler(&op->kp, regs);
> >  		__this_cpu_write(current_kprobe, NULL);
> >  	}
> > -	preempt_enable_no_resched();
> > +	local_irq_restore(flags);
> >  }
> >  
> >  static int __kprobes copy_optimized_instructions(u8 *dest, u8 *src)
> 
> 
> -- 
> Masami HIRAMATSU
> Software Platform Research Dept. Linux Technology Center
> Hitachi, Ltd., Yokohama Research Laboratory
> E-mail: masami.hiramatsu.pt@...achi.com
--
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