From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] [gdb/testsuite] Handle ptrace operation not permitted in can_spawn_for_attach
Date: Fri, 17 May 2024 11:54:42 +0200 [thread overview]
Message-ID: <a746e985-99bd-44d5-9b63-859988333877@suse.de> (raw)
In-Reply-To: <99c9b37f-76fb-4b5a-9e93-19fc8807284f@simark.ca>
On 5/17/24 05:42, Simon Marchi wrote:
>
>
> On 2024-05-01 04:34, Tom de Vries wrote:
>> When running the testsuite on a system with kernel.yama.ptrace_scope set to 1,
>> we run into attach failures.
>>
>> Fix this by recognizing "ptrace: Operation not permitted" in
>> can_spawn_for_attach.
>>
>> Tested on aarch64-linux and x86_64-linux.
>
> Hi Tom,
>
> Since this patch, I see some problems in test
> gdb.testsuite/gdb-caching-proc-consistency.exp with the native-gdbserver
> board:
>
> ERROR: in testcase /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.testsuite/gdb-caching-proc-consistency.exp
> ERROR: gdbserver does not support attach 1186109 without extended-remote
> ERROR: tcl error code NONE
> ERROR: tcl error info:
> gdbserver does not support attach 1186109 without extended-remote
> while executing
> "error "gdbserver does not support $command without extended-remote""
> (procedure "gdb_test_multiple" line 51)
> invoked from within
> "gdb_test_multiple "attach $test_pid" "can spawn for attach" {
> -re -wrap "$attaching_re\r\n.*ptrace: Operation not permitted\\." {
> # Not permitte..."
> (procedure "gdb_real__can_spawn_for_attach_1" line 27)
> invoked from within
> "gdb_real__can_spawn_for_attach_1"
> ("uplevel" body line 1)
> invoked from within
> "uplevel 2 [list $real_name {*}$args]"
> invoked from within
> "gdb_do_cache_wrap $real_name"
> ("uplevel" body line 2)
> invoked from within
> "uplevel 1 $body"
> invoked from within
> ...
Hi Simon,
Thanks for reporting this, I've submitted a fix here (
https://sourceware.org/pipermail/gdb-patches/2024-May/209242.html ).
Thanks,
- Tom
next prev parent reply other threads:[~2024-05-17 9:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-01 8:34 Tom de Vries
2024-05-01 9:08 ` Tom de Vries
2024-05-06 11:33 ` Pedro Alves
2024-05-17 3:42 ` Simon Marchi
2024-05-17 9:54 ` Tom de Vries [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-04-18 6:32 Tom de Vries
2024-04-24 19:40 ` Pedro Alves
2024-04-24 21:35 ` Tom de Vries
2024-04-26 18:50 ` Pedro Alves
2024-05-01 8:42 ` Tom de Vries
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=a746e985-99bd-44d5-9b63-859988333877@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).