[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Thread safety of coroutine-sigaltstack
From: |
Laszlo Ersek |
Subject: |
Re: Thread safety of coroutine-sigaltstack |
Date: |
Thu, 21 Jan 2021 17:05:17 +0100 |
On 01/21/21 16:42, Max Reitz wrote:
> Perhaps we have the policy of “If another process can send signals, then
> we consider it to have full control over qemu, like a debugger.”
That's what I had more or less in mind, yes; see e.g.
https://man7.org/linux/man-pages/man2/ptrace.2.html
EPERM The specified process cannot be traced. This could be
because the tracer has insufficient privileges (the
required capability is CAP_SYS_PTRACE); unprivileged
processes cannot trace processes that they cannot send
signals to or those running set-user-ID/set-group-ID
programs, for obvious reasons. Alternatively, the process
may already be being traced, or (on kernels before 2.6.26)
be init(1) (PID 1).
Which seems to imply that, if you can send a signal, you can ptrace()
the signalee as well.
(I realize that what I'm saying does not follow from *pure logic*, as
the manual is stating !sendsig -> !trace, hence trace -> sendsig.
Whereas we're discussing the opposite direction: sendsig -> trace.
*But*, IMO, that direction is *suggested* by the manual.)
Anyway, this is kind of moot; I'm OK with the mutex too. :)
Thanks
Laszlo
- Thread safety of coroutine-sigaltstack, Max Reitz, 2021/01/20
- Re: Thread safety of coroutine-sigaltstack, Paolo Bonzini, 2021/01/20
- Re: Thread safety of coroutine-sigaltstack, Eric Blake, 2021/01/20
- Re: Thread safety of coroutine-sigaltstack, Laszlo Ersek, 2021/01/20
- Re: Thread safety of coroutine-sigaltstack, Paolo Bonzini, 2021/01/21
- Re: Thread safety of coroutine-sigaltstack, Daniel P . Berrangé, 2021/01/21
- Re: Thread safety of coroutine-sigaltstack, Peter Maydell, 2021/01/21
- Re: Thread safety of coroutine-sigaltstack, Paolo Bonzini, 2021/01/21
- Re: Thread safety of coroutine-sigaltstack, Laszlo Ersek, 2021/01/22
- Re: Thread safety of coroutine-sigaltstack, Laszlo Ersek, 2021/01/22
- Re: Thread safety of coroutine-sigaltstack, Laszlo Ersek, 2021/01/22
- Re: Thread safety of coroutine-sigaltstack, Markus Armbruster, 2021/01/22
Re: Thread safety of coroutine-sigaltstack, Max Reitz, 2021/01/22