From: Stefan Metzmacher <[email protected]>
To: Linus Torvalds <[email protected]>
Cc: Jens Axboe <[email protected]>, io-uring <[email protected]>,
"Eric W. Biederman" <[email protected]>,
Oleg Nesterov <[email protected]>,
Linux Kernel Mailing List <[email protected]>
Subject: Re: [PATCH 0/6] Allow signals for IO threads
Date: Sat, 3 Apr 2021 02:48:26 +0200 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAHk-=wh-VE=4puZ+r-Mo0GcAUou3aKrvnNsU3JxjnMXNcJOoug@mail.gmail.com>
Am 01.04.21 um 18:24 schrieb Linus Torvalds:
> On Thu, Apr 1, 2021 at 9:00 AM Stefan Metzmacher <[email protected]> wrote:
>>
>> I haven't tried it, but it seems gdb tries to use PTRACE_PEEKUSR
>> against the last thread tid listed under /proc/<pid>/tasks/ in order to
>> get the architecture for the userspace application
>
> Christ, what an odd hack. Why wouldn't it just do it on the initial
> thread you actually attached to?
>
> Are you sure it's not simply because your test-case was to attach to
> the io_uring thread? Because the io_uring thread might as well be
> considered to be 64-bit.
│ └─io_uring-cp,1396 Makefile file
│ ├─{iou-mgr-1396},1397
│ ├─{iou-wrk-1396},1398
│ └─{iou-wrk-1396},1399
strace -ttT -o strace-uring-fail.txt gdb --pid 1396
(note strace -f would deadlock gdb with SIGSTOP)
The full file can be found here:
https://www.samba.org/~metze/strace-uring-fail.txt
(I guess there was a race and the workers 1398 and 1399 exited in between,
that's it using 1397):
18:46:35.429498 ptrace(PTRACE_PEEKUSER, 1397, 8*CS, [NULL]) = 0 <0.000022>
>> so my naive assumption
>> would be that it wouldn't allow the detection of a 32-bit application
>> using a 64-bit kernel.
>
> I'm not entirely convinced we want to care about a confused gdb
> implementation and somebody debugging a case that I don't believe
> happens in practice.
>
> 32-bit user space is legacy. And legacy isn't io_uring. If somebody
> insists on doing odd things, they can live with the odd results.
Ok, I'd agree for 32-bit applications, but what about libraries?
E.g. distributions ship libraries like libsmbclient or nss modules
as 64-bit and 32-bit version, in order to support legacy applications
to run. Why shouldn't the 32-bit library builds not support io_uring?
(Note libsmbclient don't use io_uring yet, but I guess it will be in future).
Any ideas regarding similar problems for other architectures?
metze
prev parent reply other threads:[~2021-04-03 0:48 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-26 0:39 [PATCH 0/6] Allow signals for IO threads Jens Axboe
2021-03-26 0:39 ` [PATCH 1/8] io_uring: handle signals for IO threads like a normal thread Jens Axboe
2021-03-26 0:39 ` [PATCH 2/8] kernel: unmask SIGSTOP for IO threads Jens Axboe
2021-03-26 13:48 ` Oleg Nesterov
2021-03-26 15:01 ` Jens Axboe
2021-03-26 15:23 ` Stefan Metzmacher
2021-03-26 15:29 ` Jens Axboe
2021-03-26 18:01 ` Stefan Metzmacher
2021-03-26 18:59 ` Jens Axboe
2021-04-01 14:53 ` Stefan Metzmacher
2021-03-26 0:39 ` [PATCH 3/8] Revert "signal: don't allow sending any signals to PF_IO_WORKER threads" Jens Axboe
2021-03-26 0:39 ` [PATCH 4/8] Revert "kernel: treat PF_IO_WORKER like PF_KTHREAD for ptrace/signals" Jens Axboe
2021-03-26 0:39 ` [PATCH 5/8] Revert "kernel: freezer should treat PF_IO_WORKER like PF_KTHREAD for freezing" Jens Axboe
2021-03-26 0:39 ` [PATCH 6/8] Revert "signal: don't allow STOP on PF_IO_WORKER threads" Jens Axboe
[not found] ` <[email protected]>
2021-03-26 12:56 ` [PATCH 0/6] Allow signals for IO threads Jens Axboe
2021-03-26 13:31 ` Stefan Metzmacher
2021-03-26 13:54 ` Jens Axboe
2021-03-26 13:59 ` Jens Axboe
2021-03-26 14:38 ` Jens Axboe
2021-03-26 14:43 ` Stefan Metzmacher
2021-03-26 14:45 ` Stefan Metzmacher
2021-03-26 14:53 ` Jens Axboe
2021-03-26 14:55 ` Jens Axboe
2021-03-26 15:08 ` Stefan Metzmacher
2021-03-26 15:10 ` Jens Axboe
2021-03-26 15:11 ` Stefan Metzmacher
2021-03-26 15:12 ` Jens Axboe
2021-03-26 15:04 ` Stefan Metzmacher
2021-03-26 15:09 ` Jens Axboe
2021-03-26 14:50 ` Jens Axboe
2021-03-27 1:46 ` Stefan Metzmacher
2021-03-27 16:41 ` Jens Axboe
2021-04-01 14:58 ` Stefan Metzmacher
2021-04-01 15:39 ` Linus Torvalds
2021-04-01 16:00 ` Stefan Metzmacher
2021-04-01 16:24 ` Linus Torvalds
2021-04-03 0:48 ` Stefan Metzmacher [this message]
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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