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: <201109070655.05898.vda.linux@googlemail.com>
Date:	Wed, 7 Sep 2011 06:55:05 +0200
From:	Denys Vlasenko <vda.linux@...glemail.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Denys Vlasenko <dvlasenk@...hat.com>, Tejun Heo <tj@...nel.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] Add new PTRACE_O_TRACESTOP option, make it control new ptrace behavior.

On Tuesday 06 September 2011 22:08, Oleg Nesterov wrote:
> On 09/05, Denys Vlasenko wrote:
> >
> > Add new PTRACE_O_TRACESTOP option, make it control new ptrace behavior.
> >
> > Introduce new ptrace option, PTRACE_O_TRACESTOP. This makes API
> > more symmetric: every PTRACE_EVENT_event has corresponding PTRACE_O_TRACEevent now,
> > as it used to have before PTRACE_SEIZE was introduced.
> >
> > PTRACE_SEIZE does not assume PTRACE_O_TRACESTOP, but with this patch
> > it allows any PTRACE_O_opts to be set at attach time
> 
> Well. This assumes that the only difference with PTRACE_SEIZE is the
> new stop/interrupt behaviour. I am not sure this is "safe" to assume.

I'd say that with this change, PTRACE_SEIZE is just PTRACE_ATTACH
with the possibility to set options on attach. Nothing more.

> Tejun, what do you think?


> >  int ptrace_request(struct task_struct *child, long request,
> >  		   unsigned long addr, unsigned long data)
> >  {
> > -	bool seized = child->ptrace & PT_SEIZED;
> > +	bool stop_events_enabled = child->ptrace & PT_TRACE_STOP;
> 
> May be ptrace_event_enabled(child, PTRACE_EVENT_STOP) looks better...
> The same about other PT_TRACE_STOP checks, although this is cosmetic.

Good idea. I will send a new patch a bit later.

> And. Given that you can set/clear PT_TRACE_STOP in ptrace_setoptions(),
> you need the locking.
>
> Just for example. do_signal_stop() calls ptrace_trap_notify() and hits
> WARN_ON_ONCE(!PT_TRACE_STOP) because it was cleared in between.

PTRACE_SETOPTIONS can be used only on stopped tracees. Can do_signal_stop()
run on a tracee while it is stopped?

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