From nobody Fri Nov 14 18:16:49 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linux.dev ARC-Seal: i=1; a=rsa-sha256; t=1760771498; cv=none; d=zohomail.com; s=zohoarc; b=g9Gqw1sMq+vZK6odux/fmNgNoDrvyVKI4bMAcjwQeH2MW1oh5aixHog59NbrT5T/MDCbkW0v8Ewk2ezQn+rtkYuBwCxhQtLl05NYSYtg9+a7/h2vjLtAgjykilwODc/Q8QCd/t0OEO99G9Bf7xkhXgM5O5W/5+GxB8QIeG9JGkg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760771498; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=MNCqKXPKfDxfIU4kqikJ84i8HiPeFd3Ia+9CKZI7f3k=; b=Z8taAp8jZ+AmVHnaIJ6x0uLXg8PkJA5+ej51aypeiSj/wzZ937zrPR60f1p7HGfnkwTo6LTlpLFust/GxMC2GqNLO/HKPzuFFQ5Dyt1/LEg+6gm8AeEnpisgjmJd79+B7xiEyl2gc9KM7SHZNUVCruaysOz95JXgnqH/ITX4YGM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760771498231699.8108843083988; Sat, 18 Oct 2025 00:11:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vA15C-0005gx-2M; Sat, 18 Oct 2025 03:10:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v9s7E-0000ag-DR for qemu-devel@nongnu.org; Fri, 17 Oct 2025 17:36:00 -0400 Received: from out-179.mta0.migadu.com ([91.218.175.179]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v9s7C-0000uQ-B8 for qemu-devel@nongnu.org; Fri, 17 Oct 2025 17:36:00 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1760736943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MNCqKXPKfDxfIU4kqikJ84i8HiPeFd3Ia+9CKZI7f3k=; b=SiYUKloxRcJhHFQAUFw83Q6JUB6AeCUHvC/iao+GlIvxfUROhHwCdHhfc/4In2p1nctrFd YnRQwn5V50FiNT2maJORNP1e+xg9D/A2ZoCeUA77Y1kY5U8wlh8xeNGqBV0Nkg+ObPIsDM KhM6u62IwA/1jSCmFXaNlSx7Sp386wU= From: Sean Anderson To: =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Cc: Richard Henderson , Luc Michel , Sean Anderson Subject: [PATCH 1/3] gdbstub: Fix %s formatting Date: Fri, 17 Oct 2025 17:35:27 -0400 Message-Id: <20251017213529.998267-2-sean.anderson@linux.dev> In-Reply-To: <20251017213529.998267-1-sean.anderson@linux.dev> References: <20251017213529.998267-1-sean.anderson@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=91.218.175.179; envelope-from=sean.anderson@linux.dev; helo=out-179.mta0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 18 Oct 2025 03:10:26 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linux.dev) X-ZM-MESSAGEID: 1760771500022158500 Content-Type: text/plain; charset="utf-8" The format string for %s has two format characters. This causes it to emit strings like "466f5bd8/6x" instead of "466f5bd8/6". GDB detects this and returns EIO, causing all open File I/O calls to fail. Fixes: 0820a075af ("gdbstub: Adjust gdb_do_syscall to only use uint32_t and= uint64_t") Signed-off-by: Sean Anderson Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- gdbstub/syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbstub/syscalls.c b/gdbstub/syscalls.c index e855df21ab..d8bb90cc1c 100644 --- a/gdbstub/syscalls.c +++ b/gdbstub/syscalls.c @@ -127,7 +127,7 @@ void gdb_do_syscall(gdb_syscall_complete_cb cb, const c= har *fmt, ...) case 's': i64 =3D va_arg(va, uint64_t); i32 =3D va_arg(va, uint32_t); - p +=3D snprintf(p, p_end - p, "%" PRIx64 "/%x" PRIx32, i64= , i32); + p +=3D snprintf(p, p_end - p, "%" PRIx64 "/%" PRIx32, i64,= i32); break; default: bad_format: --=20 2.35.1.1320.gc452695387.dirty