From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id flqIMazAk2jbfQUAWB0awg (envelope-from ) for ; Wed, 06 Aug 2025 16:53:00 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=L1ahYd+3; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A9A871E091; Wed, 6 Aug 2025 16:53:00 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 679E71E091 for ; Wed, 6 Aug 2025 16:52:59 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F25C3385843E for ; Wed, 6 Aug 2025 20:52:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F25C3385843E Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=L1ahYd+3 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id 5C4A53858CD9 for ; Wed, 6 Aug 2025 20:52:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5C4A53858CD9 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5C4A53858CD9 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::330 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1754513535; cv=none; b=XwKniRuYdLfl2yCDDIQ0E3AEexq68OVU7V5tsbuJePI2ew+cRUtlFznm+/TCewH1aEorJWEniT4dP1ltudu3XaxIojB0QR2Fzf5HnwJedRfWZ2OC/fdkfd8fsjcAJ6Kv4NDDv1hrtfOEbgyKrwdHLqCfsCiGuPhZTA1GF8rnXEU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1754513535; c=relaxed/simple; bh=mIwlrSP1uaOMN0NpEgPqWkCpbwORgEUEeaQI9hWzsAQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=EfAl1ceLaYJYszjVyPq0TLVYgRoaemfeD0SDz2e88yYHtRvxZ/4QoB06GCrpqP4BRKB1qPLFtUunnYA9hs4Ej6CdoOl14weF/darYxYS3KqP2j8G4/A7bAop6A9mFWDGVSPBYKLJurgxTUVfeZlA65Nn5beELSTexfoLOcimnp0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C4A53858CD9 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-451d3f72391so2915875e9.3 for ; Wed, 06 Aug 2025 13:52:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754513534; x=1755118334; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=WLnBhTZrsIJASq1ZpCipRBg/ppL7WhR0UFC1kmrIDkQ=; b=L1ahYd+3L20GvCi5HPfiQJ3Q2xCrtWHzooA+xTKI8kJILXsZjjwoCzhcsw1CW61KvI 2pTuSxGwixkju7ynVVin64qswwaK/jAUAVVkwfPpU4/nOLrab0CvsoFS6arYeo3FPI24 yxkUtgYeb/5Bmws8cl2B973J47/2zyPApgtkepdTLpC+RzPCkFIrx08elTyrSZgDv9xm mfHeuMshDEiNoiiUtwR4YBHkn5h0WRZyqql6U8mClWAZJz3InkWRhPSUVEABd7Jk3M/A zSc/RP00F0GTfy/6QBhhVl8V8aEoerPmA9Cj4PIfy19evtTxy/SSpq+qJeObK1NptZQm 4AuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754513534; x=1755118334; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WLnBhTZrsIJASq1ZpCipRBg/ppL7WhR0UFC1kmrIDkQ=; b=CyIavwmvJaVcmNoP4alu8hAfIAm4g9U4GSiRebceSUaJz6C+bA1HByBxgMm3a1E9nC LFs6/Iec7J0jh3AUsn/C5SOwAtaAL1KglH6ANQfWfJB3GMHgLLR+LFyvOhJOd1EAb94a vpoOatKMpvxcoyoOpSI5Wic93x/peWLmVTMUJtQR9kd8nkApadG23Cz36UPn+bCyyZQQ gHxgCANNo8x9E3FgL2/lfn1YdsFojW5LAbEHQ0/VF9Woxp7z1EsXHBLpGy06d5iReGk3 BK6RPr3kn6R6FiRH8XLHbzvwhET5B1Pc7A1TCqYyw4vnsmKrhGKDLqDkebo+zltw36zi jvhw== X-Forwarded-Encrypted: i=1; AJvYcCV3ETf11wqjrHTRuoqeBw5PIdU2n0boOx2zPJdnmoW6ZhND/jeqGIGqrHT9bx2wAoHWP4y2rLqMVjiB8g==@sourceware.org X-Gm-Message-State: AOJu0YwoXXojjrbFg+f5aPIM/qvPIwm8P1QC0K2rjUO+EXKOuCB0NCw+ oye4cqUxU746Sw2PiZSC9zWaiSa756t1YLU1vH9w98N0VQj98gpbY/Ky X-Gm-Gg: ASbGnct8TmkFayUWN6Ta5Fi+9BzYJsKTSqYg8M7o2/DKXdCA22ZpA1mbTMkl5G/e0u/ TrYnRthVSAvNAhobSvC20S+f25vUfK9oO85fb4A9H8S6+5aettMPKVm6hyPymtAZmLHXJrs8e/B N7tmlKaxdM+6CQzCUq5HahCUY3Xn7iAf9MoairUau+96tcnZeRL4myx2ZJwN3WyCL5MTalyyi+P c+CCRWE80VQ60QyLvnvofY5xHRrHkULvitPCF7PKpa97AebgCRR++uE0xKZODDkH9dO03iOTfwA CT/d+EPrqlQi9+YMG+Bx1FGx4xAB9EZGASkDr1X9TTD7wTSwr3XNsuYYVAuNtKy22W7u6mdK4dD DVoZM/Fieg5iVvlJhohEyW+nsMQdDH44AuOU= X-Google-Smtp-Source: AGHT+IG3hVl/vino+bpKchM7vuimeP/+5wGw1mfmKcmBypk5FFmStYYF9DKONPqTXxlRSO7B8B/Slg== X-Received: by 2002:a05:600c:3b9b:b0:459:dde3:1a33 with SMTP id 5b1f17b1804b1-459e70e695dmr34490725e9.26.1754513533559; Wed, 06 Aug 2025 13:52:13 -0700 (PDT) Received: from [192.168.0.38] ([86.12.216.189]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b79c4533f1sm24553396f8f.42.2025.08.06.13.52.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Aug 2025 13:52:13 -0700 (PDT) Message-ID: <40bebcad-2fcf-4340-82bb-2694be2af12c@gmail.com> Date: Wed, 6 Aug 2025 21:52:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 07/12] gdb: amd64 linux coredump support with shadow stack. To: Thiago Jung Bauermann , "Schimpe, Christina" Cc: Andrew Burgess , "gdb-patches@sourceware.org" , "luis.machado@arm.com" References: <20250628082810.332526-1-christina.schimpe@intel.com> <20250628082810.332526-8-christina.schimpe@intel.com> <87o6t3cawd.fsf@redhat.com> <87tt2u788x.fsf@linaro.org> <87cy9ajsr5.fsf@linaro.org> Content-Language: en-US From: Luis In-Reply-To: <87cy9ajsr5.fsf@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 8/5/25 05:29, Thiago Jung Bauermann wrote: > Hello, > > "Schimpe, Christina" writes: > >>>>>> + >>>>>> + # At this point we have a couple of core files, the gcore one >>>>>> + generated by >>>>>> + # GDB and the one generated by the operating system. Make >>>>>> + sure GDB can >>>>>> + # read both correctly. >>>>>> + >>>>>> + if {$gcore_generated} { >>>>>> + clean_restart $binfile >>>>>> + >>>>>> + with_test_prefix "gcore corefile" { >>>>>> + check_core_file $gcore_filename $ssp_in_gcore >>>>>> + } >>>>>> + } else { >>>>>> + fail "gcore corefile not generated" >>>>> >>>>> It's better, where possible, to avoid having pass/fail results that >>>>> only show up down some code paths. >>>>> >>>>> In this case it's easy to avoid having a stray 'fail' by >>>>> restructuring the code too: >>>>> >>>>> gdb_assert { $gcore_generated } "gcore corefile created" >>>>> if { $gcore_generated } { >>>>> ... etc ... >>>>> } >>>>> >>>>> Now you'll always have either a pass or fail based on the gcore >>>>> being generated. >>>> >>>> Good idea. I did that for aarch64-gcs-core.exp. >> >> If no OS corefile is found we will see a FAIL here. >> The usual coredump testing doesn't fail in case the coredump file is not found. >> So all gdb.base/corefile*.exp tests have sth. like: >> >> set corefile [core_find $binfile {}] >> if {$corefile == ""} { >> return >> } >> >> This can happen in case corefiles are managed, for instance, by apport on ubuntu. >> Do we want a different behaviour ? > > Interesting point. Perhaps a FAIL Isn't the best result to report in > this case, but IMHO it would be worth reporting an UNTESTED or perhaps > UNSUPPORTED result rather than silently returning. > > I don't have a strong opinion on this matter though. > When testing core files, I usually change the core_pattern in /proc/sys/kernel/core_pattern so the files are properly generated and saved. Personally I find it useful to have a FAIL output when the core file generation didn't work.