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: <20120731173854.GA14576@redhat.com>
Date:	Tue, 31 Jul 2012 19:38:54 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc:	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...hat.com>,
	Roland McGrath <roland@...k.frob.com>
Subject: Re: [PATCH] uprobes: don't enable/disable signle step if the user
	did it

On 07/31, Srikar Dronamraju wrote:
>
> * Oleg Nesterov <oleg@...hat.com> [2012-07-30 16:16:38]:
>
> > So I think we need arch_uprobe_*able_step(struct uprobe_task *utask).
> > Ignoring all problems except the one this patch tries to fix, x86
> > can simply do:
> >
> > 	arch_uprobe_enble_step(utask, struct arch_uprobe *auprobe)
> > 	{
> > 		utask->clear_tf =
> > 			!(regs->flags & X86_EFLAGS_TF) &&
> > 			(auprobe->insn != "popf");
> > 		regs->flags |= X86_EFLAGS_TF;
> > 	}
> >
> > 	arch_uprobe_disable_step(utask)
> > 	{
> > 		if (utask->clear_tf)
> > 			regs->flags &= ~X86_EFLAGS_TF;
> > 	}
> >
>
> We were using something similar to this approach. [though we were still
> using TIF_SINGLESTEP flag].

(and afaics the code was wrong)

> However this was all changed based on
> feedback from Roland and Peter.
>
> Here is the pointer to the discussion.
>
> https://lkml.org/lkml/2011/1/27/283

Looking at this discussion now, I am not sure that Roland was against
the per-arch uprobe_enable_step() implementation.

And when I read you message I do not understand your opinion ;)

And just in case, the pseudo code above is only for illustration,
note also "Ignoring all problems except the one".

In any case I agree, this needs more discussion. Personally I think
it doesn't make sense to try to teach user_enable_single_step() to
work correctly with ptrace and uprobes at the same time, I can be
wrong of-course.

Oleg.

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