From patchwork Sat Jul 13 15:14:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 93893 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D73F33861004 for ; Sat, 13 Jul 2024 15:14:44 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 0CE4D3860C32 for ; Sat, 13 Jul 2024 15:14:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0CE4D3860C32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0CE4D3860C32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720883663; cv=none; b=LkN2TX+OdQE0MkVgy9d/zdIAjDRFXziGqPaLV1M4PGrV5OiW+jLbTaZw2M0KRGXfxzfmejS0EQ+X67HdERCYvc5WP2BM1PvzG5/gcbms0cKJX6ECFDAKK6r4t14QppkQQlmK9r8K3Gk+lTM1ZOO6j5QF5Yj5wE9aE31Hh+sOrO0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720883663; c=relaxed/simple; bh=pKcWZ2SLhZzqyZqAY+4f4cSV0HVJdgJ5lHXvpEphZlc=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=hF8xipkFjl4rvTrkTpS15Eb067t6/PH36S+egrT8zl6WF3QhlqyIYNpN963e4En7YFXz9MxyI4riWTEpwY1+fkWpTaBcO6/rNIlbbZRNOhh9TuAbXJzbS38l7ifJlSmphJ/FB53t0+o4f+V9R727ZeYA2z+uJgZh5Dfzh0WHjsM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id EB768A0372; Sat, 13 Jul 2024 17:14:19 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YXE6QocFl5v4; Sat, 13 Jul 2024 17:14:19 +0200 (CEST) Received: from begin.home (aamiens-653-1-111-57.w83-192.abo.wanadoo.fr [83.192.234.57]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id D0984A034D; Sat, 13 Jul 2024 17:14:19 +0200 (CEST) Received: from samy by begin.home with local (Exim 4.98-RC3) (envelope-from ) id 1sSeS3-0000000CU7w-18KL; Sat, 13 Jul 2024 17:14:19 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd,commited] hurd: Fix restoring message to be retried Date: Sat, 13 Jul 2024 17:14:18 +0200 Message-ID: <20240713151418.2975736-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org save_data stores the start of the original message to be retried, overwritten by the EINTR reply. In 64b builds the overwrite is however rounded up to the 64b pointer size, so we have to save more than just the 32b err. Thanks a lot to Luca Dariz for the investigation! --- hurd/intr-msg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hurd/intr-msg.c b/hurd/intr-msg.c index 2c2e7dc463..424c1fc700 100644 --- a/hurd/intr-msg.c +++ b/hurd/intr-msg.c @@ -42,7 +42,10 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg, struct clobber { mach_msg_type_t type; - error_t err; + union { + error_t err; + uintptr_t align; + }; }; union msg {