From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gV+uK2gzmGrbDR8AWB0awg (envelope-from ) for ; Wed, 02 Sep 2026 10:32:08 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=mUAGk3Uz; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id AEE541E166; Wed, 02 Sep 2026 10:32:08 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 155E21E033 for ; Wed, 02 Sep 2026 10:32:07 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D4B014BA23E8 for ; Wed, 2 Sep 2026 14:32:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D4B014BA23E8 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=mUAGk3Uz Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 8CEB44BA2E27 for ; Wed, 2 Sep 2026 14:31:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8CEB44BA2E27 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8CEB44BA2E27 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788359498; cv=none; b=W4YLQmSWxySPl6DTzwTVcpNU7Xja+BzoMswJBWHf29hCot8YlSsOoYLEnigFhyLwH+vJYxDfU07hVv++7Vw3FKCelqXnEBHv9zC/+tYolwLegzzeojlgBJRxMHJ2V7UpFUJkVdS4wHA1tz3p/DnPu8of7ED1rhpQLKMYxmCsCfs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788359498; c=relaxed/simple; bh=uQc323PhwNPddXWslrjjfiJqeQib6hSVtcFpNXCUCY4=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=J7YMHg9rFKDWai7gHgFR2OkqFJburzz6pvaFlaM8LMM9dHI82hk8NdCua5N6A4gxONvSTWWGp97gVUBX0L7ZTDqKVY1EdxbJrwNdXv0Gd6+Xir1TfIwtxrnSy4z76lmwPo8imTN2VVK5cpi4oMEIcB65AF/hrnjECByT6ljrW9w= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=mUAGk3Uz DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8CEB44BA2E27 Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 682CW5qf047643; Wed, 2 Sep 2026 14:31:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=pp1; bh=SNfvQi9mNtKjXbhwX4sWJIaVJhPIlv yGQ+nLzcG4GyI=; b=mUAGk3Uz+3VAqgaG0hpkXonOy6ruVTs/l364Vd4KqR+Pkm l3J2jx2d8SfMqtR+0KAgivR0a0L0HNqwqTuWKEhLQfyHTaFJkxrufFHKX3yrbB16 9jANUyqNB5GfcM9OhL77fpekCP4ZxxoMeEi6V8pxk1ywjG9ooVl6Dn/4u+zebsyr jqv97KKCY4v9pQI329BR3u6M8X2hGIeOYb6MmlkghWaiHUcHBtSYpqo4LkTgvzwO dF3eO2sgDk6SGQ1ZlBT7OEZFtT16DVaPAL9Z+5kVvWI+YenViGq7pnylj1e+VbD6 C5mX2c/gKXZOv3qJmVjyMSau6ZvHMZc7YfU1VM7g== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4gbq2teqhd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Sep 2026 14:31:36 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id 682EBJ1M010102; Wed, 2 Sep 2026 14:31:36 GMT Received: from smtprelay07.wdc07v.mail.ibm.com ([172.16.1.74]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4gcb8hj893-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Sep 2026 14:31:36 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (smtpav05.wdc07v.mail.ibm.com [10.39.53.232]) by smtprelay07.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 682EVY9833882762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Sep 2026 14:31:34 GMT Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EF2D458043; Wed, 2 Sep 2026 14:31:33 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 20E3158059; Wed, 2 Sep 2026 14:31:32 +0000 (GMT) Received: from [9.39.27.240] (unknown [9.39.27.240]) by smtpav05.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 2 Sep 2026 14:31:31 +0000 (GMT) Content-Type: multipart/alternative; boundary="------------2MFsAnH5fIdy60RE4EC5cJcn" Message-ID: <4926e2b6-bb90-4d80-8d43-4d64271638f4@linux.ibm.com> Date: Wed, 2 Sep 2026 20:01:30 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: remote fileio: st_ino truncated to 32 bits in vFile:stat/lstat From: Abhay Kandpal To: Andrew Burgess , "gdb-patches@sourceware.org" Cc: Carl Love , Abhay Kandpal References: <52636405-75ad-402c-8941-7851b1f2a16e@linux.ibm.com> <87ecfku7am.fsf@redhat.com> Content-Language: en-GB In-Reply-To: X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=bc1bluPB c=1 sm=1 tr=0 ts=6a983348 cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=VdqzKS8jKosA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=RzCfie-kr_QcCd8fBx8p:22 a=r77TgQKjGQsHNAKrUKIA:9 a=nXwvUhL8viQqdu_qRa4A:9 a=QEXdDO2ut3YA:10 a=VnNF1IyMAAAA:8 a=MOd6S4Dk6d6BKF8K:21 a=_W_S_7VecoQA:10 X-Proofpoint-Spam-Info: AW1haW4tMjYwOTAyMDEyOCBTYWx0ZWRfX4MnH2jSGKi5x OXcpzxzsFggM/ayCahFudfzjjz3meGLd3B99fhAU4O/rQFqvUdlGvhKJUXNiNocBeprLU/UMC+y 1jOhBu7mUtinGFNICXz4xKV3SMsruy8= X-Proofpoint-ORIG-GUID: DQwAGqw8B1KUTluq5fPQjei1Y_bqJTsl X-Proofpoint-GUID: DQwAGqw8B1KUTluq5fPQjei1Y_bqJTsl X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTAyMDEyOCBTYWx0ZWRfXyMiEra5VRqaj 7iAtW5SQNeN/CSta4sY2XtoG1qzMxog8O0+diOwTf0vEFOVcJLUZVNCGZwwiFX7L481o9vxDIhf Wa3o6VxFZ7G5mOB9Xxa8rMzQyqlqQqb/+g7jyYpE0YEFfhvUkK2bmwwaq+ZhQpA+5KUj826LLks ykJU4OY2nK7nkfrfUiyLLC13qMQ/7hoqCVDv2Lb6/XOF7Q5RwdkkdLi/HCZn89rpkY9KHAUKKGw Ux0Pe+8RhjAL9z9bKl7Q6cs7MangDlwvkAYHuPCzdaasf9AlOjVoxk3XRKhoJbwKlXUNueglnN9 NXW6qmKPgd1lWUN0WOlVmliXG6DpGmJLsltrh0w9056ssufJ+1AH5tVs0facHT9CmBty0xh3/QD voPXM8adax9KBcHKtcUnLijnAk/HWuM6JGkTtUixxVKedADBWu4nGw4l1WYWuhDBfng4sBOT9Je JK+d5hyDJdDiPYUHy8Q== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-02_03,2026-09-01_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 suspectscore=0 adultscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 phishscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2609020128 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 This is a multi-part message in MIME format. --------------2MFsAnH5fIdy60RE4EC5cJcn Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Andrew, I've implemented the two-struct approach with qSupported negotiation as you described, and it works - gdb.server/fileio-packets.exp now passes on the xfs filesystem where it was failing, and there are no unexpected failures in the full testsuite on two machines. One thing before I post the patch. I've only changed the vFile packets, not the F-packet path. The two uses of fio_stat look quite different once you follow them through. vFile sends the struct as packet data between GDB and gdbserver (hostio_reply_with_data and fileio_process_fstat_and_lstat_reply), so qSupported negotiation works there. The F-packet path writes the struct directly into inferior memory (remote_fileio_func_stat, target_write_memory), where the inferior reads it as the 64-byte layout documented in the manual under "struct stat". I don't see a way to change that layout without breaking existing targets, and the manual describes st_ino there as having "no valid meaning for the target, transmitted unchanged", and says members "could eventually get truncated on the target". So my reading is that the F-packet layout should stay as it is. I will share the patch soon. Thanks Abhay On 27/08/26 12:13, Abhay Kandpal wrote: > th directions. --------------2MFsAnH5fIdy60RE4EC5cJcn Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Hi Andrew,
I've implemented the two-struct approach with qSupported negotiation as you described,
and it works - gdb.server/fileio-packets.exp now passes on the xfs filesystem where it was failing,
and there are no unexpected failures in the full testsuite on two machines.
One thing before I post the patch. I've only changed the vFile packets, not the F-packet path.
The two uses of fio_stat look quite different once you follow them through.

vFile sends the struct as packet data between GDB and gdbserver
(hostio_reply_with_data and fileio_process_fstat_and_lstat_reply), so qSupported negotiation works there.
The F-packet path writes the struct directly into inferior memory (remote_fileio_func_stat, target_write_memory),
where the inferior reads it as the 64-byte layout documented in the manual under "struct stat".

I don't see a way to change that layout without breaking existing targets,
and the manual describes st_ino there as having "no valid meaning for the target,
transmitted unchanged", and says members "could eventually get truncated on the target".
So my reading is that the F-packet layout should stay as it is. 
I will share the patch soon.

Thanks
Abhay

    
On 27/08/26 12:13, Abhay Kandpal wrote:
th directions.
--------------2MFsAnH5fIdy60RE4EC5cJcn--