From: Oleg Nesterov <oleg@redhat.com>
To: Roland McGrath <roland@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Jan Kratochvil <jan.kratochvil@redhat.com>,
Denys Vlasenko <dvlasenk@redhat.com>
Subject: Q: ptrace_signal() && PTRACE_SETSIGINFO (Was: SIGSTOP && ptrace)
Date: Thu, 23 Apr 2009 17:16:33 +0200 [thread overview]
Message-ID: <20090423151633.GA3120@redhat.com> (raw)
In-Reply-To: <20090423142627.GA31572@redhat.com>
ptrace_signal:
signr = current->exit_code;
/* Update the siginfo structure if the signal has
changed. If the debugger wanted something
specific in the siginfo structure then it should
have updated *info via PTRACE_SETSIGINFO. */
Yes. PTRACE_SETSIGINFO can change *info if debugger wants something
special. But then we do:
if (signr != info->si_signo) {
info->si_signo = signr;
info->si_errno = 0;
info->si_code = SI_USER;
info->si_pid = task_pid_vnr(current->parent);
info->si_uid = task_uid(current->parent);
}
Why? If the tracer changes ->exit_code it should know what it does.
Why do we reset *info?
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?
Oleg.
next prev parent reply other threads:[~2009-04-23 15:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-23 12:15 ptrace(PTRACE_SYSCALL/CONT/DETACH, ..., SIGSTOP) does not work Denys Vlasenko
2009-04-23 14:26 ` SIGSTOP && ptrace (Was: ptrace(PTRACE_SYSCALL/CONT/DETACH, ..., SIGSTOP) does not work) Oleg Nesterov
2009-04-23 15:16 ` Oleg Nesterov [this message]
2009-04-24 6:31 ` Q: ptrace_signal() && PTRACE_SETSIGINFO (Was: SIGSTOP && ptrace) Roland McGrath
2009-04-24 17:41 ` Oleg Nesterov
2009-04-24 6:23 ` SIGSTOP && ptrace (Was: ptrace(PTRACE_SYSCALL/CONT/DETACH, ..., SIGSTOP) does not work) Roland McGrath
2009-04-24 21:15 ` Denys Vlasenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090423151633.GA3120@redhat.com \
--to=oleg@redhat.com \
--cc=dvlasenk@redhat.com \
--cc=jan.kratochvil@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox