From patchwork Sun Mar 1 16:04:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 130907 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id B032B4BA2E1A for ; Sun, 1 Mar 2026 16:04:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B032B4BA2E1A X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 7B7EB4BA2E12 for ; Sun, 1 Mar 2026 16:04:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7B7EB4BA2E12 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 7B7EB4BA2E12 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=1772381067; cv=none; b=dVltzKIdZZDo3uUnnshjR9EjibNx7ZZdI1l/vrybTDTzdEOoRDLCWBfe2sOqTcg8miKHRs6b4HsLgUORRYi0LtThxxOsyOfkPIjZzWbRVEgehYyw7pAkjZjnSrg3VrAnh6SRY9iz9CK1mmnZohqCv3BCwju+Gq/pBHo3Wh3Z4ts= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772381067; c=relaxed/simple; bh=4v83W1PrbUWTKVskHBCGARRFgyt/P8xLgt+A4LKIL6Y=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=t8mAIFtlQ3bGmig07fhYQUF0foIyjGEDoSqqYU8qwzy1w9pysLog7M5XXAKK45qvic8HSgK2ylIFLbeSPrnAit2CqDcQfBVmMZuQQlnkbNBi3zMfHhUyDDj88i2H6sxF6M7/G3lECTi4Mej0Pjx+UlDZKnODL6vx2JpkpTgxOR4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7B7EB4BA2E12 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 4D989A0441; Sun, 1 Mar 2026 17:04:26 +0100 (CET) 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 4OXMb2Wa_ppY; Sun, 1 Mar 2026 17:04:26 +0100 (CET) Received: from end (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (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 29AC2A03BD; Sun, 1 Mar 2026 17:04:26 +0100 (CET) Received: from samy by end with local (Exim 4.99.1) (envelope-from ) id 1vwjHN-0000000ElkX-2bh7; Sun, 01 Mar 2026 17:04:25 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org, David Yang Subject: [hurd,commited] hurd: Sign-extend the sigcode passed to msg_sig_post Date: Sun, 1 Mar 2026 17:04:23 +0100 Message-ID: <20260301160423.3520134-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 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 The negative sigcodes are reserved for SI_* values, we need to keep them negative when extending to exc_subcode's long type. This fixes the comparison in HURD_PREEMPT_SIGNAL_P for the signal preemptor for setitimer, thus fixing considering it.it_interval. Reported-by: David Yang --- hurd/hurdsig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c index 91e664d0f1..b202d1fdfc 100644 --- a/hurd/hurdsig.c +++ b/hurd/hurdsig.c @@ -1392,7 +1392,7 @@ _S_msg_sig_post (mach_port_t me, if (err = signal_allowed (signo, refport)) return err; - d.code = d.exc_subcode = sigcode; + d.code = d.exc_subcode = (int) sigcode; d.exc = 0; /* Post the signal to a global receiver thread (or mark it pending in