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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201106031358.20857.vda.linux@googlemail.com>
Date:	Fri, 3 Jun 2011 13:58:20 +0200
From:	Denys Vlasenko <vda.linux@...glemail.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Oleg Nesterov <oleg@...hat.com>, jan.kratochvil@...hat.com,
	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	akpm@...ux-foundation.org, indan@....nu, bdonlan@...il.com,
	pedro@...esourcery.com
Subject: Re: [PATCHSET ptrace] ptrace: implement PTRACE_SEIZE/INTERRUPT and group stop notification, take#4

On Friday 03 June 2011 13:37, Denys Vlasenko wrote:
> On Friday 03 June 2011 03:34, Tejun Heo wrote:
> > > This should alleviate Linus' concerns that we are suffering from unnecessary
> > > featuritis - that we invent API which is significantly different
> > > from existing one, and as such users will not use it.
> > > 
> > > Existing API doesn't use GETSIGINFO data per se to distinguish group-stop from
> > > signal-delivery-stop, it uses the fact that GETSIGINFO fails on group-stop.
> > > (Well, arguably it's not a "designed" API, more like "accidentally created API",
> > > but nevertheless it exists right now). Oleg's proposal means that the new way
> > > may be makde to work very similarly.
> > 
> > Okay, you want to preserve %NULL SIGINFO on all STOP traps.  Dropping
> > si_pt_flags and using exit_code makes sense but I think we'll be
> > better off enabling GETSIGINFO.  The affected part of code has to be
> > changed anyway
> 
> Well, not exactly. The affected part of code in strace *has been changed
> already*. Latest version of strace finally does show "SIGSTOP delivered"
> and "group-stop happened" events differently.
> 
> Now strace, ideally, can have a minimal change
> 
> -	ptrace(PTRACE_LISTEN, pid, 0, sig);
> +	if (this_is_group_stop)
> +		ptrace(PTRACE_LISTEN, pid, 0, 0);
> +	else
> +		ptrace(PTRACE_SYSCALL, pid, 0, sig);
> 
> and boom, group-stops are handled correctly!

I meant

-	ptrace(PTRACE_SYSCALL, pid, 0, sig);
+	if (this_is_group_stop)
+		ptrace(PTRACE_LISTEN, pid, 0, 0);
+	else
+		ptrace(PTRACE_SYSCALL, pid, 0, sig);

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