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:	Tue, 30 Apr 2013 19:51:38 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Alan Stern <stern@...land.harvard.edu>,
	Ingo Molnar <mingo@...e.hu>,
	Jan Kratochvil <jan.kratochvil@...hat.com>,
	Prasad <prasad@...ux.vnet.ibm.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/6] ptrace: PTRACE_DETACH should do
	flush_ptrace_hw_breakpoint(child)

On 04/30, Frederic Weisbecker wrote:
>
> On Mon, Apr 29, 2013 at 06:40:38PM +0200, Oleg Nesterov wrote:
>
> > No, I think this (minor) problem is very old... At least, when I look
> > at 2.6.26 code I do not see anything which coould clear db regs on
> > detach.
>
> Ok, if so then the conversion to perf hasn't changed much the picture I think.

God knows ;) afaik there are not too much users.

But fyi, this conversion fixed some problems. For example, the content
of db registers we copied by copy_process iirc.

And, I didn't verify this, it seems that the old code didn't set _RF
bit so PTRACE_CONT should probably trigger the same bp again...

> The breakpoints have just stayed persistent across
> tracers.

Yes.

And. This conversion allows us to implement the generic arch-independent
PTRACE_GET/SET_HWBP api, the current PTRACE_{PEEK,POKE}USR(u_debugreg)
api is really awkward.

> > Btw. perhaps flush_ptrace_hw_breakpoint() should also clear the
> > virtual registers like thread.debugreg7 ? Even without this patch,
> > flush_ is also called exec.
>
> Yeah makes sense.

OK, and probably debugreg6 too, but I need to recheck.


Thanks Frederic for your review!

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