From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id D9C993858415 for ; Fri, 17 May 2024 09:53:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D9C993858415 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D9C993858415 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715939625; cv=none; b=hq7phO6swhlY5wAXwEBE9XxOQ1NXHrUbUfvxTpiKERpwldeHk1QrpVGZYTPTnHOG5DCYith1YrcCUn9AVFRQZlsCbLYv4hD/41I+bXff/tAl6XUxZ5Gd71XLoHlV/aBYqxt3AkwAZm+VDQKZMkrOdQ9E+9WOaVzOCX5LnK8Xw8E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715939625; c=relaxed/simple; bh=LR+M2DQSeQFEsSbjccGUcj5NJXUjRTnzH1htfIZgyKE=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=G3uIh6nZvwzf+tChgOzXPiNuT1ZkKDoXqjmjeKXpVrO9IhwJxFKD+UNQ/3Ju46YamlGwOWtUgP/8NeAeIKeTonjq7x3UiOrWUpfbf06xOk79sXQSb5hoDnGkuUhHdk6DcjlRUZjeDj5DFqayrsCZPfJGV6KkstzyZKxkgUNx/l8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B901D22A4C; Fri, 17 May 2024 09:53:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1715939622; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qg/gn2xLmmucBbpH49BYBxz3ZFTJZmHaBN6sXcHxzMk=; b=ncXhFGkdwn87uUqBfICrz4tRUwPdb1q6KYPdobEmrAuWX4xC7UxP1HuoCvIxgai2XFrlaC sEHWncwbz7/nMTsOv+5mzJXza2jOrWCWTznLa+SMZA9IJJzshZu232BekZoEthuI/E0QD0 rrNZ8R1yCPnJzifVU8GcdpSrdHmhCNo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1715939622; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qg/gn2xLmmucBbpH49BYBxz3ZFTJZmHaBN6sXcHxzMk=; b=5Qy0ZA3CCv5iwSHdX3CS20XRvukXOAlPom3tJE+zIU/DGuGGdZNKR55BnPtwrtzqylX94s O7OZ86ALrKwkc1Bg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1715939620; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qg/gn2xLmmucBbpH49BYBxz3ZFTJZmHaBN6sXcHxzMk=; b=HAd3SvImlpVWX4xlHBHjJ3LHa/u5J0k/achKfGoHfE/2YwOggG4KkBa/VTQc6N/U7iJNCU a6mebFzBLjPaFwrGeLQIbSVNAUPcrGRb2bJGymgoun9k7RrT8bplSwEUJstFXqWqJGyv1W SWYHVEttD0cEPduR+72gPPSbuvk+bSA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1715939620; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qg/gn2xLmmucBbpH49BYBxz3ZFTJZmHaBN6sXcHxzMk=; b=fCYMaXPJEYtRH2k9S90/piqCWsEeM0rG7CSrM+AN8B92yO9crDWNzAtCEM0nRoqhdlo4jw +hPy3qFMVCWuTRDg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9DED413942; Fri, 17 May 2024 09:53:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 8WT9JCQpR2YLRgAAD6G6ig (envelope-from ); Fri, 17 May 2024 09:53:40 +0000 Message-ID: Date: Fri, 17 May 2024 11:54:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] [gdb/testsuite] Handle ptrace operation not permitted in can_spawn_for_attach To: Simon Marchi , gdb-patches@sourceware.org References: <20240501083433.19966-1-tdevries@suse.de> <99c9b37f-76fb-4b5a-9e93-19fc8807284f@simark.ca> Content-Language: en-US From: Tom de Vries In-Reply-To: <99c9b37f-76fb-4b5a-9e93-19fc8807284f@simark.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -4.29 X-Spam-Level: X-Spamd-Result: default: False [-4.29 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,sourceware.org:url] X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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