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: <20090424174140.GA15020@redhat.com>
Date:	Fri, 24 Apr 2009 19:41:40 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Roland McGrath <roland@...hat.com>
Cc:	linux-kernel@...r.kernel.org,
	Jan Kratochvil <jan.kratochvil@...hat.com>,
	Denys Vlasenko <dvlasenk@...hat.com>
Subject: Re: Q: ptrace_signal() && PTRACE_SETSIGINFO (Was: SIGSTOP &&
	ptrace)

On 04/23, Roland McGrath wrote:
>
> > Yes. PTRACE_SETSIGINFO can change *info if debugger wants something
> > special. But then we do:
> >
> > 	if (signr != info->si_signo) {
> > 		info->si_signo = signr;
> [...]
> > Why? If the tracer changes ->exit_code it should know what it does.
>
> If it uses PTRACE_SETSIGINFO it should know what it does, and update
> the siginfo_t to match the signal it passes to PTRACE_CONT et al.
>
> > Why do we reset *info?
>
> PTRACE_SETSIGINFO did not always exist, and even now might not be used by a
> simple-minded application.  If the user is sophisticated, it calls
> PTRACE_SETSIGINFO and then passes the signal number to match.  If not, it
> never calls PTRACE_SETSIGINFO at all, but expects the signal number it
> chose to pass in PTRACE_CONT to behave "normally" in the tracee.

OK, understand.

> > But the real question, how can PTRACE_SETSIGINFO change ->si_signo
> > (for example, for do_signal_stop(si_signo)) if this in fact is not
> > allowed?
>
> It's allowed.  You just have to pass the same value you set in si_signo as
> the argument to PTRACE_CONT after you do PTRACE_SETSIGINFO.

Yes, yes, I see. I meant "the tracer can not use signr != ->si_signo",
but now I don't see the reason it should.

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